diff -Nru gnome-dvb-daemon-0.1.16/aclocal.m4 gnome-dvb-daemon-0.1.21/aclocal.m4 --- gnome-dvb-daemon-0.1.16/aclocal.m4 2010-02-24 16:24:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/aclocal.m4 2010-08-23 13:37:01.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -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.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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'.])]) @@ -657,7 +657,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -673,7 +673,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1564,6 +1564,14 @@ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) @@ -1594,6 +1602,14 @@ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) @@ -1880,6 +1896,36 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +# Autoconf support for the Vala compiler + +# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# +# 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 + +# Check whether the Vala compiler exists in `PATH'. If it is found, the +# variable VALAC is set. Optionally a minimum release number of the +# compiler can be requested. +# +# AM_PROG_VALAC([MINIMUM-VERSION]) +# -------------------------------- +AC_DEFUN([AM_PROG_VALAC], +[AC_PATH_PROG([VALAC], [valac], []) + AS_IF([test -z "$VALAC"], + [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])], + [AS_IF([test -n "$1"], + [AC_MSG_CHECKING([$VALAC is at least version $1]) + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + AS_VERSION_COMPARE([$1], ["$am__vala_version"], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Vala $1 not found.])])])]) +]) + m4_include([m4/gstreamer.m4]) m4_include([m4/intltool.m4]) m4_include([m4/libtool.m4]) diff -Nru gnome-dvb-daemon-0.1.16/ChangeLog gnome-dvb-daemon-0.1.21/ChangeLog --- gnome-dvb-daemon-0.1.16/ChangeLog 2010-03-18 09:19:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/ChangeLog 2010-08-23 13:55:54.000000000 +0000 @@ -1,5 +1,622 @@ # Generated by Makefile. Do not edit. +2010-08-23 Sebastian Pölsterl + + * NEWS: [1024] Added release notes + +2010-08-23 Sebastian Pölsterl + + * po/it.po: Added. + + * 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. + + [1023] Added Italian translation. Updated translations. + +2010-08-23 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: [1022] Updated POT file + + * client/totem-plugin/dvb-daemon.py: [1021] totem: Remove hack to + modify Totem's recently used entry + + * client/totem-plugin/dvb-daemon.py: [1020] totem: Monitor DBus for + changing owner of org.gnome.DVB + + * src/Channel.vala: [1019] Append channel name to rtsp URL + + * src/Utils.vala: [1018] Utils: Allow more characters in + remove_nonalphanums + + * src/Device.vala: [1017] Device: Replaced critical with warning + +2010-08-11 Sebastian Pölsterl + + * data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in: Added. + + * data/Makefile.am: Modified. + + [1016] Added D-Bus service file for + org.gnome.UPnP.MediaServer2.DVBDaemon interface + +2010-08-11 Sebastian Pölsterl + + * src/Main.vala: [1015] Main: Renamed option disable-rygel to disable- + mediaserver + + * src/Main.vala: [1014] Main: Added enable-mediaserver2 option to + command line interface + + * src/rygel/Services2.vala: [1013] MediaServer2: Calculate array index + correctly + +2010-08-09 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 + + * src/ChannelFactory.vala, + * src/EPGScanner.vala: [1011] More adjustments to libgee deprecations + + * src/Manager.vala: [1010] Manager: Adjusted to libgee deprecations + + * src/Recorder.vala: [1009] Recorder: Adjusted to libgee deprecations + + * src/RecordingsStore.vala: [1008] RecordingsStore: Adjusted to libgee + deprecations + + * src/ChannelList.vala: [1007] ChannelList: Adjusted to libgee + deprecations + + * src/Schedule.vala: [1006] Schedule: Adjusted to libgee deprecations + + * src/rygel/Services.vala: [1005] 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. + + [1004] Added initial implementation of Rygel's MediaServerSpec2 + +2010-07-16 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * src/Device.vala, + * src/EPGScanner.vala, + * src/Scanner.vala: [1003] Build fixes for Vala 0.9.3 + +2010-06-21 Sebastian Pölsterl + + * configure.ac: [1002] Post release version bump to 0.1.21 + +=== version-0.1.20 === +2010-06-21 Sebastian Pölsterl + + * NEWS: [1001] Added release notes + + * 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 + +2010-06-19 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: [999] Updated .pot file + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [998] gnomedvb: + Display signal strength and signal-to-noise ratio when scanning + + * client/gnomedvb/DBusWrapper.py: [997] gnomedvb: Added frontend-stats + signal to scanner + + * 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 + +2010-06-09 Sebastian Pölsterl + + * Makefile.am, + * configure.ac: [995] Require valac 0.9.1 und automake 1.11 + + * 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 + +2010-06-05 Sebastian Pölsterl + + * src/ChannelFactory.vala: [992] ChannelFactory: set pipeline back to + playing in remove_channel if others are still watching it + + * client/gnomedvb/ui/timers/TimerDialog.py, + * client/gnomedvb/ui/widgets/DateTime.py: [991] Fixed bug where + current time wasn't displayed in timer dialog + +2010-05-27 Sebastian Pölsterl + + * configure.ac: [990] Post release version bump to 0.1.20 + +=== version-0.1.19 === +2010-05-27 Sebastian Pölsterl + + * NEWS: [989] Added release notes + + * client/totem-plugin/dvb-daemon.py: [988] totem-plugin: Fixed opening + of DVB preferences window + + * client/gnomedvb/ui/wizard/SetupWizard.py, + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [987] gnomedvb: + Catch error when retrieving icon from icon theme + +2010-05-26 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 + +2010-05-23 Sebastian Pölsterl + + * configure.ac: [984] Post release version bump + +=== version-0.1.18 === +2010-05-23 Sebastian Pölsterl + + * NEWS: [983] Added release notes + + * README: [982] Added gudev dependency to README + +2010-05-23 Sebastian Pölsterl + + * po/pt_BR.po: Added. + + * 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. + + [981] Updated translations + +2010-05-23 Sebastian Pölsterl + + * client/gnomedvb/ui/widgets/SchedulePaned.py: [980] Don't append + newline if short description is empty + + * client/gnomedvb/ui/widgets/ScheduleStore.py: [979] Don't escape + extended description because it is displayed in a gtk.TextView + +2010-05-22 Sebastian Pölsterl + + * src/Schedule.vala: [978] Schedule: Use remove_all_events_older_than + method. Check if get_event returns none null value. + + * src/database/EPGStore.vala, + * src/database/sqlite/SqliteEPGStore.vala: [977] 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: [976] Event: made get_end_timestamp public + +2010-05-18 Sebastian Pölsterl + + * src/Schedule.vala: [975] Schedule: remove all expired events in a + single transaction + + * src/database/EPGStore.vala, + * src/database/sqlite/SqliteEPGStore.vala: [974] EPGStore: added + remove_all_events method that remove all events in one transaction + +2010-05-15 Sebastian Pölsterl + + * src/EPGScanner.vala: [973] 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: [972] Group sql + statements into one transaction where possible + +2010-05-12 Sebastian Pölsterl + + * client/gnomedvb/udev, + * client/gnomedvb/udev/__init__.py, + * client/gnomedvb/udev/_dvbudevmodule.c: Removed. + + * client/gnomedvb/DBusWrapper.py, + * client/gnomedvb/Makefile.am: Modified. + + [971] Removed python udev module and use new DBus method instead + +2010-05-12 Sebastian Pölsterl + + * src/Manager.vala, + * src/dbus/IDBusManager.vala: [970] Added GetDevices method to manager + DBus interface to retrieve informations about devices via udev + +2010-05-10 Sebastian Pölsterl + + * src/ChannelFactory.vala, + * src/DeviceGroup.vala, + * src/Manager.vala: [969] Added methods to start/stop EPGScanner where + it is checked if epgscanner is enabled + + * src/Main.vala, + * src/Manager.vala: [968] Added support for hotplugging devices + + * Makefile.am: [967] Compile daemon with gudev library + + * src/database/ConfigStore.vala, + * src/database/sqlite/SqliteConfigTimersStore.vala: [966] Added + get_parent_group method + + * src/DeviceGroup.vala: [965] 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/EPGScanner.vala, + * src/Event.vala, + * src/Schedule.vala: [964] Use HashSet to store events in EPGScanner + +2010-05-07 Sebastian Pölsterl + + * src/EPGScanner.vala: [963] 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. + + * src/Schedule.vala: [962] Added add_all function to schedule that + adds/updates all events in one transaction + + * src/database/sqlite/SqliteDatabase.vala: [961] Added + (begin|end)_transaction functions to SqliteDatabase + + * src/database/sqlite/SqliteEPGStore.vala: [960] Set synchronous to + OFF of events db for speed reasons + + * src/Factory.vala, + * src/Main.vala, + * src/Recorder.vala, + * src/Schedule.vala: [959] Return owned values in Factory + +2010-05-04 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: [958] Updated .pot file + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [957] Added text + that scanning for channels may take some time. + +2010-04-20 Sebastian Pölsterl + + * 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. + + * src/Recorder.vala, + * src/Utils.vala: [955] Store file attributes in const variable + +2010-04-20 Sebastian Pölsterl + + * src/io/RecordingReader.vala, + * src/io/RecordingWriter.vala: Added. + + * Makefile.am, + * src/Recorder.vala, + * src/Recording.vala, + * src/RecordingsStore.vala: Modified. + + [954] Refactored reading and writing recordings file + +2010-04-19 Sebastian Pölsterl + + * src/Main.vala: [953] Load channels file in main method + + * 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 + + * Makefile.am: [950] Updated Makefile with new file locations + +2010-04-19 Sebastian Pölsterl + + * src/io: Added. + + * src/ChannelList.vala, + * src/Scanner.vala: Modified. + + * src/ChannelListReader.vala: Renamed to src/io/ChannelListReader.vala + and modified. + * src/ChannelListWriter.vala: Renamed to src/io/ChannelListWriter.vala + and modified. + + [949] Moved ChannelList(Reader|Writer) to io package dir. + Reimplemented read method. + +2010-04-17 Sebastian Pölsterl + + * client/totem-plugin/dvb-daemon.py: [948] Use gnome-dvb-daemon domain + for gettext and locale + +2010-04-13 Sebastian Pölsterl + + * configure.ac: [947] Post release version bump to 0.1.18 + +=== version-0.1.17 === +2010-04-13 Sebastian Pölsterl + + * NEWS: [946] Added release notes + + * 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 + +2010-04-12 Sebastian Pölsterl + + * client/gnomedvb/udev/_dvbudevmodule.c: [937] Check for NULL values + when retrieving informations about a device with udev; + https://launchpad.net/bugs/558806 fixed + +2010-04-11 Sebastian Pölsterl + + * vapi/cstuff.c, + * vapi/cstuff.h, + * vapi/cutils.vapi: [936] Added function for debugging using strace + +2010-04-09 Sebastian Pölsterl + + * src/Scanner.vala: [935] Use tuning parameters from initial tuning + data instead of NIT; https://launchpad.net/bugs/548738 fixed + + * client/gnomedvb/userdirs/__userdirsmodule.c: [934] Convert XDG user + dir path utf8; https://launchpad.net/bugs/558583 fixed + +2010-04-08 Sebastian Pölsterl + + * src/ChannelFactory.vala: [933] Fixed possibly unassigned local + variable error + + * src/Manager.vala, + * src/Recorder.vala, + * src/Scanner.vala: [932] Fixed uncaught DBus.Error warnings + + * src/Recorder.vala, + * src/Schedule.vala: [931] Catch SqlError + +2010-04-06 Sebastian Pölsterl + + * client/gnomedvb/ui/controlcenter/ControlCenterWindow.py: [930] Set + icon of gnome-dvb-control window to gnome-dvb-daemon + + * 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 + +2010-04-03 Sebastian Pölsterl + + * configure.ac: [926] Check if glib python module exists during + configure + +2010-04-03 Sebastian Pölsterl + + * 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. + + [925] 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: [924] Don't destroy scanner if error is posted on + bus; https://launchpad.net/bugs/540937 fixed + + Avoid scheduling start_scan timeout multiple times. + +2010-03-29 Sebastian Pölsterl + + * client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py: [923] Set + cursor to watch while reading list of antennas/providers; + https://launchpad.net/bugs/540948 fixed + +2010-03-27 Sebastian Pölsterl + + * client/gnomedvb/udev, + * client/gnomedvb/udev/__init__.py, + * client/gnomedvb/udev/_dvbudevmodule.c: Added. + + * client/gnomedvb/Makefile.am, + * configure.ac: Modified. + + [922] Added udev module to retrieve connected devices using gudev + +2010-03-23 Sebastian Pölsterl + + * src/Recorder.vala: [921] Call ChannelFactory.stop_channel if setting + pipeline to playing failed + +2010-03-22 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: [920] Updated pot file + + * 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 + +2010-03-18 Sebastian Pölsterl + + * po/gnome-dvb-daemon.pot: [916] Updated pot file + + * 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 + + * 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 + + * client/gnomedvb/ui/wizard/pages/ChannelScanPage.py: [913] Made + progressbar pulsing when fraction is not known, yet; + https://launchpad.net/bugs/540945 fixed + + * configure.ac: [912] Post release version bump to 0.1.17 + +=== version-0.1.16 === 2010-03-17 Sebastian Pölsterl * NEWS: [911] Added release notes diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/DBusWrapper.py gnome-dvb-daemon-0.1.21/client/gnomedvb/DBusWrapper.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/DBusWrapper.py 2010-01-14 22:09:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/DBusWrapper.py 2010-06-13 11:07:24.000000000 +0000 @@ -47,19 +47,15 @@ CHANNEL_LIST_IFACE = "org.gnome.DVB.ChannelList" SCHEDULE_IFACE = "org.gnome.DVB.Schedule" -HAL_MANAGER_IFACE = "org.freedesktop.Hal.Manager" -HAL_DEVICE_IFACE = "org.freedesktop.Hal.Device" -HAL_MANAGER_PATH = "/org/freedesktop/Hal/Manager" -HAL_SERVICE = "org.freedesktop.Hal" - def _default_error_handler_func(e): print >> sys.stderr, "Error: "+str(e) global_error_handler = _default_error_handler_func -def get_adapter_info(adapter): +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) @@ -82,32 +78,22 @@ pipeline.set_state(gst.STATE_NULL) return (success, info) -def get_dvb_devices(reply_handler, error_handler): - def find_devices_handler(objects): - deviceslist = [] - for o in objects: - proxy = bus.get_object(HAL_SERVICE, o) - dev = dbus.Interface(proxy, HAL_DEVICE_IFACE) - - dev_file = dev.GetProperty("linux.device_file") - - match = re.search("adapter(\d+?)/frontend(\d+?)", dev_file) - if match != None: - adapter = int(match.group(1)) - info = {} - info["adapter"] = adapter - info["frontend"] = int(match.group(2)) - deviceslist.append(info) - - reply_handler(deviceslist) +def get_dvb_devices(): + manager = DVBManagerClient() + devices = manager.get_devices() + + deviceslist = [] + for dev in devices: + match = re.search("adapter(\d+?)/frontend(\d+?)", dev["device_file"]) + if match != None: + adapter = int(match.group(1)) + info = {} + info["adapter"] = adapter + info["frontend"] = int(match.group(2)) + deviceslist.append(info) + + return deviceslist - bus = dbus.SystemBus() - # Get proxy object - proxy = bus.get_object(HAL_SERVICE, HAL_MANAGER_PATH) - # Apply the correct interace to the proxy object - halmanager = dbus.Interface(proxy, HAL_MANAGER_IFACE) - objects = halmanager.FindDeviceByCapability("dvb", reply_handler=find_devices_handler, error_handler=error_handler) - class DVBManagerClient(gobject.GObject): __gsignals__ = { @@ -172,6 +158,9 @@ def remove_channel_group(self, group_id, **kwargs): return self.manager.RemoveChannelGroup(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) @@ -256,6 +245,7 @@ "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): @@ -268,6 +258,7 @@ 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) def add_scanning_data(self, data, **kwargs): self.scanner.AddScanningData (*data, **kwargs) @@ -298,6 +289,9 @@ def on_destroyed(self): self.emit("destroyed") + + def on_frontend_stats(self, signal, snr): + self.emit("frontend-stats", signal, snr) class DVBRecordingsStoreClient(gobject.GObject): @@ -539,76 +533,4 @@ def is_scrambled(self, eid, **kwargs): return self.schedule.IsScrambled(eid, **kwargs) - -if __name__ == '__main__': - loop = gobject.MainLoop() - - channelsfile = "/home/sebp/.gstreamer-0.10/dvb-channels.conf" - #channelsfile = "/home/sebp/DVB/dvb-s-channels.conf" - recdir = "/home/sebp/TV" - - #a = [586000000, 0, 8, "8k", "2/3", "1/4", "QAM16", 4] - manager = DVBManagerClient () - #manager.add_device_to_new_group (0, 0, channelsfile, recdir) - #manager.add_device_to_existing_group (1, 0, 1) - - #pro7_sat = [12544000, "horizontal", 22000] - - #scanner = manager.get_scanner_for_device(0, 0) - #scanner.add_scanning_data(pro7_sat) - #scanner.run() - - def device_handler(dev_groups): - for dev_group in dev_groups: - print "Members", dev_group.get_members() - - rec = dev_group.get_recorder() - timers = rec.get_timers() - print timers - for tid in timers: - print "Start", rec.get_start_time(tid) - print "End", rec.get_end_time(tid) - print "Duration", rec.get_duration(tid) - - print rec.get_active_timers() - - print rec.add_timer(32, 2008, 7, 28, 23, 42, 2) - - channellist = dev_group.get_channel_list() - print "RADIO CHANNELS" - for channel_id in channellist.get_radio_channels(): - print "SID", channel_id - print "Name", channellist.get_channel_name(channel_id) - print "Network", channellist.get_channel_network(channel_id) - print - print "TV CHANNELS" - for channel_id in channellist.get_tv_channels(): - print "SID", channel_id - print "Name", channellist.get_channel_name(channel_id) - print "Network", channellist.get_channel_network(channel_id) - print "URL", channellist.get_channel_url(channel_id) - schedule = dev_group.get_schedule (channel_id) - event_now = schedule.now_playing() - print u"Now: %s" % schedule.get_name(event_now) - print u"\tDesc: %s" % schedule.get_short_description(event_now) - time = schedule.get_local_start_time(event_now) - if len(time) == 6: - print u"\tStart: %04d-%02d-%02d %02d:%02d:%02d" % (time[0], time[1], time[2], time[3], - time[4], time[5]) - print u"\tDuration: %s" % schedule.get_duration(event_now) - print - - recstore = DVBRecordingsStoreClient() - for rid in recstore.get_recordings(): - print "Channel", recstore.get_channel_name(rid) - print "Location", recstore.get_location(rid) - print "Start", recstore.get_start_time(rid) - print recstore.get_start_timestamp(rid) - print "Length", recstore.get_length(rid) - print "Name", recstore.get_name (rid) - print "Desc", recstore.get_description(rid) - - dev_groups = manager.get_registered_device_groups(reply_handler=device_handler, error_handler=global_error_handler) - - loop.run() diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/defs.py gnome-dvb-daemon-0.1.21/client/gnomedvb/defs.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/defs.py 2010-03-18 09:18:36.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/defs.py 2010-08-23 13:37:10.000000000 +0000 @@ -16,8 +16,8 @@ # You should have received a copy of the GNU General Public License # along with GNOME DVB Daemon. If not, see . -DATA_DIR = "/usr/local/share" -LIB_DIR = "/usr/local/lib" -VERSION = "0.1.16" +DATA_DIR = "/usr/share" +LIB_DIR = "/usr/lib" +VERSION = "0.1.21" PACKAGE = "gnome-dvb-daemon" -PYTHONDIR = "/usr/local/lib/python2.6/dist-packages" +PYTHONDIR = "/usr/lib/python2.6/dist-packages" diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/DVBModel.py gnome-dvb-daemon-0.1.21/client/gnomedvb/DVBModel.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/DVBModel.py 2009-11-14 11:26:03.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/DVBModel.py 2010-04-12 21:53:44.000000000 +0000 @@ -48,16 +48,12 @@ """ @returns: list of Device """ - def devices_handler(devices): - devs = [] - for info in devices: - dev = Device (0, "Unknown", info["adapter"], info["frontend"], - "Unknown") - devs.append(dev) - reply_handler(devs) - - gnomedvb.get_dvb_devices(reply_handler=devices_handler, - error_handler=error_handler) + devs = [] + for info in gnomedvb.get_dvb_devices(): + dev = Device (0, "Unknown", info["adapter"], info["frontend"], + "Unknown") + devs.append(dev) + reply_handler(devs) def get_unregistered_devices(self, reply_handler, error_handler=gnomedvb.global_error_handler): @@ -68,7 +64,8 @@ unregistered = set() for dev in devices: if dev not in registered: - success, info = gnomedvb.get_adapter_info(dev.adapter) + success, info = gnomedvb.get_adapter_info(dev.adapter, + dev.frontend) if success: dev.name = info["name"] dev.type = info["type"] diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/Makefile.in gnome-dvb-daemon-0.1.21/client/gnomedvb/Makefile.in --- gnome-dvb-daemon-0.1.16/client/gnomedvb/Makefile.in 2010-02-24 16:24:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -174,6 +174,8 @@ GST_CFLAGS = @GST_CFLAGS@ GST_INSPECT = @GST_INSPECT@ GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py 2010-01-14 22:09:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py 2010-04-06 18:48:17.000000000 +0000 @@ -114,6 +114,8 @@ self.help_eventbox.set_markup(self.create_group_text) else: self._select_first_group() + + gtk.window_set_default_icon_name("gnome-dvb-daemon") def __create_menu(self): ui = ''' diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/timers/TimerDialog.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/timers/TimerDialog.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/timers/TimerDialog.py 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/timers/TimerDialog.py 2010-06-05 10:42:50.000000000 +0000 @@ -28,7 +28,7 @@ class TimerDialog(gtk.Dialog): def __init__(self, parent, device_group, channel=None, - starttime=datetime.datetime.now(), duration=60): + starttime=None, duration=60): """ @param parent: Parent window @type parent: gtk.Window @@ -97,6 +97,9 @@ hbox = gtk.HBox(spacing=6) table.attach(hbox, 1, 2, 2, 3, yoptions=0) + + if starttime == None: + starttime = datetime.datetime.now() self.datetime_box = DateTimeBox(starttime) self.datetime_box.connect("changed", self._on_datetime_changed) diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/DateTime.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/DateTime.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/DateTime.py 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/DateTime.py 2010-06-05 10:44:31.000000000 +0000 @@ -29,7 +29,7 @@ "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int, int, int, int]), } - def __init__(self, dt=datetime.datetime.now()): + def __init__(self, dt=None): gtk.Window.__init__(self, type=gtk.WINDOW_POPUP) self.set_border_width(5) self.vbox = gtk.VBox(spacing=12) @@ -73,6 +73,8 @@ self.minute.set_width_chars(2) spinners_box.pack_start(self.minute) + if dt == None: + dt = datetime.datetime.now() self.set_date_and_time(dt.year, dt.month, dt.day, dt.hour, dt.minute) @@ -156,7 +158,7 @@ "changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [int, int, int, int, int]), } - def __init__(self, dt=datetime.datetime.now()): + def __init__(self, dt=None): gtk.Bin.__init__(self) self.hbox = gtk.HBox() @@ -169,6 +171,9 @@ arrow = gtk.Arrow(gtk.ARROW_DOWN, gtk.SHADOW_NONE) self.button.add(arrow) + if dt == None: + dt = datetime.datetime.now() + 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)) diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/SchedulePaned.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/SchedulePaned.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/SchedulePaned.py 2009-09-15 18:09:30.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/SchedulePaned.py 2010-05-23 09:37:30.000000000 +0000 @@ -66,14 +66,14 @@ if event_id != ScheduleStore.NEW_DAY: description = model[aiter][ScheduleStore.COL_SHORT_DESC] if description != None and len(description) > 0: - description += "\n" + description += "\n\n" # Check if row is the selected row ext_desc = model[aiter][ScheduleStore.COL_EXTENDED_DESC] if ext_desc == None: ext_desc = model.get_extended_description(aiter) model[aiter][ScheduleStore.COL_EXTENDED_DESC] = ext_desc - description += "\n%s" % ext_desc + description += ext_desc textbuffer = self.textview.get_buffer() textbuffer.set_text(description) diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/ScheduleStore.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/ScheduleStore.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/widgets/ScheduleStore.py 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/widgets/ScheduleStore.py 2010-05-23 09:32:10.000000000 +0000 @@ -100,7 +100,7 @@ def get_extended_description(self, aiter): if aiter != None: event_id = self[aiter][self.COL_EVENT_ID] - ext_desc = escape(self._client.get_extended_description(event_id)[0]) + ext_desc = self._client.get_extended_description(event_id)[0] self[aiter][self.COL_EXTENDED_DESC] = ext_desc return ext_desc diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/AdaptersPage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/AdaptersPage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/AdaptersPage.py 2009-12-21 11:37:40.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/AdaptersPage.py 2010-04-12 21:53:44.000000000 +0000 @@ -23,6 +23,7 @@ from gettext import gettext as _ from gnomedvb.ui.wizard import DVB_TYPE_TO_DESC from gnomedvb.ui.wizard.pages.BasePage import BasePage +from gnomedvb.ui.widgets.Frame import BaseFrame class AdaptersPage(BasePage): @@ -39,14 +40,14 @@ self.__model = model self._progressbar = None self.devicesview = None - self.scrolledview = None + self.frame = None # Name, Type Name, Type, adapter, frontend, registered self.deviceslist = gtk.ListStore(str, str, str, int, int, bool) def show_no_devices(self): - if self.scrolledview: - self.scrolledview.hide() + if self.frame: + self.frame.hide() text = "%s" % _('No devices have been found.') text += "\n\n" @@ -55,10 +56,8 @@ self._label.show() def show_devices(self): - text = _("Select the device you want to configure.") - self._label.set_markup (text) - self._label.show() - + self._label.hide() + if self.devicesview == None: self.devicesview = gtk.TreeView(self.deviceslist) self.devicesview.get_selection().connect("changed", @@ -76,20 +75,25 @@ col_type.add_attribute(cell_type, "text", 1) self.devicesview.append_column(col_type) - self.scrolledview = gtk.ScrolledWindow() - self.scrolledview.set_shadow_type(gtk.SHADOW_ETCHED_IN) - self.scrolledview.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolledview.add(self.devicesview) - self.scrolledview.show_all() - - self.pack_start(self.scrolledview) + scrolledview = gtk.ScrolledWindow() + scrolledview.set_shadow_type(gtk.SHADOW_ETCHED_IN) + scrolledview.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_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.devicesview.grab_focus() if len(self.deviceslist) == 1: self.emit("next-page") def show_all_configured(self): - if self.scrolledview: - self.scrolledview.hide() + if self.frame: + self.frame.hide() text = "%s" % _('All devices are already configured.') text += "\n\n" @@ -98,8 +102,8 @@ self._label.show() def show_error(self, error): - if self.scrolledview: - self.scrolledview.hide() + if self.frame: + self.frame.hide() text = "%s" % _('An error occured while retrieving devices.') text += "\n\n" @@ -169,7 +173,8 @@ error = None for dev in devices: if dev not in registered: - success, info = gnomedvb.get_adapter_info(dev.adapter) + success, info = gnomedvb.get_adapter_info(dev.adapter, + dev.frontend) if success: dev.name = info["name"] dev.type = info["type"] diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/BasePage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/BasePage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/BasePage.py 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/BasePage.py 2010-06-19 17:08:57.000000000 +0000 @@ -17,17 +17,20 @@ # along with GNOME DVB Daemon. If not, see . import gtk +from gnomedvb.ui.widgets.Frame import AlignedLabel class BasePage(gtk.VBox): def __init__(self): - gtk.VBox.__init__(self, False, 5) - self.set_border_width(5) - - self._label = gtk.Label() + gtk.VBox.__init__(self, spacing=6) + self.set_border_width(24) + + ali = AlignedLabel() + ali.show() + self.pack_start(ali, False, False) + + self._label = ali.get_label() self._label.set_line_wrap(True) - self.pack_start(self._label, False, padding=3) - self._label.show() def get_page_title(self): raise NotImplementedError diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py 2010-06-19 17:13:05.000000000 +0000 @@ -19,8 +19,10 @@ import gnomedvb import gtk import gobject +import glib from gettext import gettext as _ from gnomedvb.ui.wizard.pages.BasePage import BasePage +from gnomedvb.ui.widgets.Frame import TextFieldLabel from gnomedvb import global_error_handler class ChannelScanPage(BasePage): @@ -49,13 +51,16 @@ self._max_freqs = 0 self._scanned_freqs = 0 self._last_qsize = 0 + self._progressbar_timer = 0 self.set_spacing(12) self._theme = gtk.icon_theme_get_default() - - self._label.set_markup ( - _("Choose the channels you want to have in your list of channels. You can reorder the channels, too.") + + text = "%s\n%s" % ( + _("This process can take some time."), + _("You can select the channels you want to have in your list of channels.") ) + self._label.set_markup (text) actiongroup = gtk.ActionGroup('channels') actiongroup.add_actions([ @@ -73,6 +78,11 @@ topbox = gtk.VBox(spacing=6) self.pack_start(topbox) + + ali = TextFieldLabel() + label = ali.get_label() + label.set_markup_with_mnemonic(_("_Channels:")) + topbox.pack_start(ali, False) # Logo, Name, active, SID, scrambled self.tvchannels = gtk.ListStore(gtk.gdk.Pixbuf, str, bool, int, bool) @@ -80,6 +90,8 @@ 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")) @@ -104,23 +116,50 @@ topbox.pack_start(scrolledtvview) - self.scrambledbutton = gtk.CheckButton(_("Select scrambled channels")) + self.scrambledbutton = gtk.CheckButton(_("Select _scrambled channels")) self.scrambledbutton.set_active(True) self.scrambledbutton.connect("toggled", self.__on_select_encrypted_toggled) topbox.pack_start(self.scrambledbutton, False) + self.create_signal_box() + self.progressbar = gtk.ProgressBar() self.pack_start(self.progressbar, False) + + 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) + + label = TextFieldLabel(_("Signal quality:")) + self.progress_table.attach(label, 0, 1, 0, 1, xoptions=gtk.FILL) + + frame = gtk.Frame() + frame.set_shadow_type(gtk.SHADOW_NONE) + self.progress_table.attach(frame, 1, 2, 0, 1) + + 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) + + frame = gtk.Frame() + frame.set_shadow_type(gtk.SHADOW_NONE) + self.progress_table.attach(frame, 1, 2, 1, 2) + + self.signal_strength_bar = gtk.ProgressBar() + self.signal_strength_bar.set_size_request(-1, 10) + frame.add(self.signal_strength_bar) def get_scanner(self): return self._scanner def get_page_title(self): return _("Scanning for channels") - - def get_page_type(self): - return gtk.ASSISTANT_PAGE_PROGRESS - + def get_selected_channel_sids(self): return [row[self.COL_SID] for row in self.tvchannels if row[self.COL_ACTIVE]] @@ -136,7 +175,10 @@ self._scanner.connect ("frequency-scanned", self.__on_freq_scanned) self._scanner.connect ("channel-added", self.__on_channel_added) self._scanner.connect ("finished", self.__on_finished) + 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.show() if isinstance(tuning_data, str): @@ -148,6 +190,10 @@ self._scanner.run() else: self._scanner.destroy() + + def _progressbar_pulse(self): + self.progressbar.pulse() + return True def __on_channel_added(self, scanner, freq, sid, name, network, channeltype, scrambled): try: @@ -161,7 +207,7 @@ elif channeltype == "Radio": icon = self._theme.load_icon("audio-x-generic", 16, gtk.ICON_LOOKUP_USE_BUILTIN) - except gobject.GError: + except glib.GError: icon = None name = name.replace("&", "&") @@ -173,6 +219,7 @@ def __on_finished(self, scanner): self.progressbar.hide() + self.progress_table.hide() self.emit("finished", True) @@ -181,8 +228,15 @@ self._max_freqs += qsize - self._last_qsize + 1 self._scanned_freqs += 1 fraction = float(self._scanned_freqs) / self._max_freqs + # Stop progressbar from pulsing + if self._progressbar_timer > 0: + glib.source_remove(self._progressbar_timer) + self._progressbar_timer = 0 + self.progressbar.set_fraction(fraction) self._last_qsize = qsize + self.signal_strength_bar.set_fraction(0.0) + self.signal_quality_bar.set_fraction(0.0) def __on_active_toggled(self, renderer, path): aiter = self.tvchannels.get_iter(path) @@ -212,3 +266,7 @@ for row in self.tvchannels: row[self.COL_ACTIVE] = val + def __on_frontend_stats(self, scanner, signal, snr): + self.signal_quality_bar.set_fraction(snr) + self.signal_strength_bar.set_fraction(signal) + diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py 2010-04-13 09:50:17.000000000 +0000 @@ -20,10 +20,12 @@ import os.path import gtk import gobject +import glib import gettext import locale from gettext import gettext as _ 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", @@ -70,6 +72,7 @@ self.__adapter_info = None self.__page_title = None self.__tuning_data = self.NOT_LISTED + self.__data_dir = None def get_page_title(self): return self.__page_title @@ -90,7 +93,7 @@ self.__page_title = _("Country and antenna selection") elif info["type"] == "DVB-S": self.setup_dvb_s() - self.__page_title = _("Country and antenna selection") + self.__page_title = _("Satellite selection") elif info["type"] == "DVB-C": self.setup_dvb_c() self.__page_title = _("Country and provider selection") @@ -104,9 +107,9 @@ return self.__tuning_data def _create_table(self): - self.table = gtk.Table(rows=5, columns=2) + self.table = gtk.Table(rows=4, columns=2) self.table.set_row_spacings(6) - self.table.set_col_spacings(3) + self.table.set_col_spacings(18) self.table.show() self.pack_start(self.table) @@ -134,7 +137,7 @@ _("However, searching for channels will take considerably longer this way.")) self._label.set_markup(text) - self.providers_combo = None + self.providers_view = None countries = {self.NOT_LISTED: _("Not listed")} country_codes = ("at", "au", "be", "ch", "cz", "de", "dk", "es", "fi", "fr", @@ -146,10 +149,11 @@ self._create_table() - country = gtk.Label() - country.set_markup("%s" % _("Country:")) + country = TextFieldLabel() + label = country.get_label() + label.set_markup_with_mnemonic(_("_Country:")) country.show() - self.table.attach(country, 0, 1, 0, 1, yoptions=0) + self.table.attach(country, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL) # name, code self.countries = gtk.ListStore(str, str) @@ -160,52 +164,53 @@ self.countries.append([name, code]) self.country_combo = gtk.ComboBox(self.countries) - self.country_combo.connect('changed', self.on_country_changed, "dvb-t") + 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) self.country_combo.show() self.table.attach(self.country_combo, 1, 2, 0, 1, yoptions=0) self.country_combo.set_active(0) + label.set_mnemonic_widget(self.country_combo) - self.providers_label = gtk.Label() - self.providers_label.set_markup("%s" % _("Antenna:")) - self.providers_label.show() - self.table.attach(self.providers_label, 0, 1, 1, 2, yoptions=0) + providers = TextFieldLabel() + label = providers.get_label() + label.set_markup_with_mnemonic(_("_Antenna:")) + providers.show() + self.table.attach(providers, 0, 1, 1, 2, yoptions=0, xoptions=gtk.FILL) 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_combo = gtk.ComboBox(self.providers) - self.providers_combo.connect('changed', self.on_providers_changed) - cell = gtk.CellRendererText() - self.providers_combo.pack_start(cell) - self.providers_combo.add_attribute(cell, "text", 0) - self.providers_combo.show() - self.table.attach(self.providers_combo, 1, 2, 1, 2, yoptions=0) - self.providers_combo.set_sensitive(False) + 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) + + self.table.attach(scrolledview, 0, 2, 2, 3) + self.providers_view.set_sensitive(False) + def setup_dvb_s(self): - hbox = gtk.HBox(spacing=6) - hbox.show() - self.pack_start(hbox, False) - satellite = gtk.Label() - satellite.set_markup("%s" % _("Satellite:")) + satellite = TextFieldLabel() + label = satellite.get_label() + label.set_markup_with_mnemonic(_("_Satellite:")) satellite.show() - hbox.pack_start(satellite, False, False, 0) + self.pack_start(satellite, False, False, 0) self.satellites = gtk.ListStore(str, str) self.satellites.set_sort_column_id(0, gtk.SORT_ASCENDING) - self.satellite_combo = gtk.ComboBox(self.satellites) - self.satellite_combo.connect("changed", self.on_satellite_changed) - cell = gtk.CellRendererText() - self.satellite_combo.pack_start(cell) - self.satellite_combo.add_attribute(cell, "text", 0) - self.satellite_combo.show() - hbox.pack_start(self.satellite_combo, False, False, 0) + 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) self.read_satellites() @@ -218,10 +223,11 @@ self._create_table() - country = gtk.Label() - country.set_markup("%s" % _("Country:")) + country = TextFieldLabel() + label = country.get_label() + label.set_markup_with_mnemonic(_("_Country:")) country.show() - self.table.attach(country, 0, 1, 0, 1, yoptions=0) + 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) @@ -231,56 +237,99 @@ self.countries.append([name, code]) self.country_combo = gtk.ComboBox(self.countries) - self.country_combo.connect('changed', self.on_country_changed, "dvb-c") + 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) self.country_combo.show() self.table.attach(self.country_combo, 1, 2, 0, 1, yoptions=0) + label.set_mnemonic_widget(self.country_combo) - self.providers_label = gtk.Label() - self.providers_label.set_markup("%s" % _("Providers:")) - self.providers_label.show() - self.table.attach(self.providers_label, 0, 1, 1, 2, yoptions=0) + providers = TextFieldLabel() + label = providers.get_label() + label.set_markup_with_mnemonic(_("_Providers:")) + providers.show() + self.table.attach(providers, 0, 1, 1, 2, yoptions=0, xoptions=gtk.FILL) self.providers = gtk.ListStore(str, str) self.providers.set_sort_column_id(0, gtk.SORT_ASCENDING) - self.providers_combo = gtk.ComboBox(self.providers) - self.providers_combo.connect('changed', self.on_providers_changed) + 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) + + self.table.attach(scrolledview, 0, 2, 2, 3) + self.providers_view.set_sensitive(False) + + def _create_providers_treeview(self, providers, col_name): + providers_view = gtk.TreeView(providers) + providers_view.set_headers_visible(False) + col = gtk.TreeViewColumn(col_name) cell = gtk.CellRendererText() - self.providers_combo.pack_start(cell) - self.providers_combo.add_attribute(cell, "text", 0) - self.providers_combo.show() - self.table.attach(self.providers_combo, 1, 2, 1, 2, yoptions=0) - self.providers_combo.set_sensitive(False) - - def on_country_changed(self, combo, directory): + col.pack_start(cell) + col.add_attribute(cell, "markup", 0) + providers_view.append_column(col) + providers_view.show() + + 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.show() + + return providers_view, scrolledview + + def on_country_changed(self, combo): aiter = combo.get_active_iter() if aiter != None: selected_country = self.countries[aiter][1] if selected_country == self.NOT_LISTED: - if self.providers_combo: - self.providers_combo.set_sensitive(False) + if self.providers_view: + self.providers_view.set_sensitive(False) + self.emit("finished", True) else: + self.emit("finished", False) self.providers.clear() - self.providers.append([_("Don't know"), self.NOT_LISTED]) - for d in DVB_APPS_DIRS: - if os.access(d, os.F_OK | os.R_OK): - for f in os.listdir(os.path.join(d, directory)): - country, city = f.split('-', 1) - - if country == selected_country: - self.providers.append([city, os.path.join(d, directory, f)]) - - self.providers_combo.set_sensitive(True) - self.providers_combo.set_active(0) - self.emit("finished", True) + + toplevel_window = self.get_toplevel().window + toplevel_window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + + # Fill list async + glib.idle_add(self._fill_providers, selected_country) + + def _fill_providers(self, selected_country): + # Only DVB-T has bruteforce scan + if self.__adapter_info["type"] == "DVB-T": + self.providers.append([_("Don't know"), self.NOT_LISTED]) + + for d in DVB_APPS_DIRS: + if os.access(d, os.F_OK | os.R_OK): + for f in os.listdir(os.path.join(d, self.__data_dir)): + values = f.split('-', 1) + if len(values) != 2: + continue + country, city = values + + if country == selected_country: + self.providers.append([city, + os.path.join(d, self.__data_dir, f)]) + + self.providers_view.set_sensitive(True) + first_iter = self.providers.get_iter_first() + self.providers_view.get_selection().select_iter(first_iter) + + self.get_toplevel().window.set_cursor(None) + self.emit("finished", True) + + return False - def on_providers_changed(self, combo): - aiter = combo.get_active_iter() + def on_providers_changed(self, selection): + model, aiter = selection.get_selected() if aiter != None: self.__tuning_data = self.providers[aiter][1] @@ -292,8 +341,8 @@ for f in os.listdir(os.path.join(d, 'dvb-s')): self.satellites.append([f, os.path.join(d, 'dvb-s', f)]) - def on_satellite_changed(self, combo): - aiter = combo.get_active_iter() + def on_satellite_changed(self, selection): + model, aiter = selection.get_selected() if aiter != None: self.__tuning_data = self.satellites[aiter][1] @@ -302,7 +351,7 @@ def on_scan_all_toggled(self, checkbutton): state = not checkbutton.get_active() self.country_combo.set_sensitive(state) - self.providers_combo.set_sensitive(state) + self.providers_view.set_sensitive(state) self.add_brute_force_scan() self.emit("finished", not state) diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/IntroPage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/IntroPage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/IntroPage.py 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/IntroPage.py 2010-04-01 09:50:28.000000000 +0000 @@ -19,22 +19,27 @@ import gtk from gettext import gettext as _ from gnomedvb.ui.wizard.pages.BasePage import BasePage +from gnomedvb.ui.widgets.Frame import AlignedLabel class IntroPage(BasePage): def __init__(self): BasePage.__init__(self) - self.set_border_width(5) - text = _('Welcome to the digital television Assistant.') - text += "\n" - text += _('It will automatically configure your devices and search for channels, if necessary.') - text += "\n\n" - text += _("Click \"Forward\" to begin.") - self._label.set_text(text) - self.set_child_packing(self._label, True, True, 0, gtk.PACK_START) + text = "%s" % _('Welcome to the digital television Assistant.') + 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) + + 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(label=_('_Expert mode')) self.pack_start(self.expert_mode, False, False, 0) def get_page_title(self): diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/SummaryPage.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/SummaryPage.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/pages/SummaryPage.py 2010-03-17 19:06:51.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/pages/SummaryPage.py 2010-04-01 09:50:28.000000000 +0000 @@ -19,12 +19,18 @@ import gtk from gettext import gettext as _ 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.set_line_wrap(True) + button_alignment = gtk.Alignment(xalign=0.5) self.pack_start(button_alignment, False) @@ -42,7 +48,7 @@ text = "%s" % (_("The device %s has been configured sucessfully.") % name) else: text = "%s" % (_("Failed configuring device %s.") % name) - text += "\n%s" % details - self._label.set_markup(text) - + + self._details_label.set_markup(details) + diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/SetupWizard.py gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/SetupWizard.py --- gnome-dvb-daemon-0.1.16/client/gnomedvb/ui/wizard/SetupWizard.py 2010-03-17 19:06:51.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/ui/wizard/SetupWizard.py 2010-05-27 14:20:40.000000000 +0000 @@ -16,6 +16,7 @@ # 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 _ @@ -29,6 +30,31 @@ from gnomedvb.ui.wizard.pages.SummaryPage import SummaryPage from gnomedvb.ui.wizard.pages.SetupDevicePage import SetupDevicePage +class CloseDialog(gtk.Dialog): + + def __init__(self, parent=None): + gtk.Dialog.__init__(self, title="", + parent=parent, + flags=gtk.DIALOG_DESTROY_WITH_PARENT) + + self.set_border_width(5) + self.set_has_separator(False) + self.vbox.set_spacing(6) + + label = gtk.Label(_("Cleaning up. This may take a while.")) + label.show() + self.vbox.pack_start(label, False) + + self.progressbar = gtk.ProgressBar() + self.progressbar.set_pulse_step(0.1) + self._progressbar_timer = glib.timeout_add(100, self._progressbar_pulse) + self.progressbar.show() + self.vbox.pack_start(self.progressbar, False) + + def _progressbar_pulse(self): + self.progressbar.pulse() + return True + class SetupWizard(gtk.Assistant): (INTRO_PAGE, @@ -53,7 +79,6 @@ self.connect ('prepare', self.on_prepare) self.set_forward_page_func(self.page_func) self.set_default_size(500, 400) - self.set_border_width(4) self.set_title(_("Setup digital TV")) self.intro_page = IntroPage() @@ -85,6 +110,18 @@ self.summary_page.configure_button.connect("clicked", 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 + + gtk.window_set_default_icon_name("gnome-dvb-setup") def append_page(self, page): gtk.Assistant.append_page(self, page) @@ -117,6 +154,7 @@ self.__ask_on_exit = False if self.__expert_mode: summary = _('The generated channels file can be used to configure your devices in the control center.') + success = True else: success, summary = self.setup_page.get_summary() page.set_device_name_and_details(self.__adapter_info["name"], @@ -166,16 +204,22 @@ response = dialog.run() if response == gtk.RESPONSE_YES: - if scanner != None: - scanner.destroy() - gtk.main_quit() - elif response == gtk.RESPONSE_NO: dialog.destroy() - + self.destroy_scanner(scanner) + else: + dialog.destroy() + return True else: - if scanner != None: - scanner.destroy() + self.destroy_scanner(scanner) + + def destroy_scanner(self, scanner): + if scanner != None: + scanner.destroy(reply_handler=gtk.main_quit, + error_handler=gnomedvb.global_error_handler) + close_dialog = CloseDialog(self) + close_dialog.show() + else: gtk.main_quit() def on_next_page(self, adapters_page): diff -Nru gnome-dvb-daemon-0.1.16/client/gnomedvb/userdirs/__userdirsmodule.c gnome-dvb-daemon-0.1.21/client/gnomedvb/userdirs/__userdirsmodule.c --- gnome-dvb-daemon-0.1.16/client/gnomedvb/userdirs/__userdirsmodule.c 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/gnomedvb/userdirs/__userdirsmodule.c 2010-04-09 12:37:14.000000000 +0000 @@ -14,35 +14,49 @@ /* Function Mapping Table */ static PyMethodDef py__userdirs_functions[] = { - { "get_xdg_user_dir", userdirs_get_xdg_user_dir, 0, "" }, - { NULL, NULL, 0, NULL } + { "get_xdg_user_dir", userdirs_get_xdg_user_dir, 0, "" }, + { NULL, NULL, 0, NULL } }; PyMODINIT_FUNC init__userdirs (void) { - PyObject* m; + PyObject* m; - m = Py_InitModule ("__userdirs", py__userdirs_functions); - userdirs_register_constants (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"); + PyErr_SetString (PyExc_TypeError, "The first argument must be an integer"); return NULL; - } else { - const gchar *dir = g_get_user_special_dir ((GUserDirectory) PyInt_AsLong (directory)); + } - if (dir) { - return PyString_FromString (dir); - } else { - Py_INCREF (Py_None); - return Py_None; - } + 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 diff -Nru gnome-dvb-daemon-0.1.16/client/Makefile.in gnome-dvb-daemon-0.1.21/client/Makefile.in --- gnome-dvb-daemon-0.1.16/client/Makefile.in 2010-02-24 16:24:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -165,6 +165,8 @@ GST_CFLAGS = @GST_CFLAGS@ GST_INSPECT = @GST_INSPECT@ GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -377,7 +379,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -402,7 +404,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru gnome-dvb-daemon-0.1.16/client/totem-plugin/dvb-daemon.py gnome-dvb-daemon-0.1.21/client/totem-plugin/dvb-daemon.py --- gnome-dvb-daemon-0.1.16/client/totem-plugin/dvb-daemon.py 2010-01-14 22:09:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/totem-plugin/dvb-daemon.py 2010-08-23 11:45:08.000000000 +0000 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2008,2009 Sebastian Pölsterl +# Copyright (C) 2008-2010 Sebastian Pölsterl # # This file is part of GNOME DVB Daemon. # @@ -31,6 +31,9 @@ import gnomedvb import sys from cgi import escape +import gettext +from gettext import gettext as _ +import locale from gnomedvb import global_error_handler from gnomedvb.DVBModel import DVBModel @@ -251,11 +254,40 @@ def activate (self, totem_object): self.totem_object = totem_object - self.setup = DvbSetup() - + + gettext.textdomain('gnome-dvb-daemon') + locale.textdomain('gnome-dvb-daemon') + + self.monitor_bus() + + try: + self.construct() + except dbus.DBusException: + print >> sys.stderr, "Failed activating DVB DBus service" + 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) + + def construct(self): self.manager = DVBModel() - self.recentmanager = gtk.recent_manager_get_default() + self.setup = DvbSetup() + self.manager.get_all_devices(lambda devs: self.enable_dvb_support(len(devs) > 0)) def enable_dvb_support(self, val): @@ -471,8 +503,7 @@ def _on_action_preferences(self, action): prefs = Preferences(self.manager, self.totem_object.get_main_window()) - prefs.run() - prefs.destroy() + prefs.show() def _on_action_delete(self, action): model, aiter = self.channels_view.get_selection().get_selected() @@ -515,21 +546,6 @@ 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) - # Totem adds the URL to recent manager, remove it again - try: - self.recentmanager.remove_item (url) - except GError, e: - print >> sys.stderr, \ - "Error removing recently used item: %s" % str(e) - success = self.recentmanager.add_full (url, - {"display_name": model[aiter][model.COL_NAME], - "app_name": _("Totem Movie Player"), - "app_exec": "totem %u", - "mime_type": "video", - "groups": ("Totem", "gnome-dvb-daemon",)}) - if not success: - print >> sys.stderr, \ - "Error adding recently used item" elif event.button == 3: # right click button x = int(event.x) diff -Nru gnome-dvb-daemon-0.1.16/client/totem-plugin/Makefile.in gnome-dvb-daemon-0.1.21/client/totem-plugin/Makefile.in --- gnome-dvb-daemon-0.1.16/client/totem-plugin/Makefile.in 2010-02-24 16:24:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/client/totem-plugin/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -126,6 +126,8 @@ GST_CFLAGS = @GST_CFLAGS@ GST_INSPECT = @GST_INSPECT@ GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff -Nru gnome-dvb-daemon-0.1.16/compile gnome-dvb-daemon-0.1.21/compile --- gnome-dvb-daemon-0.1.16/compile 2010-02-24 16:24:18.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/compile 2010-08-23 13:37:02.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2009-04-28.21; # UTC +scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. @@ -124,9 +124,9 @@ ret=$? if test -f "$cofile"; then - mv "$cofile" "$ofile" + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" diff -Nru gnome-dvb-daemon-0.1.16/config.guess gnome-dvb-daemon-0.1.21/config.guess --- gnome-dvb-daemon-0.1.16/config.guess 2010-02-24 16:24:18.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/config.guess 2010-08-23 13:37:02.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 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-06-10' # 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 @@ -170,7 +170,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -822,6 +822,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -882,40 +885,17 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -947,7 +927,7 @@ EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -1001,14 +981,6 @@ elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -1074,7 +1046,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1154,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff -Nru gnome-dvb-daemon-0.1.16/config.sub gnome-dvb-daemon-0.1.21/config.sub --- gnome-dvb-daemon-0.1.16/config.sub 2010-02-24 16:24:18.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/config.sub 2010-08-23 13:37:02.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 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,6 +153,9 @@ os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -467,6 +470,10 @@ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -1260,7 +1267,7 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1613,7 +1620,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff -Nru gnome-dvb-daemon-0.1.16/configure gnome-dvb-daemon-0.1.21/configure --- gnome-dvb-daemon-0.1.16/configure 2010-02-24 16:24:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/configure 2010-08-23 13:37:02.000000000 +0000 @@ -1,12 +1,14 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for gnome-dvb-daemon 0.1.16. +# Generated by GNU Autoconf 2.65 for gnome-dvb-daemon 0.1.21. # # Report bugs to . # +# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -675,8 +677,69 @@ +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -698,8 +761,8 @@ # Identity of this package. PACKAGE_NAME='gnome-dvb-daemon' PACKAGE_TARNAME='gnome-dvb-daemon' -PACKAGE_VERSION='0.1.16' -PACKAGE_STRING='gnome-dvb-daemon 0.1.16' +PACKAGE_VERSION='0.1.21' +PACKAGE_STRING='gnome-dvb-daemon 0.1.21' PACKAGE_BUGREPORT='https://bugs.launchpad.net/gnome-dvb-daemon' PACKAGE_URL='http://live.gnome.org/DVBDaemon' @@ -766,6 +829,8 @@ ENABLE_TOTEM_FALSE ENABLE_TOTEM_TRUE GST_INSPECT +GUDEV_LIBS +GUDEV_CFLAGS GLIB_LIBS GLIB_CFLAGS GNOME_DVB_DAEMON_LIBS @@ -958,6 +1023,8 @@ GNOME_DVB_DAEMON_LIBS GLIB_CFLAGS GLIB_LIBS +GUDEV_CFLAGS +GUDEV_LIBS DBUS_CFLAGS DBUS_LIBS' @@ -1501,7 +1568,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.16 to adapt to many kinds of systems. +\`configure' configures gnome-dvb-daemon 0.1.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1572,7 +1639,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnome-dvb-daemon 0.1.16:";; + short | recursive ) echo "Configuration of gnome-dvb-daemon 0.1.21:";; esac cat <<\_ACEOF @@ -1609,7 +1676,7 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility @@ -1621,6 +1688,9 @@ linker flags for GNOME_DVB_DAEMON, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config + 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 @@ -1691,8 +1761,8 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnome-dvb-daemon configure 0.1.16 -generated by GNU Autoconf 2.64 +gnome-dvb-daemon configure 0.1.21 +generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1739,7 +1809,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1785,7 +1855,7 @@ # 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;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1853,7 +1923,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1895,7 +1965,7 @@ fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2062,8 +2132,8 @@ 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.16, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by gnome-dvb-daemon $as_me 0.1.21, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2316,7 +2386,7 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 @@ -2325,9 +2395,9 @@ done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2750,6 +2820,7 @@ fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2757,7 +2828,6 @@ # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -2874,7 +2944,7 @@ # Define the identity of the package. PACKAGE='gnome-dvb-daemon' - VERSION='0.1.16' + VERSION='0.1.21' cat >>confdefs.h <<_ACEOF @@ -3272,32 +3342,30 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3359,10 +3427,10 @@ else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -3370,51 +3438,18 @@ { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $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 run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3447,13 +3482,72 @@ as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $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 run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +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 : @@ -4042,8 +4136,8 @@ -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -4714,13 +4808,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4717: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4811: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4720: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4814: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4723: output\"" >&5) + (eval echo "\"\$as_me:4817: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5186,7 +5280,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5926,7 +6020,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5929 "configure"' > conftest.$ac_ext + echo '#line 6023 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7455,11 +7549,11 @@ -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:7458: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7552: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7462: \$? = $ac_status" >&5 + echo "$as_me:7556: \$? = $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. @@ -7624,7 +7718,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -7794,11 +7888,11 @@ -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:7797: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7891: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7801: \$? = $ac_status" >&5 + echo "$as_me:7895: \$? = $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. @@ -7899,11 +7993,11 @@ -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:7902: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7996: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7906: \$? = $ac_status" >&5 + echo "$as_me:8000: \$? = $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 @@ -7954,11 +8048,11 @@ -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:7957: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8051: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7961: \$? = $ac_status" >&5 + echo "$as_me:8055: \$? = $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 @@ -8097,6 +8191,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -8188,7 +8283,7 @@ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9650,7 +9745,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10337,7 +10432,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10340 "configure" +#line 10435 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10433,7 +10528,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10436 "configure" +#line 10531 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10688,7 +10783,6 @@ done IFS=$as_save_IFS - test -z "$ac_cv_path_VALAC" && ac_cv_path_VALAC="valac" ;; esac fi @@ -10702,6 +10796,33 @@ fi + if test -z "$VALAC"; then : + { $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.9.1"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $VALAC is at least version 0.9.1" >&5 +$as_echo_n "checking $VALAC is at least version 0.9.1... " >&6; } + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + as_arg_v1=0.9.1 +as_arg_v2="$am__vala_version" +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 0) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 2) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error "Vala 0.9.1 not found." "$LINENO" 5 ;; #( + *) : + ;; +esac +fi +fi @@ -12492,6 +12613,99 @@ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUDEV" >&5 +$as_echo_n "checking for GUDEV... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GUDEV_CFLAGS"; then + pkg_cv_GUDEV_CFLAGS="$GUDEV_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gudev-1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GUDEV_CFLAGS=`$PKG_CONFIG --cflags "gudev-1.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GUDEV_LIBS"; then + pkg_cv_GUDEV_LIBS="$GUDEV_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gudev-1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GUDEV_LIBS=`$PKG_CONFIG --libs "gudev-1.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +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 + GUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gudev-1.0"` + else + GUDEV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gudev-1.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GUDEV_PKG_ERRORS" >&5 + + as_fn_error "Package requirements (gudev-1.0) were not met: + +$GUDEV_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 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}: 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 GUDEV_CFLAGS +and GUDEV_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 + GUDEV_CFLAGS=$pkg_cv_GUDEV_CFLAGS + GUDEV_LIBS=$pkg_cv_GUDEV_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + + + + gst010_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10` GST_INSPECT="$gst010_toolsdir/gst-inspect-0.10" @@ -12907,6 +13121,14 @@ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac fi @@ -12937,6 +13159,14 @@ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac fi @@ -13073,6 +13303,44 @@ +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 { as_var=py_cv_mod_$py_mod_var; eval "test \"\${$as_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; } @@ -13263,7 +13531,7 @@ fi -ac_config_files="$ac_config_files Makefile client/Makefile client/gnomedvb/defs.py client/gnomedvb/Makefile client/totem-plugin/Makefile data/Makefile po/Makefile.in" +ac_config_files="$ac_config_files Makefile client/Makefile client/gnomedvb/defs.py client/gnomedvb/Makefile client/totem-plugin/Makefile data/Makefile data/gnome-dvb-control.desktop.in data/gnome-dvb-setup.desktop.in data/icons/Makefile po/Makefile.in" cat >confcache <<\_ACEOF @@ -13799,8 +14067,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.16, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by gnome-dvb-daemon $as_me 0.1.21, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13840,6 +14108,7 @@ -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -13863,10 +14132,11 @@ _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.16 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +gnome-dvb-daemon config.status 0.1.21 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -13904,6 +14174,8 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -14251,6 +14523,9 @@ "client/gnomedvb/Makefile") CONFIG_FILES="$CONFIG_FILES client/gnomedvb/Makefile" ;; "client/totem-plugin/Makefile") CONFIG_FILES="$CONFIG_FILES client/totem-plugin/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/gnome-dvb-control.desktop.in") CONFIG_FILES="$CONFIG_FILES data/gnome-dvb-control.desktop.in" ;; + "data/gnome-dvb-setup.desktop.in") CONFIG_FILES="$CONFIG_FILES data/gnome-dvb-setup.desktop.in" ;; + "data/icons/Makefile") CONFIG_FILES="$CONFIG_FILES data/icons/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; @@ -14356,7 +14631,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -14370,7 +14645,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p diff -Nru gnome-dvb-daemon-0.1.16/configure.ac gnome-dvb-daemon-0.1.21/configure.ac --- gnome-dvb-daemon-0.1.16/configure.ac 2010-02-23 13:26:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/configure.ac 2010-06-21 19:32:55.000000000 +0000 @@ -1,12 +1,12 @@ AC_PREREQ(2.63.2) -AC_INIT([gnome-dvb-daemon], [0.1.16], +AC_INIT([gnome-dvb-daemon], [0.1.21], [https://bugs.launchpad.net/gnome-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.10 subdir-objects dist-bzip2]) +AM_INIT_AUTOMAKE([1.11 subdir-objects dist-bzip2]) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) @@ -16,8 +16,7 @@ LT_PREREQ([2.2.6]) LT_INIT([disable-static]) -AC_PATH_PROG(VALAC, valac, valac) -AC_SUBST(VALAC) +AM_PROG_VALAC([0.9.1]) AH_TEMPLATE([GETTEXT_PACKAGE], [gnome-dvb-daemon]) GETTEXT_PACKAGE=gnome-dvb-daemon @@ -81,6 +80,10 @@ AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +PKG_CHECK_MODULES(GUDEV, gudev-1.0) +AC_SUBST(GUDEV_CFLAGS) +AC_SUBST(GUDEV_LIBS) + AG_GST_CHECK_GST_INSPECT AG_GST_CHECK_MODULE_BAD([mpegtsparse]) AG_GST_CHECK_MODULE_BAD([dvbbasebin]) @@ -144,6 +147,7 @@ dnl ****************** dnl * Python modules dnl ***************** +AM_CHECK_PYMOD(glib) AM_CHECK_PYMOD(gobject) AM_CHECK_PYMOD(gtk) AM_CHECK_PYMOD(dbus) @@ -157,6 +161,9 @@ client/gnomedvb/Makefile client/totem-plugin/Makefile data/Makefile + data/gnome-dvb-control.desktop.in + data/gnome-dvb-setup.desktop.in + data/icons/Makefile po/Makefile.in]) AC_OUTPUT diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop 2010-08-23 13:37:15.000000000 +0000 @@ -0,0 +1,30 @@ +[Desktop Entry] +Version=1.0 +Name=Digital TV Control Center +Name[cs]=Ovládací centrum digitální TV +Name[de]=Digital Fernsehen Kontrollzentrum +Name[en_GB]=Digital TV Control Centre +Name[es]=Centro de control digial TV +Name[fi]=Digitaalisen TV:n ohjauskeskus +Name[fr]=Centre de contrôle DVB +Name[it]=Centro controllo TV digitale +Name[pl]=Centrum Sterowania Cyfrowej TV +Name[pt_BR]=Painel de Controle de TV Digital +Name[sv]=Kontrollcenter för digital-tv +Comment=Schedule recordings and browse program guide +Comment[cs]=Plánování nahrávání a prohlížení programového průvodce +Comment[de]=Aufnahmen planen und Programmführer durchsuchen +Comment[en_GB]=Schedule recordings and browse programme guide +Comment[es]=Programa grabaciones y navega la guía de programación +Comment[fi]=Ajasta tallenteita ja selaa ohjelmaopasta +Comment[fr]=Plannifier les enregistrements et voir le programme TV +Comment[it]=Programma registrazioni e sfoglia la guida ai programmi +Comment[pl]=Zaprogramuj nagrania i przeglądaj przewodnik programowy +Comment[pt_BR]=Agendar gravações e procurar por guia de programação +Comment[sv]=Schemalägg inspelningar och bläddra i tv-tablån +Exec=gnome-dvb-control +Icon=gnome-dvb-daemon +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;Recorder; diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop.in gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop.in --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop.in 2010-08-23 13:37:10.000000000 +0000 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Digital TV Control Center +_Comment=Schedule recordings and browse program guide +Exec=gnome-dvb-control +Icon=gnome-dvb-daemon +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;Recorder; diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop.in.in gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop.in.in --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-control.desktop.in.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-control.desktop.in.in 2010-04-03 18:03:48.000000000 +0000 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Digital TV Control Center +_Comment=Schedule recordings and browse program guide +Exec=gnome-dvb-control +Icon=gnome-dvb-daemon +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;Recorder; diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop 2010-08-23 13:37:15.000000000 +0000 @@ -0,0 +1,33 @@ +[Desktop Entry] +Version=1.0 +Name=Digital TV Setup +Name[cs]=Nastavení digitální TV +Name[de]=Digital Fernsehen Einstellungen +Name[en_GB]=Digital TV Setup +Name[es]=Ajustes de televisión digital +Name[fi]=Digi-TV:n asetukset +Name[fr]=Réglage DVB +Name[it]=Configurazione TV digitale +Name[pl]=Ustawienia Cyfrowej TV +Name[pt_BR]=Configurar TV Digital +Name[sv]=Konfigurera digital-tv +Comment=Setup digital TV +Comment[ar]=إعداد التلفاز الرقمي +Comment[cs]=Nastavit digitální TV +Comment[da]=Opsætning af digitalt tv +Comment[de]=Digitales Fernsehen einrichten +Comment[en_GB]=Setup digital TV +Comment[es]=Configurar la TV digital +Comment[fi]=Asenna digi-TV +Comment[fr]=Réglage TV numérique +Comment[it]=Configura TV digitale +Comment[pl]=Skonfiguruj telewizję cyfrową +Comment[pt_BR]=Configurar TV digital +Comment[sv]=Konfigurera digital-tv +Comment[tr]=Dijital TV kurulumu +Exec=gnome-dvb-setup +Icon=gnome-dvb-setup +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;HardwareSettings; diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop.in gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop.in --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop.in 2010-08-23 13:37:10.000000000 +0000 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Digital TV Setup +_Comment=Setup digital TV +Exec=gnome-dvb-setup +Icon=gnome-dvb-setup +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;HardwareSettings; diff -Nru gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop.in.in gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop.in.in --- gnome-dvb-daemon-0.1.16/data/gnome-dvb-setup.desktop.in.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/gnome-dvb-setup.desktop.in.in 2010-04-01 09:50:29.000000000 +0000 @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +_Name=Digital TV Setup +_Comment=Setup digital TV +Exec=gnome-dvb-setup +Icon=gnome-dvb-setup +StartupNotify=false +Terminal=false +Type=Application +Categories=GNOME;GTK;AudioVideo;TV;HardwareSettings; Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_16x16_gnome-dvb-daemon.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_16x16_gnome-dvb-daemon.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_16x16_gnome-dvb-setup.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_16x16_gnome-dvb-setup.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_22x22_gnome-dvb-daemon.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_22x22_gnome-dvb-daemon.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_22x22_gnome-dvb-setup.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_22x22_gnome-dvb-setup.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_24x24_gnome-dvb-daemon.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_24x24_gnome-dvb-daemon.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_24x24_gnome-dvb-setup.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_24x24_gnome-dvb-setup.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_32x32_gnome-dvb-daemon.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_32x32_gnome-dvb-daemon.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_32x32_gnome-dvb-setup.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_32x32_gnome-dvb-setup.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_48x48_gnome-dvb-daemon.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_48x48_gnome-dvb-daemon.png differ Binary files /tmp/W6pj7wRyDN/gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_48x48_gnome-dvb-setup.png and /tmp/q69FSzRrs8/gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_48x48_gnome-dvb-setup.png differ diff -Nru gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg --- gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_scalable_gnome-dvb-daemon.svg 2010-04-03 12:34:22.000000000 +0000 @@ -0,0 +1,825 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg --- gnome-dvb-daemon-0.1.16/data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/icons/hicolor_apps_scalable_gnome-dvb-setup.svg 2010-04-03 17:50:12.000000000 +0000 @@ -0,0 +1,1527 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru gnome-dvb-daemon-0.1.16/data/icons/Makefile.am gnome-dvb-daemon-0.1.21/data/icons/Makefile.am --- gnome-dvb-daemon-0.1.16/data/icons/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/icons/Makefile.am 2010-04-03 12:58:43.000000000 +0000 @@ -0,0 +1,65 @@ +NULL = + +public_icons_themes = \ + hicolor \ + $(NULL) + +public_icons = \ + hicolor_apps_16x16_gnome-dvb-daemon.png \ + hicolor_apps_22x22_gnome-dvb-daemon.png \ + hicolor_apps_24x24_gnome-dvb-daemon.png \ + hicolor_apps_32x32_gnome-dvb-daemon.png \ + hicolor_apps_48x48_gnome-dvb-daemon.png \ + hicolor_apps_scalable_gnome-dvb-daemon.svg \ + hicolor_apps_16x16_gnome-dvb-setup.png \ + hicolor_apps_22x22_gnome-dvb-setup.png \ + hicolor_apps_24x24_gnome-dvb-setup.png \ + hicolor_apps_32x32_gnome-dvb-setup.png \ + hicolor_apps_48x48_gnome-dvb-setup.png \ + hicolor_apps_scalable_gnome-dvb-setup.svg \ + $(NULL) + +EXTRA_DIST = \ + $(public_icons) \ + $(NULL) + +############################################################################### + +gtk_update_icon_cache = gtk-update-icon-cache -f -t + +update-icon-cache: + @-if test -z "$(DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + for theme in $(public_icons_themes); do \ + $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \ + done; \ + else \ + echo "*** Icon cache not updated. After (un)install, run this:"; \ + for theme in $(public_icons_themes); do \ + echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \ + done; \ + fi + +install-icons: + for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ + $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done; + +uninstall-icons: + -for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done; + +install-data-local: install-icons update-icon-cache + +uninstall-local: uninstall-icons update-icon-cache + diff -Nru gnome-dvb-daemon-0.1.16/data/icons/Makefile.in gnome-dvb-daemon-0.1.21/data/icons/Makefile.in --- gnome-dvb-daemon-0.1.16/data/icons/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/icons/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -0,0 +1,477 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = data/icons +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gstreamer.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +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 = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +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@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOME_DVB_DAEMON_CFLAGS = @GNOME_DVB_DAEMON_CFLAGS@ +GNOME_DVB_DAEMON_LIBS = @GNOME_DVB_DAEMON_LIBS@ +GREP = @GREP@ +GST_CFLAGS = @GST_CFLAGS@ +GST_INSPECT = @GST_INSPECT@ +GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYTHON = @PYTHON@ +PYTHONDIR = @PYTHONDIR@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TOTEM_PLUGIN_DIR = @TOTEM_PLUGIN_DIR@ +USE_NLS = @USE_NLS@ +VALAC = @VALAC@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +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@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +public_icons_themes = \ + hicolor \ + $(NULL) + +public_icons = \ + hicolor_apps_16x16_gnome-dvb-daemon.png \ + hicolor_apps_22x22_gnome-dvb-daemon.png \ + hicolor_apps_24x24_gnome-dvb-daemon.png \ + hicolor_apps_32x32_gnome-dvb-daemon.png \ + hicolor_apps_48x48_gnome-dvb-daemon.png \ + hicolor_apps_scalable_gnome-dvb-daemon.svg \ + hicolor_apps_16x16_gnome-dvb-setup.png \ + hicolor_apps_22x22_gnome-dvb-setup.png \ + hicolor_apps_24x24_gnome-dvb-setup.png \ + hicolor_apps_32x32_gnome-dvb-setup.png \ + hicolor_apps_48x48_gnome-dvb-setup.png \ + hicolor_apps_scalable_gnome-dvb-setup.svg \ + $(NULL) + +EXTRA_DIST = \ + $(public_icons) \ + $(NULL) + + +############################################################################### +gtk_update_icon_cache = gtk-update-icon-cache -f -t +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/icons/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/icons/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +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) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.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-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-local + + +update-icon-cache: + @-if test -z "$(DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + for theme in $(public_icons_themes); do \ + $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \ + done; \ + else \ + echo "*** Icon cache not updated. After (un)install, run this:"; \ + for theme in $(public_icons_themes); do \ + echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \ + done; \ + fi + +install-icons: + for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ + $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done; + +uninstall-icons: + -for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done; + +install-data-local: install-icons update-icon-cache + +uninstall-local: uninstall-icons update-icon-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. +.NOEXPORT: diff -Nru gnome-dvb-daemon-0.1.16/data/Makefile.am gnome-dvb-daemon-0.1.21/data/Makefile.am --- gnome-dvb-daemon-0.1.16/data/Makefile.am 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/Makefile.am 2010-08-11 12:58:59.000000000 +0000 @@ -1,13 +1,30 @@ +SUBDIRS = icons + +desktopdir = $(datadir)/applications +desktop_in_files = \ + gnome-dvb-control.desktop.in \ + gnome-dvb-setup.desktop.in \ + $(NULL) +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ + # Dbus service file dbusservicedir = $(DBUS_SERVICES_DIR) dbusservice_in_files = \ org.gnome.DVB.service.in \ - org.gnome.UPnP.MediaServer1.DVBDaemon.service.in + org.gnome.UPnP.MediaServer1.DVBDaemon.service.in \ + org.gnome.UPnP.MediaServer2.DVBDaemon.service.in dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) # Rule to make the service file with bindir expanded $(dbusservice_DATA): %.service: %.service.in - sed -e "s|\@bindir\@|$(bindir)|" $< > $@ + $(AM_V_at)sed -e "s|\@bindir\@|$(bindir)|" $< > $@ + +CLEANFILES = \ + $(dbusservice_DATA) \ + $(desktop_DATA) -CLEANFILES = $(dbusservice_DATA) -EXTRA_DIST = $(dbusservice_in_files) +EXTRA_DIST = \ + $(dbusservice_in_files) \ + $(desktop_in_files) \ + $(desktop_DATA) diff -Nru gnome-dvb-daemon-0.1.16/data/Makefile.in gnome-dvb-daemon-0.1.21/data/Makefile.in --- gnome-dvb-daemon-0.1.16/data/Makefile.in 2010-02-24 16:24:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -35,7 +35,9 @@ build_triplet = @build@ host_triplet = @host@ subdir = data -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gnome-dvb-control.desktop.in.in \ + $(srcdir)/gnome-dvb-setup.desktop.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gstreamer.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -47,7 +49,8 @@ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = gnome-dvb-control.desktop.in \ + gnome-dvb-setup.desktop.in CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -57,6 +60,13 @@ am__v_at_0 = @ SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -78,9 +88,43 @@ 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)$(dbusservicedir)" -DATA = $(dbusservice_DATA) +am__installdirs = "$(DESTDIR)$(dbusservicedir)" \ + "$(DESTDIR)$(desktopdir)" +DATA = $(dbusservice_DATA) $(desktop_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ @@ -124,6 +168,8 @@ GST_CFLAGS = @GST_CFLAGS@ GST_INSPECT = @GST_INSPECT@ GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -245,17 +291,33 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = icons +desktopdir = $(datadir)/applications +desktop_in_files = \ + gnome-dvb-control.desktop.in \ + gnome-dvb-setup.desktop.in \ + $(NULL) + +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) # Dbus service file dbusservicedir = $(DBUS_SERVICES_DIR) dbusservice_in_files = \ org.gnome.DVB.service.in \ - org.gnome.UPnP.MediaServer1.DVBDaemon.service.in + org.gnome.UPnP.MediaServer1.DVBDaemon.service.in \ + org.gnome.UPnP.MediaServer2.DVBDaemon.service.in dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) -CLEANFILES = $(dbusservice_DATA) -EXTRA_DIST = $(dbusservice_in_files) -all: all-am +CLEANFILES = \ + $(dbusservice_DATA) \ + $(desktop_DATA) + +EXTRA_DIST = \ + $(dbusservice_in_files) \ + $(desktop_in_files) \ + $(desktop_DATA) + +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -288,6 +350,10 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +gnome-dvb-control.desktop.in: $(top_builddir)/config.status $(srcdir)/gnome-dvb-control.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +gnome-dvb-setup.desktop.in: $(top_builddir)/config.status $(srcdir)/gnome-dvb-setup.desktop.in.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -314,12 +380,161 @@ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(dbusservicedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dbusservicedir)" && rm -f $$files +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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: +CTAGS: ctags-recursive $(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" +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -351,22 +566,51 @@ || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(dbusservicedir)"; do \ +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(desktopdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -384,90 +628,96 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: -install-data-am: install-dbusserviceDATA +install-data-am: install-dbusserviceDATA install-desktopDATA -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: -uninstall-am: uninstall-dbusserviceDATA +uninstall-am: uninstall-dbusserviceDATA uninstall-desktopDATA -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.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-dbusserviceDATA \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dbusserviceDATA install-desktopDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ 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-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-dbusserviceDATA + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-dbusserviceDATA \ + uninstall-desktopDATA +@INTLTOOL_DESKTOP_RULE@ # Rule to make the service file with bindir expanded $(dbusservice_DATA): %.service: %.service.in - sed -e "s|\@bindir\@|$(bindir)|" $< > $@ + $(AM_V_at)sed -e "s|\@bindir\@|$(bindir)|" $< > $@ # 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.16/data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in gnome-dvb-daemon-0.1.21/data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in --- gnome-dvb-daemon-0.1.16/data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/data/org.gnome.UPnP.MediaServer2.DVBDaemon.service.in 2010-08-11 13:09:47.000000000 +0000 @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.gnome.UPnP.MediaServer2.DVBDaemon +Exec=@bindir@/gnome-dvb-daemon --enable-mediaserver2 diff -Nru gnome-dvb-daemon-0.1.16/debian/changelog gnome-dvb-daemon-0.1.21/debian/changelog --- gnome-dvb-daemon-0.1.16/debian/changelog 2010-04-11 08:52:10.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/changelog 2010-09-17 10:57:40.000000000 +0000 @@ -1,3 +1,44 @@ +gnome-dvb-daemon (0.1.21-0ubuntu1~bojo1~lucid1) lucid; urgency=low + + * Backport for lucid. + * debian/control: increase version dependency on valac + + -- bojo42 Tue, 14 Sep 2010 14:23:20 +0200 + +gnome-dvb-daemon (0.1.21-0ubuntu1) maverick; urgency=low + + * New upstream release: + - Provides support for vala 0.10 (LP: #620128) + + -- David Sugar Mon, 06 Sep 2010 00:18:05 +0200 + +gnome-dvb-daemon (0.1.19-1) unstable; urgency=low + + * New upstream release: + + debian/gnome-dvb-client.install: + - Remove udev python module that was dropped upstream. + + -- Sebastian Dröge Sun, 30 May 2010 10:00:14 +0200 + +gnome-dvb-daemon (0.1.17-2) unstable; urgency=low + + * debian/gnome-dvb-client.install: + + Ship forgotten files for the client applications, i.e. + the icons, the .desktop files and the new Python + modules (Closes: #578018). + + -- Sebastian Dröge Fri, 16 Apr 2010 09:20:09 +0200 + +gnome-dvb-daemon (0.1.17-1) unstable; urgency=low + + * New upstream release: + + debian/patches/01_vala-0.8.0.patch: + - Dropped, merged upstream. + + debian/control.in: + - Build depend on gudev and drop hal dependency. + + -- Sebastian Dröge Thu, 15 Apr 2010 10:24:00 +0200 + gnome-dvb-daemon (0.1.16-2) unstable; urgency=low * debian/patches/01_vala-0.8.0.patch: diff -Nru gnome-dvb-daemon-0.1.16/debian/control gnome-dvb-daemon-0.1.21/debian/control --- gnome-dvb-daemon-0.1.16/debian/control 2010-04-11 09:51:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/control 2010-09-17 10:58:19.000000000 +0000 @@ -6,7 +6,8 @@ Source: gnome-dvb-daemon Section: video Priority: optional -Maintainer: Sebastian Reichel +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Sebastian Reichel Uploaders: Debian GNOME Maintainers , Emilio Pozuelo Monfort , Sebastian Dröge Build-Depends: cdbs (>= 0.4.49), debhelper (>= 7), @@ -19,9 +20,10 @@ libdbus-glib-1-dev (>= 0.74), libgee-dev (>= 0.5.0), libsqlite3-dev (>= 3.4), + libgudev-1.0-dev, libgstreamer0.10-dev (>= 0.10.25), libgstrtspserver-0.10-dev (>= 0.10.5), - valac (>= 0.7.7-3), + valac (>= 0.9.1), gstreamer0.10-tools, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-good, @@ -53,7 +55,6 @@ ${python:Depends}, gnome-dvb-daemon, gnome-icon-theme, - hal, python-dbus, python-gtk2, python-gobject, diff -Nru gnome-dvb-daemon-0.1.16/debian/control.in gnome-dvb-daemon-0.1.21/debian/control.in --- gnome-dvb-daemon-0.1.16/debian/control.in 2010-03-08 17:18:56.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/control.in 2010-09-14 12:21:45.000000000 +0000 @@ -1,7 +1,8 @@ Source: gnome-dvb-daemon Section: video Priority: optional -Maintainer: Sebastian Reichel +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Sebastian Reichel Uploaders: @GNOME_TEAM@ Build-Depends: cdbs (>= 0.4.49), debhelper (>= 7), @@ -14,9 +15,10 @@ libdbus-glib-1-dev (>= 0.74), libgee-dev (>= 0.5.0), libsqlite3-dev (>= 3.4), + libgudev-1.0-dev, libgstreamer0.10-dev (>= 0.10.25), libgstrtspserver-0.10-dev (>= 0.10.5), - valac (>= 0.7.7-3), + valac (>= 0.9.1), gstreamer0.10-tools, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-good, @@ -48,7 +50,6 @@ ${python:Depends}, gnome-dvb-daemon, gnome-icon-theme, - hal, python-dbus, python-gtk2, python-gobject, diff -Nru gnome-dvb-daemon-0.1.16/debian/gnome-dvb-client.install gnome-dvb-daemon-0.1.21/debian/gnome-dvb-client.install --- gnome-dvb-daemon-0.1.16/debian/gnome-dvb-client.install 2010-01-26 07:42:18.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/gnome-dvb-client.install 2010-05-30 08:06:15.000000000 +0000 @@ -4,5 +4,8 @@ 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/* +usr/lib/python*/*-packages/gnomedvb/userdirs/*.py +usr/lib/python*/*-packages/gnomedvb/userdirs/*.so usr/share/locale/* +usr/share/applications +usr/share/icons diff -Nru gnome-dvb-daemon-0.1.16/debian/patches/01_vala-0.8.0.patch gnome-dvb-daemon-0.1.21/debian/patches/01_vala-0.8.0.patch --- gnome-dvb-daemon-0.1.16/debian/patches/01_vala-0.8.0.patch 2010-04-11 09:48:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/patches/01_vala-0.8.0.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,950 +0,0 @@ -diff -Naur gnome-dvb-daemon-0.1.16.old/src/ChannelFactory.vala gnome-dvb-daemon-0.1.16/src/ChannelFactory.vala ---- gnome-dvb-daemon-0.1.16.old/src/ChannelFactory.vala 2010-02-07 17:11:57.000000000 +0100 -+++ gnome-dvb-daemon-0.1.16/src/ChannelFactory.vala 2010-04-11 10:55:19.665601099 +0200 -@@ -201,24 +201,24 @@ - create_channel = false; - } - } -- } - -- if (create_channel) { -- ChannelElements celems = new ChannelElements (); -- celems.sid = channel_sid; -- celems.sinks = new ArrayList (); -- celems.sinks.add (bin); -- celems.tee = tee; -- celems.forced = forced; -- celems.notify_func = notify_func; -+ if (create_channel) { -+ ChannelElements celems = new ChannelElements (); -+ celems.sid = channel_sid; -+ celems.sinks = new ArrayList (); -+ celems.sinks.add (bin); -+ celems.tee = tee; -+ celems.forced = forced; -+ celems.notify_func = notify_func; - -- lock (this.elements_map) { -- this.elements_map.set (channel_sid, celems); -+ lock (this.elements_map) { -+ this.elements_map.set (channel_sid, celems); -+ } -+ this.active_channels.add (channel); - } -- this.active_channels.add (channel); -+ -+ return bin; - } -- -- return bin; - } - - private Gst.Element add_sink_bin (Gst.Element sink_element) { -diff -Naur gnome-dvb-daemon-0.1.16.old/src/Manager.vala gnome-dvb-daemon-0.1.16/src/Manager.vala ---- gnome-dvb-daemon-0.1.16.old/src/Manager.vala 2010-02-07 17:11:57.000000000 +0100 -+++ gnome-dvb-daemon-0.1.16/src/Manager.vala 2010-04-11 10:55:19.661592349 +0200 -@@ -66,7 +66,7 @@ - lock (m.scanners) { - foreach (Scanner scanner in m.scanners.values) { - debug ("Stopping scanner"); -- scanner.Destroy (); -+ scanner.do_destroy (); - } - m.scanners.clear (); - } -diff -Naur gnome-dvb-daemon-0.1.16.old/src/Recorder.vala gnome-dvb-daemon-0.1.16/src/Recorder.vala ---- gnome-dvb-daemon-0.1.16.old/src/Recorder.vala 2010-02-07 17:11:57.000000000 +0100 -+++ gnome-dvb-daemon-0.1.16/src/Recorder.vala 2010-04-11 10:55:19.665601099 +0200 -@@ -167,8 +167,12 @@ - - if (!has_conflict) { - this.timers.set (new_timer.Id, new_timer); -- Factory.get_timers_store ().add_timer_to_device_group (new_timer, -- this.DeviceGroup); -+ try { -+ Factory.get_timers_store ().add_timer_to_device_group (new_timer, -+ this.DeviceGroup); -+ } catch (SqlError e) { -+ critical ("%s", e.message); -+ } - this.changed (new_timer.Id, ChangeType.ADDED); - - if (this.timers.size == 1 && !this.have_check_timers_timeout) { -@@ -224,17 +228,25 @@ - * active timer recording is aborted. - */ - public bool DeleteTimer (uint32 timer_id) throws DBus.Error { -+ return this.delete_timer (timer_id); -+ } -+ -+ protected bool delete_timer (uint32 timer_id) { - bool val; - lock (this.timers) { - if (this.timers.contains (timer_id)) { -- if (this.IsTimerActive (timer_id)) { -+ if (this.is_timer_active (timer_id)) { - // Abort recording - Timer timer = this.timers.get (timer_id); - this.stop_recording (timer); - } - this.timers.remove (timer_id); -- Factory.get_timers_store ().remove_timer_from_device_group ( -- timer_id, this.DeviceGroup); -+ try { -+ Factory.get_timers_store ().remove_timer_from_device_group ( -+ timer_id, this.DeviceGroup); -+ } catch (SqlError e) { -+ critical ("%s", e.message); -+ } - this.changed (timer_id, ChangeType.DELETED); - val = true; - } else { -@@ -484,6 +496,10 @@ - * @returns: TRUE if timer is currently active - */ - public bool IsTimerActive (uint32 timer_id) throws DBus.Error { -+ return this.is_timer_active (timer_id); -+ } -+ -+ protected bool is_timer_active (uint32 timer_id) { - return this.active_timers.contains (timer_id); - } - -@@ -782,7 +798,7 @@ - - // Delete items from this.timers using this.DeleteTimer - for (int i=0; i. -+ */ -+ -+using GLib; -+using Gee; -+ -+namespace DVB { -+ -+ /** -+ * An abstract class responsible for scanning for new channels -+ */ -+ public abstract class Scanner : GLib.Object { -+ -+ /** -+ * Emitted when the Destroy () method is called -+ */ -+ public signal void destroyed (); -+ -+ /** -+ * Emitted when a frequency has been scanned. -+ * Whether a new channel has been found on that frequency or not. -+ */ -+ public signal void frequency_scanned (uint frequency, uint freq_left); -+ -+ /** -+ * @frequency: Frequency of the channel -+ * @sid: SID of the channel -+ * @name: Name of the channel -+ * @network: Name of network the channel is part of -+ * @type: What type of channel this is (Radio or TV) -+ * @scrambled: Whether the channel is scrambled -+ * -+ * Emitted when a new channel has been found -+ */ -+ public signal void channel_added (uint frequency, uint sid, -+ string name, string network, string type, bool scrambled); -+ -+ /** -+ * Emitted when all frequencies have been scanned -+ */ -+ public signal void finished (); -+ -+ /** -+ * The DVB device the scanner should use -+ */ -+ [DBus (visible = false)] -+ public DVB.Device Device { get; construct; } -+ -+ [DBus (visible = false)] -+ public ChannelList Channels { -+ get { return this.channels; } -+ } -+ -+ protected ChannelList channels; -+ -+ /** -+ * The Gst pipeline used for scanning -+ */ -+ protected Gst.Element pipeline; -+ -+ /** -+ * Contains the tuning parameters we use for scanning -+ */ -+ protected GLib.Queue frequencies; -+ -+ /** -+ * The tuning paramters we're currently using -+ */ -+ protected Gst.Structure? current_tuning_params; -+ -+ /** -+ * All the frequencies that have been scanned already -+ */ -+ protected HashSet scanned_frequencies; -+ -+ protected HashMap transport_streams; -+ -+ private static const string BASE_PIDS = "16:17:18"; -+ private static const string PIPELINE_TEMPLATE = "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=%s stats-reporting-interval=0 ! mpegtsparse ! fakesink silent=true"; -+ -+ // Contains SIDs -+ private ArrayList new_channels; -+ private Source check_for_lock_source; -+ private Source wait_for_tables_source; -+ private bool nit_arrived; -+ private bool sdt_arrived; -+ private bool pat_arrived; -+ private bool pmt_arrived; -+ private bool locked; -+ private MainContext context; -+ private MainLoop loop; -+ private unowned Thread worker_thread; -+ private bool running; -+ private uint bus_watch_id; -+ -+ construct { -+ this.scanned_frequencies = -+ new HashSet (ScannedItem.hash, ScannedItem.equal); -+ this.new_channels = new ArrayList (); -+ this.frequencies = new GLib.Queue (); -+ this.transport_streams = new HashMap (); -+ this.context = new MainContext (); -+ this.running = false; -+ } -+ -+ /** -+ * Setup the pipeline correctly -+ */ -+ protected abstract void prepare(); -+ -+ /** -+ * Use the frequency and possibly other data to -+ * mark the tuning paramters as already used -+ */ -+ protected abstract ScannedItem get_scanned_item (Gst.Structure structure); -+ -+ /** -+ * Return a new empty channel -+ */ -+ protected abstract Channel get_new_channel (); -+ -+ /** -+ * Retrieve the data from structure and add it to the Channel -+ */ -+ protected abstract void add_values_from_structure_to_channel (Gst.Structure delivery, Channel channel); -+ -+ /** -+ * Start the scanner -+ */ -+ public void Run () throws DBus.Error { -+ if (this.running) return; -+ this.running = true; -+ -+ this.loop = new MainLoop (this.context, false); -+ try { -+ this.worker_thread = Thread.create (this.worker, true); -+ } catch (Error e) { -+ critical ("Could not create thread: %s", e.message); -+ return; -+ } -+ -+ this.channels = new ChannelList (); -+ // pids: 0=pat, 16=nit, 17=sdt, 18=eit -+ try { -+ this.pipeline = Gst.parse_launch( -+ PIPELINE_TEMPLATE.printf (this.Device.Adapter, -+ this.Device.Frontend, BASE_PIDS)); -+ } catch (Error e) { -+ error ("Could not create pipeline: %s", e.message); -+ return; -+ } -+ -+ Gst.Bus bus = this.pipeline.get_bus(); -+ this.bus_watch_id = cUtils.gst_bus_add_watch_context (bus, -+ this.bus_watch_func, this.context); -+ -+ this.pipeline.set_state(Gst.State.READY); -+ -+ var source = new IdleSource (); -+ source.set_callback (this.start_scan); -+ source.attach (this.context); -+ } -+ -+ /** -+ * Abort scanning and cleanup -+ */ -+ public void Destroy () throws DBus.Error { -+ this.do_destroy (); -+ } -+ -+ protected void do_destroy () { -+ this.remove_check_for_lock_timeout (); -+ this.remove_wait_for_tables_timeout (); -+ this.clear_and_reset_all (); -+ this.channels.clear (); -+ this.channels = null; -+ -+ if (this.loop != null) { -+ this.loop.quit (); -+ this.loop = null; -+ this.worker_thread.join (); -+ this.worker_thread = null; -+ } -+ this.destroyed (); -+ } -+ -+ /** -+ * @path: Location where the file will be stored -+ * -+ * Write all the channels stored in this.Channels to file -+ */ -+ public bool WriteAllChannelsToFile (string path) throws DBus.Error { -+ bool success = true; -+ var writer = new 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); -+ success = false; -+ } -+ } -+ -+ try { -+ writer.close (); -+ } catch (Error e) { -+ critical ("Could not close file handle: %s", e.message); -+ success = false; -+ } -+ -+ return success; -+ } -+ -+ /** -+ * @channel_sids: A list of channels' SIDs -+ * @path: Location where the file will be stored -+ * -+ * Write the channels with the given SIDs to file @path -+ */ -+ public bool WriteChannelsToFile (uint[] channel_sids, string path) -+ throws DBus.Error -+ { -+ bool success = true; -+ var writer = new ChannelListWriter (File.new_for_path (path)); -+ foreach (uint sid in channel_sids) { -+ DVB.Channel? c = this.channels.get_channel (sid); -+ if (c == null) { -+ warning ("Channel with SID %u does not exist", sid); -+ continue; -+ } -+ try { -+ writer.write (c); -+ } catch (Error e) { -+ critical ("Could not write to file: %s", e.message); -+ success = false; -+ } -+ } -+ -+ try { -+ writer.close (); -+ } catch (Error e) { -+ critical ("Could not close file handle: %s", e.message); -+ success = false; -+ } -+ -+ return success; -+ } -+ -+ /* Main Thread */ -+ private void* worker () { -+ this.loop.run (); -+ -+ return null; -+ } -+ -+ protected void clear_and_reset_all () { -+ if (this.pipeline != null) { -+ Source bus_watch_source = this.context.find_source_by_id ( -+ this.bus_watch_id); -+ if (bus_watch_source != null) { -+ bus_watch_source.destroy (); -+ this.bus_watch_id = 0; -+ } -+ this.pipeline.set_state (Gst.State.NULL); -+ // Free pipeline -+ this.pipeline = null; -+ } -+ -+ this.transport_streams.clear (); -+ this.scanned_frequencies.clear (); -+ this.clear_frequencies (); -+ this.current_tuning_params = null; -+ this.new_channels.clear (); -+ this.running = false; -+ } -+ -+ protected void clear_frequencies () { -+ while (!this.frequencies.is_empty ()) { -+ Gst.Structure? s = this.frequencies.pop_head (); -+ // Force that gst_structure_free is called -+ s = null; -+ } -+ this.frequencies.clear (); -+ } -+ -+ protected void add_structure_to_scan (owned Gst.Structure structure) { -+ if (structure == null) return; -+ -+ ScannedItem item = this.get_scanned_item (structure); -+ -+ if (!this.scanned_frequencies.contains (item)) { -+ debug ("Queueing new frequency %u", item.Frequency); -+ this.frequencies.push_tail (structure); -+ this.scanned_frequencies.add (item); -+ } -+ } -+ -+ /** -+ * Pick up the next tuning paramters from the queue -+ * and start scanning with them -+ */ -+ 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)", -+ all_tables.to_string (), this.pat_arrived.to_string (), -+ this.sdt_arrived.to_string (), this.nit_arrived.to_string (), -+ this.pmt_arrived.to_string ()); -+ -+ this.nit_arrived = false; -+ this.sdt_arrived = false; -+ this.pat_arrived = false; -+ this.pmt_arrived = false; -+ this.locked = false; -+ -+ if (this.current_tuning_params != null) { -+ uint old_freq; -+ this.current_tuning_params.get_uint ("frequency", out old_freq); -+ this.frequency_scanned (old_freq, this.frequencies.length); -+ } -+ -+ if (this.frequencies.is_empty()) { -+ message("Finished scanning"); -+ // 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", -+ this.new_channels.size); -+ foreach (uint sid in this.new_channels) { -+ this.channels.remove (sid); -+ } -+ } -+ this.clear_and_reset_all (); -+ this.finished (); -+ return false; -+ } -+ -+ this.current_tuning_params = this.frequencies.pop_head(); -+ -+ // Remember that we already scanned this frequency -+ uint freq; -+ this.current_tuning_params.get_uint ("frequency", out freq); -+ -+ debug("Starting scanning frequency %u (%u left)", freq, -+ this.frequencies.get_length ()); -+ -+ this.pipeline.set_state (Gst.State.READY); -+ -+ this.prepare (); -+ -+ // Reset PIDs -+ Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc"); -+ dvbsrc.set ("pids", BASE_PIDS); -+ -+ this.check_for_lock_source = -+ new TimeoutSource.seconds (5); -+ this.check_for_lock_source.set_callback (this.check_for_lock); -+ this.check_for_lock_source.attach (this.context); -+ -+ this.pipeline.set_state (Gst.State.PLAYING); -+ -+ return false; -+ } -+ -+ /** -+ * Check if we received a lock with the currently -+ * used tuning parameters -+ */ -+ protected bool check_for_lock () { -+ if (!this.locked) { -+ this.pipeline.set_state (Gst.State.READY); -+ this.queue_start_scan (); -+ } -+ return false; -+ } -+ -+ protected bool wait_for_tables () { -+ if (!(this.sdt_arrived && this.nit_arrived && this.pat_arrived -+ && this.pmt_arrived)) { -+ this.pipeline.set_state (Gst.State.READY); -+ this.queue_start_scan (); -+ } -+ return false; -+ } -+ -+ protected void remove_check_for_lock_timeout () { -+ if (this.check_for_lock_source != null) { -+ this.check_for_lock_source.destroy (); -+ this.check_for_lock_source = null; -+ } -+ } -+ -+ protected void remove_wait_for_tables_timeout () { -+ if (this.wait_for_tables_source != null) { -+ this.wait_for_tables_source.destroy (); -+ this.wait_for_tables_source = null; -+ } -+ } -+ -+ protected void queue_start_scan () { -+ var source = new IdleSource (); -+ source.set_callback (this.start_scan); -+ source.attach (this.context); -+ } -+ -+ protected static void set_uint_property (Gst.Element src, -+ Gst.Structure params, string key) { -+ uint val; -+ params.get_uint (key, out val); -+ src.set (key, val); -+ } -+ -+ protected void on_dvb_frontend_stats_structure (Gst.Structure structure) { -+ bool has_lock; -+ structure.get_boolean ("lock", out has_lock); -+ if (has_lock && !this.locked) { -+ debug("Got lock"); -+ this.remove_check_for_lock_timeout (); -+ this.wait_for_tables_source = -+ new TimeoutSource.seconds (10); -+ this.wait_for_tables_source.set_callback (this.wait_for_tables); -+ this.wait_for_tables_source.attach (this.context); -+ } -+ } -+ -+ protected void on_dvb_read_failure_structure () { -+ warning ("Read failure"); -+ /* -+ this.Destroy (); -+ */ -+ } -+ -+ protected void on_pat_structure (Gst.Structure structure) { -+ debug("Received PAT"); -+ -+ Set pid_set = new HashSet (); -+ // add BASE_PIDS -+ pid_set.add (16); -+ pid_set.add (17); -+ pid_set.add (18); -+ -+ Gst.Value programs = structure.get_value ("programs"); -+ uint size = programs.list_get_size (); -+ Gst.Value val; -+ weak Gst.Structure program; -+ // Iterate over programs -+ for (uint i=0; i del_channels = new ArrayList (); -+ foreach (uint sid in this.new_channels) { -+ DVB.Channel channel = this.channels.get_channel (sid); -+ -+ // If this fails we may miss video or audio pid, -+ // 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 ()); -+ 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 %u is not valid: %s", sid, -+ channel.to_string ()); -+ this.pmt_arrived = false; -+ } -+ } -+ -+ // Only remove those channels we have all the information for -+ foreach (uint sid in del_channels) { -+ this.new_channels.remove (sid); -+ } -+ } -+ } -+ } -+ -+ // If we collect all information we can continue scanning -+ // the next frequency -+ if (this.sdt_arrived && this.nit_arrived && this.pat_arrived -+ && this.pmt_arrived) { -+ this.remove_wait_for_tables_timeout (); -+ -+ this.queue_start_scan (); -+ } -+ -+ return true; -+ } -+ -+ protected void add_new_channel (uint sid) { -+ debug ("Adding new channel with SID %u", sid); -+ Channel new_channel = this.get_new_channel (); -+ new_channel.Sid = sid; -+ this.channels.add (new_channel); -+ lock (this.new_channels) { -+ this.new_channels.add (sid); -+ } -+ } -+ } -+ -+} -diff -Naur gnome-dvb-daemon-0.1.16.old/src/Schedule.vala gnome-dvb-daemon-0.1.16/src/Schedule.vala ---- gnome-dvb-daemon-0.1.16.old/src/Schedule.vala 2009-11-28 02:09:02.000000000 +0100 -+++ gnome-dvb-daemon-0.1.16/src/Schedule.vala 2010-04-11 10:55:19.661592349 +0200 -@@ -111,8 +111,12 @@ - - this.event_id_map.remove (element.id); - this.events.remove (iter); -- this.epgstore.remove_event ( -- element.id, this.channel.Sid, this.channel.GroupId); -+ try { -+ this.epgstore.remove_event (element.id, -+ this.channel.Sid, this.channel.GroupId); -+ } catch (SqlError e) { -+ critical ("%s", e.message); -+ } - } - } - } -@@ -138,8 +142,12 @@ - this.create_and_add_event_element (event); - } - -- this.epgstore.add_or_update_event (event, this.channel.Sid, -- this.channel.GroupId); -+ try { -+ this.epgstore.add_or_update_event (event, this.channel.Sid, -+ this.channel.GroupId); -+ } catch (SqlError e) { -+ critical ("%s", e.message); -+ } - } - } - diff -Nru gnome-dvb-daemon-0.1.16/debian/patches/series gnome-dvb-daemon-0.1.21/debian/patches/series --- gnome-dvb-daemon-0.1.16/debian/patches/series 2010-04-11 08:52:10.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -01_vala-0.8.0.patch diff -Nru gnome-dvb-daemon-0.1.16/INSTALL gnome-dvb-daemon-0.1.21/INSTALL --- gnome-dvb-daemon-0.1.16/INSTALL 2010-02-24 16:24:19.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/INSTALL 2010-08-23 13:37:03.000000000 +0000 @@ -4,8 +4,10 @@ Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +83,15 @@ all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +116,8 @@ own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +144,8 @@ By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +156,46 @@ In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +208,13 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -288,7 +351,7 @@ `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. diff -Nru gnome-dvb-daemon-0.1.16/ltmain.sh gnome-dvb-daemon-0.1.21/ltmain.sh --- gnome-dvb-daemon-0.1.16/ltmain.sh 2010-02-24 16:24:07.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/ltmain.sh 2010-08-23 13:36:58.000000000 +0000 @@ -1,6 +1,6 @@ # Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6 +# ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,9 +73,9 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6 Debian-2.2.6a-4" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" -package_revision=1.3012 +package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then diff -Nru gnome-dvb-daemon-0.1.16/m4/libtool.m4 gnome-dvb-daemon-0.1.21/m4/libtool.m4 --- gnome-dvb-daemon-0.1.16/m4/libtool.m4 2010-02-24 16:24:08.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/m4/libtool.m4 2010-08-23 13:36:58.000000000 +0000 @@ -2445,7 +2445,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -3084,7 +3084,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3705,7 +3705,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3989,7 +3989,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4285,6 +4285,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4376,7 +4377,7 @@ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -5860,7 +5861,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler diff -Nru gnome-dvb-daemon-0.1.16/m4/ltversion.m4 gnome-dvb-daemon-0.1.21/m4/ltversion.m4 --- gnome-dvb-daemon-0.1.16/m4/ltversion.m4 2010-02-24 16:24:09.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/m4/ltversion.m4 2010-08-23 13:36:59.000000000 +0000 @@ -9,15 +9,15 @@ # Generated from ltversion.in. -# serial 3012 ltversion.m4 +# serial 3017 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' +[macro_version='2.2.6b' +macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru gnome-dvb-daemon-0.1.16/Makefile.am gnome-dvb-daemon-0.1.21/Makefile.am --- gnome-dvb-daemon-0.1.16/Makefile.am 2009-10-15 10:03:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/Makefile.am 2010-08-09 10:10:47.000000000 +0000 @@ -6,13 +6,9 @@ po \ $(NULL) -BUILT_SOURCES = \ - src/gnome-dvb-daemon.vala.stamp - $(NULL) - bin_PROGRAMS = gnome-dvb-daemon -gnome_dvb_daemon_VALASOURCES = \ +gnome_dvb_daemon_SOURCES = \ src/Cable/CableChannel.vala \ src/Cable/CableScanner.vala \ src/Satellite/SatelliteChannel.vala \ @@ -33,13 +29,15 @@ src/dbus/IDBusRecorder.vala \ src/dbus/IDBusRecordingsStore.vala \ src/dbus/IDBusSchedule.vala \ + src/io/ChannelListReader.vala \ + src/io/ChannelListWriter.vala \ + src/io/RecordingReader.vala \ + src/io/RecordingWriter.vala \ src/ChangeType.vala \ src/Channel.vala \ src/ChannelFactory.vala \ src/ChannelGroup.vala \ src/ChannelList.vala \ - src/ChannelListReader.vala \ - src/ChannelListWriter.vala \ src/Constants.vala \ src/Device.vala \ src/DeviceGroup.vala \ @@ -64,23 +62,23 @@ 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 \ - --pkg gst-rtsp-server-0.10 + --pkg gio-2.0 \ + --pkg dbus-glib-1 \ + --pkg gstreamer-0.10 \ + --pkg gee-1.0 \ + --pkg sqlite3 \ + --pkg gst-rtsp-server-0.10 \ + --pkg gudev-1.0 \ + $(NULL) own_pkgs = \ --pkg config \ --pkg cutils - -gnome_dvb_daemon_SOURCES = \ - $(gnome_dvb_daemon_VALASOURCES:.vala=.c) \ - $(NULL) gnome_dvb_daemon_CPPFLAGS = \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @@ -88,13 +86,12 @@ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ $(GNOME_DVB_DAEMON_CFLAGS) \ $(GST_CFLAGS) \ + $(GUDEV_CFLAGS) \ -I$(top_srcdir)/vapi \ -include $(CONFIG_HEADER) \ $(NULL) -src/gnome-dvb-daemon.vala.stamp: $(gnome_dvb_daemon_VALASOURCES) - $(VALAC) -C --thread --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir) $^ - touch $@ +VALAFLAGS = --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir) gnome_dvb_daemon_LDFLAGS = \ -Wl,--export-dynamic @@ -102,6 +99,7 @@ gnome_dvb_daemon_LDADD = \ $(GNOME_DVB_DAEMON_LIBS) \ $(GST_LIBS) \ + $(GUDEV_LIBS) \ libdvbdaemon-utils.a \ $(NULL) @@ -118,8 +116,7 @@ intltool-extract.in \ intltool-update.in \ intltool-merge.in \ - $(gnome_dvb_daemon_VALASOURCES) \ - src/gnome-dvb-daemon.vala.stamp \ + $(gnome_dvb_daemon_SOURCES) \ vapi/config.vapi \ vapi/cutils.vapi \ vapi/cstuff.h \ diff -Nru gnome-dvb-daemon-0.1.16/Makefile.in gnome-dvb-daemon-0.1.21/Makefile.in --- gnome-dvb-daemon-0.1.16/Makefile.in 2010-02-24 16:24:20.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/Makefile.in 2010-08-23 13:37:03.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -40,8 +40,35 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - compile config.guess config.sub depcomp install-sh ltmain.sh \ - missing mkinstalldirs py-compile + compile config.guess 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/Factory.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 \ + src/Scanner.c src/Schedule.c src/Settings.c \ + src/Terrestrial/TerrestrialChannel.c \ + src/Terrestrial/TerrestrialScanner.c src/Timer.c src/Utils.c \ + src/database/ConfigStore.c src/database/EPGStore.c \ + src/database/SqlError.c src/database/TimersStore.c \ + src/database/sqlite/SqliteConfigTimersStore.c \ + src/database/sqlite/SqliteDatabase.c \ + src/database/sqlite/SqliteEPGStore.c \ + 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gstreamer.m4 \ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -74,7 +101,8 @@ libdvbdaemon_utils_a_OBJECTS = $(am_libdvbdaemon_utils_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__objects_2 = src/Cable/gnome_dvb_daemon-CableChannel.$(OBJEXT) \ +am_gnome_dvb_daemon_OBJECTS = \ + src/Cable/gnome_dvb_daemon-CableChannel.$(OBJEXT) \ src/Cable/gnome_dvb_daemon-CableScanner.$(OBJEXT) \ src/Satellite/gnome_dvb_daemon-SatelliteChannel.$(OBJEXT) \ src/Satellite/gnome_dvb_daemon-SatelliteScanner.$(OBJEXT) \ @@ -94,13 +122,15 @@ src/dbus/gnome_dvb_daemon-IDBusRecorder.$(OBJEXT) \ src/dbus/gnome_dvb_daemon-IDBusRecordingsStore.$(OBJEXT) \ src/dbus/gnome_dvb_daemon-IDBusSchedule.$(OBJEXT) \ + src/io/gnome_dvb_daemon-ChannelListReader.$(OBJEXT) \ + src/io/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT) \ + src/io/gnome_dvb_daemon-RecordingReader.$(OBJEXT) \ + src/io/gnome_dvb_daemon-RecordingWriter.$(OBJEXT) \ src/gnome_dvb_daemon-ChangeType.$(OBJEXT) \ src/gnome_dvb_daemon-Channel.$(OBJEXT) \ src/gnome_dvb_daemon-ChannelFactory.$(OBJEXT) \ src/gnome_dvb_daemon-ChannelGroup.$(OBJEXT) \ src/gnome_dvb_daemon-ChannelList.$(OBJEXT) \ - src/gnome_dvb_daemon-ChannelListReader.$(OBJEXT) \ - src/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT) \ src/gnome_dvb_daemon-Constants.$(OBJEXT) \ src/gnome_dvb_daemon-Device.$(OBJEXT) \ src/gnome_dvb_daemon-DeviceGroup.$(OBJEXT) \ @@ -124,13 +154,15 @@ 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) $(am__objects_1) -am_gnome_dvb_daemon_OBJECTS = $(am__objects_2) $(am__objects_1) + src/rygel/gnome_dvb_daemon-Services.$(OBJEXT) \ + src/rygel/gnome_dvb_daemon-Interfaces2.$(OBJEXT) \ + src/rygel/gnome_dvb_daemon-Services2.$(OBJEXT) \ + $(am__objects_1) gnome_dvb_daemon_OBJECTS = $(am_gnome_dvb_daemon_OBJECTS) am__DEPENDENCIES_1 = gnome_dvb_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) libdvbdaemon-utils.a \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + libdvbdaemon-utils.a $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent @@ -158,6 +190,13 @@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; +VALACOMPILE = $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) +LTVALACOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(VALAC) $(AM_VALAFLAGS) \ + $(VALAFLAGS) +AM_V_VALAC = $(am__v_VALAC_$(V)) +am__v_VALAC_ = $(am__v_VALAC_$(AM_DEFAULT_VERBOSITY)) +am__v_VALAC_0 = @echo " VALAC " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; @@ -258,6 +297,8 @@ GST_CFLAGS = @GST_CFLAGS@ GST_INSPECT = @GST_INSPECT@ GST_LIBS = @GST_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -386,10 +427,7 @@ po \ $(NULL) -BUILT_SOURCES = \ - src/gnome-dvb-daemon.vala.stamp - -gnome_dvb_daemon_VALASOURCES = \ +gnome_dvb_daemon_SOURCES = \ src/Cable/CableChannel.vala \ src/Cable/CableScanner.vala \ src/Satellite/SatelliteChannel.vala \ @@ -410,13 +448,15 @@ src/dbus/IDBusRecorder.vala \ src/dbus/IDBusRecordingsStore.vala \ src/dbus/IDBusSchedule.vala \ + src/io/ChannelListReader.vala \ + src/io/ChannelListWriter.vala \ + src/io/RecordingReader.vala \ + src/io/RecordingWriter.vala \ src/ChangeType.vala \ src/Channel.vala \ src/ChannelFactory.vala \ src/ChannelGroup.vala \ src/ChannelList.vala \ - src/ChannelListReader.vala \ - src/ChannelListWriter.vala \ src/Constants.vala \ src/Device.vala \ src/DeviceGroup.vala \ @@ -441,40 +481,43 @@ 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 \ - --pkg gst-rtsp-server-0.10 + --pkg gio-2.0 \ + --pkg dbus-glib-1 \ + --pkg gstreamer-0.10 \ + --pkg gee-1.0 \ + --pkg sqlite3 \ + --pkg gst-rtsp-server-0.10 \ + --pkg gudev-1.0 \ + $(NULL) own_pkgs = \ --pkg config \ --pkg cutils -gnome_dvb_daemon_SOURCES = \ - $(gnome_dvb_daemon_VALASOURCES:.vala=.c) \ - $(NULL) - gnome_dvb_daemon_CPPFLAGS = \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ $(GNOME_DVB_DAEMON_CFLAGS) \ $(GST_CFLAGS) \ + $(GUDEV_CFLAGS) \ -I$(top_srcdir)/vapi \ -include $(CONFIG_HEADER) \ $(NULL) +VALAFLAGS = --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir) gnome_dvb_daemon_LDFLAGS = \ -Wl,--export-dynamic gnome_dvb_daemon_LDADD = \ $(GNOME_DVB_DAEMON_LIBS) \ $(GST_LIBS) \ + $(GUDEV_LIBS) \ libdvbdaemon-utils.a \ $(NULL) @@ -491,8 +534,7 @@ intltool-extract.in \ intltool-update.in \ intltool-merge.in \ - $(gnome_dvb_daemon_VALASOURCES) \ - src/gnome-dvb-daemon.vala.stamp \ + $(gnome_dvb_daemon_SOURCES) \ vapi/config.vapi \ vapi/cutils.vapi \ vapi/cstuff.h \ @@ -505,7 +547,7 @@ po/.intltool-merge-cache \ $(NULL) -all: $(BUILT_SOURCES) config.h +all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: @@ -707,6 +749,20 @@ 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): + @$(MKDIR_P) src/io + @: > src/io/$(am__dirstamp) +src/io/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/io/$(DEPDIR) + @: > src/io/$(DEPDIR)/$(am__dirstamp) +src/io/gnome_dvb_daemon-ChannelListReader.$(OBJEXT): \ + src/io/$(am__dirstamp) src/io/$(DEPDIR)/$(am__dirstamp) +src/io/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT): \ + src/io/$(am__dirstamp) src/io/$(DEPDIR)/$(am__dirstamp) +src/io/gnome_dvb_daemon-RecordingReader.$(OBJEXT): \ + src/io/$(am__dirstamp) src/io/$(DEPDIR)/$(am__dirstamp) +src/io/gnome_dvb_daemon-RecordingWriter.$(OBJEXT): \ + src/io/$(am__dirstamp) src/io/$(DEPDIR)/$(am__dirstamp) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) @@ -723,10 +779,6 @@ src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-ChannelList.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) -src/gnome_dvb_daemon-ChannelListReader.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-Constants.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gnome_dvb_daemon-Device.$(OBJEXT): src/$(am__dirstamp) \ @@ -787,6 +839,10 @@ 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): \ + src/rygel/$(am__dirstamp) src/rygel/$(DEPDIR)/$(am__dirstamp) gnome-dvb-daemon$(EXEEXT): $(gnome_dvb_daemon_OBJECTS) $(gnome_dvb_daemon_DEPENDENCIES) @rm -f gnome-dvb-daemon$(EXEEXT) $(AM_V_CCLD)$(gnome_dvb_daemon_LINK) $(gnome_dvb_daemon_OBJECTS) $(gnome_dvb_daemon_LDADD) $(LIBS) @@ -818,8 +874,6 @@ -rm -f src/gnome_dvb_daemon-ChannelFactory.$(OBJEXT) -rm -f src/gnome_dvb_daemon-ChannelGroup.$(OBJEXT) -rm -f src/gnome_dvb_daemon-ChannelList.$(OBJEXT) - -rm -f src/gnome_dvb_daemon-ChannelListReader.$(OBJEXT) - -rm -f src/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Constants.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Device.$(OBJEXT) -rm -f src/gnome_dvb_daemon-DeviceGroup.$(OBJEXT) @@ -839,11 +893,17 @@ -rm -f src/gnome_dvb_daemon-Settings.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Timer.$(OBJEXT) -rm -f src/gnome_dvb_daemon-Utils.$(OBJEXT) + -rm -f src/io/gnome_dvb_daemon-ChannelListReader.$(OBJEXT) + -rm -f src/io/gnome_dvb_daemon-ChannelListWriter.$(OBJEXT) + -rm -f src/io/gnome_dvb_daemon-RecordingReader.$(OBJEXT) + -rm -f src/io/gnome_dvb_daemon-RecordingWriter.$(OBJEXT) -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) distclean-compile: @@ -854,8 +914,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-ChannelFactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-ChannelGroup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-ChannelList.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Constants.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-Device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gnome_dvb_daemon-DeviceGroup.Po@am__quote@ @@ -895,11 +953,17 @@ @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-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@ +@AMDEP_TRUE@@am__include@ @am__quote@src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Po@am__quote@ @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@ .c.o: @@ -1265,6 +1329,70 @@ @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-IDBusSchedule.obj `if test -f 'src/dbus/IDBusSchedule.c'; then $(CYGPATH_W) 'src/dbus/IDBusSchedule.c'; else $(CYGPATH_W) '$(srcdir)/src/dbus/IDBusSchedule.c'; fi` +src/io/gnome_dvb_daemon-ChannelListReader.o: src/io/ChannelListReader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-ChannelListReader.o -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo -c -o src/io/gnome_dvb_daemon-ChannelListReader.o `test -f 'src/io/ChannelListReader.c' || echo '$(srcdir)/'`src/io/ChannelListReader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/ChannelListReader.c' object='src/io/gnome_dvb_daemon-ChannelListReader.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/io/gnome_dvb_daemon-ChannelListReader.o `test -f 'src/io/ChannelListReader.c' || echo '$(srcdir)/'`src/io/ChannelListReader.c + +src/io/gnome_dvb_daemon-ChannelListReader.obj: src/io/ChannelListReader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-ChannelListReader.obj -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo -c -o src/io/gnome_dvb_daemon-ChannelListReader.obj `if test -f 'src/io/ChannelListReader.c'; then $(CYGPATH_W) 'src/io/ChannelListReader.c'; else $(CYGPATH_W) '$(srcdir)/src/io/ChannelListReader.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/ChannelListReader.c' object='src/io/gnome_dvb_daemon-ChannelListReader.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/io/gnome_dvb_daemon-ChannelListReader.obj `if test -f 'src/io/ChannelListReader.c'; then $(CYGPATH_W) 'src/io/ChannelListReader.c'; else $(CYGPATH_W) '$(srcdir)/src/io/ChannelListReader.c'; fi` + +src/io/gnome_dvb_daemon-ChannelListWriter.o: src/io/ChannelListWriter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-ChannelListWriter.o -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo -c -o src/io/gnome_dvb_daemon-ChannelListWriter.o `test -f 'src/io/ChannelListWriter.c' || echo '$(srcdir)/'`src/io/ChannelListWriter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/ChannelListWriter.c' object='src/io/gnome_dvb_daemon-ChannelListWriter.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/io/gnome_dvb_daemon-ChannelListWriter.o `test -f 'src/io/ChannelListWriter.c' || echo '$(srcdir)/'`src/io/ChannelListWriter.c + +src/io/gnome_dvb_daemon-ChannelListWriter.obj: src/io/ChannelListWriter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-ChannelListWriter.obj -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo -c -o src/io/gnome_dvb_daemon-ChannelListWriter.obj `if test -f 'src/io/ChannelListWriter.c'; then $(CYGPATH_W) 'src/io/ChannelListWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/io/ChannelListWriter.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/ChannelListWriter.c' object='src/io/gnome_dvb_daemon-ChannelListWriter.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/io/gnome_dvb_daemon-ChannelListWriter.obj `if test -f 'src/io/ChannelListWriter.c'; then $(CYGPATH_W) 'src/io/ChannelListWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/io/ChannelListWriter.c'; fi` + +src/io/gnome_dvb_daemon-RecordingReader.o: src/io/RecordingReader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-RecordingReader.o -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Tpo -c -o src/io/gnome_dvb_daemon-RecordingReader.o `test -f 'src/io/RecordingReader.c' || echo '$(srcdir)/'`src/io/RecordingReader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/RecordingReader.c' object='src/io/gnome_dvb_daemon-RecordingReader.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/io/gnome_dvb_daemon-RecordingReader.o `test -f 'src/io/RecordingReader.c' || echo '$(srcdir)/'`src/io/RecordingReader.c + +src/io/gnome_dvb_daemon-RecordingReader.obj: src/io/RecordingReader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-RecordingReader.obj -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Tpo -c -o src/io/gnome_dvb_daemon-RecordingReader.obj `if test -f 'src/io/RecordingReader.c'; then $(CYGPATH_W) 'src/io/RecordingReader.c'; else $(CYGPATH_W) '$(srcdir)/src/io/RecordingReader.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingReader.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/RecordingReader.c' object='src/io/gnome_dvb_daemon-RecordingReader.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/io/gnome_dvb_daemon-RecordingReader.obj `if test -f 'src/io/RecordingReader.c'; then $(CYGPATH_W) 'src/io/RecordingReader.c'; else $(CYGPATH_W) '$(srcdir)/src/io/RecordingReader.c'; fi` + +src/io/gnome_dvb_daemon-RecordingWriter.o: src/io/RecordingWriter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-RecordingWriter.o -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Tpo -c -o src/io/gnome_dvb_daemon-RecordingWriter.o `test -f 'src/io/RecordingWriter.c' || echo '$(srcdir)/'`src/io/RecordingWriter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/RecordingWriter.c' object='src/io/gnome_dvb_daemon-RecordingWriter.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/io/gnome_dvb_daemon-RecordingWriter.o `test -f 'src/io/RecordingWriter.c' || echo '$(srcdir)/'`src/io/RecordingWriter.c + +src/io/gnome_dvb_daemon-RecordingWriter.obj: src/io/RecordingWriter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gnome_dvb_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/io/gnome_dvb_daemon-RecordingWriter.obj -MD -MP -MF src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Tpo -c -o src/io/gnome_dvb_daemon-RecordingWriter.obj `if test -f 'src/io/RecordingWriter.c'; then $(CYGPATH_W) 'src/io/RecordingWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/io/RecordingWriter.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Tpo src/io/$(DEPDIR)/gnome_dvb_daemon-RecordingWriter.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/io/RecordingWriter.c' object='src/io/gnome_dvb_daemon-RecordingWriter.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/io/gnome_dvb_daemon-RecordingWriter.obj `if test -f 'src/io/RecordingWriter.c'; then $(CYGPATH_W) 'src/io/RecordingWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/io/RecordingWriter.c'; fi` + src/gnome_dvb_daemon-ChangeType.o: src/ChangeType.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-ChangeType.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-ChangeType.Tpo -c -o src/gnome_dvb_daemon-ChangeType.o `test -f 'src/ChangeType.c' || echo '$(srcdir)/'`src/ChangeType.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-ChangeType.Tpo src/$(DEPDIR)/gnome_dvb_daemon-ChangeType.Po @@ -1345,38 +1473,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/gnome_dvb_daemon-ChannelList.obj `if test -f 'src/ChannelList.c'; then $(CYGPATH_W) 'src/ChannelList.c'; else $(CYGPATH_W) '$(srcdir)/src/ChannelList.c'; fi` -src/gnome_dvb_daemon-ChannelListReader.o: src/ChannelListReader.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-ChannelListReader.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo -c -o src/gnome_dvb_daemon-ChannelListReader.o `test -f 'src/ChannelListReader.c' || echo '$(srcdir)/'`src/ChannelListReader.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ChannelListReader.c' object='src/gnome_dvb_daemon-ChannelListReader.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-ChannelListReader.o `test -f 'src/ChannelListReader.c' || echo '$(srcdir)/'`src/ChannelListReader.c - -src/gnome_dvb_daemon-ChannelListReader.obj: src/ChannelListReader.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-ChannelListReader.obj -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo -c -o src/gnome_dvb_daemon-ChannelListReader.obj `if test -f 'src/ChannelListReader.c'; then $(CYGPATH_W) 'src/ChannelListReader.c'; else $(CYGPATH_W) '$(srcdir)/src/ChannelListReader.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Tpo src/$(DEPDIR)/gnome_dvb_daemon-ChannelListReader.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ChannelListReader.c' object='src/gnome_dvb_daemon-ChannelListReader.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-ChannelListReader.obj `if test -f 'src/ChannelListReader.c'; then $(CYGPATH_W) 'src/ChannelListReader.c'; else $(CYGPATH_W) '$(srcdir)/src/ChannelListReader.c'; fi` - -src/gnome_dvb_daemon-ChannelListWriter.o: src/ChannelListWriter.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-ChannelListWriter.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo -c -o src/gnome_dvb_daemon-ChannelListWriter.o `test -f 'src/ChannelListWriter.c' || echo '$(srcdir)/'`src/ChannelListWriter.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ChannelListWriter.c' object='src/gnome_dvb_daemon-ChannelListWriter.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-ChannelListWriter.o `test -f 'src/ChannelListWriter.c' || echo '$(srcdir)/'`src/ChannelListWriter.c - -src/gnome_dvb_daemon-ChannelListWriter.obj: src/ChannelListWriter.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-ChannelListWriter.obj -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo -c -o src/gnome_dvb_daemon-ChannelListWriter.obj `if test -f 'src/ChannelListWriter.c'; then $(CYGPATH_W) 'src/ChannelListWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/ChannelListWriter.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Tpo src/$(DEPDIR)/gnome_dvb_daemon-ChannelListWriter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ChannelListWriter.c' object='src/gnome_dvb_daemon-ChannelListWriter.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-ChannelListWriter.obj `if test -f 'src/ChannelListWriter.c'; then $(CYGPATH_W) 'src/ChannelListWriter.c'; else $(CYGPATH_W) '$(srcdir)/src/ChannelListWriter.c'; fi` - src/gnome_dvb_daemon-Constants.o: src/Constants.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-Constants.o -MD -MP -MF src/$(DEPDIR)/gnome_dvb_daemon-Constants.Tpo -c -o src/gnome_dvb_daemon-Constants.o `test -f 'src/Constants.c' || echo '$(srcdir)/'`src/Constants.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/gnome_dvb_daemon-Constants.Tpo src/$(DEPDIR)/gnome_dvb_daemon-Constants.Po @@ -1761,6 +1857,319 @@ @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 +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Interfaces2.c' object='src/rygel/gnome_dvb_daemon-Interfaces2.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-Interfaces2.o `test -f 'src/rygel/Interfaces2.c' || echo '$(srcdir)/'`src/rygel/Interfaces2.c + +src/rygel/gnome_dvb_daemon-Interfaces2.obj: 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.obj -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Tpo -c -o src/rygel/gnome_dvb_daemon-Interfaces2.obj `if test -f 'src/rygel/Interfaces2.c'; then $(CYGPATH_W) 'src/rygel/Interfaces2.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Interfaces2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Interfaces2.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Interfaces2.c' object='src/rygel/gnome_dvb_daemon-Interfaces2.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-Interfaces2.obj `if test -f 'src/rygel/Interfaces2.c'; then $(CYGPATH_W) 'src/rygel/Interfaces2.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Interfaces2.c'; fi` + +src/rygel/gnome_dvb_daemon-Services2.o: src/rygel/Services2.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-Services2.o -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Tpo -c -o src/rygel/gnome_dvb_daemon-Services2.o `test -f 'src/rygel/Services2.c' || echo '$(srcdir)/'`src/rygel/Services2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Services2.c' object='src/rygel/gnome_dvb_daemon-Services2.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-Services2.o `test -f 'src/rygel/Services2.c' || echo '$(srcdir)/'`src/rygel/Services2.c + +src/rygel/gnome_dvb_daemon-Services2.obj: src/rygel/Services2.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-Services2.obj -MD -MP -MF src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Tpo -c -o src/rygel/gnome_dvb_daemon-Services2.obj `if test -f 'src/rygel/Services2.c'; then $(CYGPATH_W) 'src/rygel/Services2.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Services2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Tpo src/rygel/$(DEPDIR)/gnome_dvb_daemon-Services2.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rygel/Services2.c' object='src/rygel/gnome_dvb_daemon-Services2.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-Services2.obj `if test -f 'src/rygel/Services2.c'; then $(CYGPATH_W) 'src/rygel/Services2.c'; else $(CYGPATH_W) '$(srcdir)/src/rygel/Services2.c'; fi` +$(srcdir)/src/Cable/CableChannel.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/Cable/CableScanner.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/Satellite/SatelliteChannel.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/Satellite/SatelliteScanner.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/Terrestrial/TerrestrialChannel.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/Terrestrial/TerrestrialScanner.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/database/sqlite/SqliteDatabase.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/database/sqlite/SqliteUtils.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/database/sqlite/SqliteConfigTimersStore.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/database/sqlite/SqliteEPGStore.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/database/SqlError.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/database/ConfigStore.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/database/EPGStore.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/database/TimersStore.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/IDBusChannelList.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/IDBusDeviceGroup.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/IDBusManager.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/IDBusRecorder.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/IDBusRecordingsStore.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; \ + $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ + fi +$(srcdir)/src/io/ChannelListReader.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/io/ChannelListWriter.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/io/RecordingReader.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/io/RecordingWriter.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/ChangeType.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/Channel.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/ChannelFactory.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/ChannelGroup.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/ChannelList.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/Constants.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/Device.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/DeviceGroup.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/EPGScanner.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/Event.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/Factory.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; \ + $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ + fi +$(srcdir)/src/Manager.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/MpegTsEnums.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/OverlapType.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/Recorder.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/Recording.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/RecordingsStore.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/Scanner.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/ScannedItem.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/Schedule.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/Settings.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/Timer.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/Utils.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/rtsp/MediaFactory.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/rtsp/MediaMapping.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/rtsp/Server.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/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; \ + $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) gnome_dvb_daemon_vala.stamp; \ + fi +$(srcdir)/src/rygel/Services2.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 +gnome_dvb_daemon_vala.stamp: $(gnome_dvb_daemon_SOURCES) + $(AM_V_VALAC)$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) -C $(gnome_dvb_daemon_SOURCES) + $(AM_V_at)touch $@ +libdvbdaemon_utils_a_vala.stamp: $(libdvbdaemon_utils_a_SOURCES) + $(AM_V_VALAC)$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) -C $(libdvbdaemon_utils_a_SOURCES) + $(AM_V_at)touch $@ + mostlyclean-libtool: -rm -f *.lo @@ -1777,7 +2186,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -1802,7 +2211,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -1969,7 +2378,8 @@ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ @@ -2013,17 +2423,17 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -2083,16 +2493,14 @@ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive +check: check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive +install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -2127,6 +2535,8 @@ -rm -f src/database/sqlite/$(am__dirstamp) -rm -f src/dbus/$(DEPDIR)/$(am__dirstamp) -rm -f src/dbus/$(am__dirstamp) + -rm -f src/io/$(DEPDIR)/$(am__dirstamp) + -rm -f src/io/$(am__dirstamp) -rm -f src/rtsp/$(DEPDIR)/$(am__dirstamp) -rm -f src/rtsp/$(am__dirstamp) -rm -f src/rygel/$(DEPDIR)/$(am__dirstamp) @@ -2138,7 +2548,63 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -rm -f gnome_dvb_daemon_vala.stamp + -rm -f libdvbdaemon_utils_a_vala.stamp + -rm -f src/Cable/CableChannel.c + -rm -f src/Cable/CableScanner.c + -rm -f src/ChangeType.c + -rm -f src/Channel.c + -rm -f src/ChannelFactory.c + -rm -f src/ChannelGroup.c + -rm -f src/ChannelList.c + -rm -f src/Constants.c + -rm -f src/Device.c + -rm -f src/DeviceGroup.c + -rm -f src/EPGScanner.c + -rm -f src/Event.c + -rm -f src/Factory.c + -rm -f src/Main.c + -rm -f src/Manager.c + -rm -f src/MpegTsEnums.c + -rm -f src/OverlapType.c + -rm -f src/Recorder.c + -rm -f src/Recording.c + -rm -f src/RecordingsStore.c + -rm -f src/Satellite/SatelliteChannel.c + -rm -f src/Satellite/SatelliteScanner.c + -rm -f src/ScannedItem.c + -rm -f src/Scanner.c + -rm -f src/Schedule.c + -rm -f src/Settings.c + -rm -f src/Terrestrial/TerrestrialChannel.c + -rm -f src/Terrestrial/TerrestrialScanner.c + -rm -f src/Timer.c + -rm -f src/Utils.c + -rm -f src/database/ConfigStore.c + -rm -f src/database/EPGStore.c + -rm -f src/database/SqlError.c + -rm -f src/database/TimersStore.c + -rm -f src/database/sqlite/SqliteConfigTimersStore.c + -rm -f src/database/sqlite/SqliteDatabase.c + -rm -f src/database/sqlite/SqliteEPGStore.c + -rm -f src/database/sqlite/SqliteUtils.c + -rm -f src/dbus/IDBusChannelList.c + -rm -f src/dbus/IDBusDeviceGroup.c + -rm -f src/dbus/IDBusManager.c + -rm -f src/dbus/IDBusRecorder.c + -rm -f src/dbus/IDBusRecordingsStore.c + -rm -f src/dbus/IDBusSchedule.c + -rm -f src/io/ChannelListReader.c + -rm -f src/io/ChannelListWriter.c + -rm -f src/io/RecordingReader.c + -rm -f src/io/RecordingWriter.c + -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 clean-am: clean-binPROGRAMS clean-generic clean-libtool \ @@ -2146,7 +2612,7 @@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf src/$(DEPDIR) src/Cable/$(DEPDIR) src/Satellite/$(DEPDIR) src/Terrestrial/$(DEPDIR) src/database/$(DEPDIR) src/database/sqlite/$(DEPDIR) src/dbus/$(DEPDIR) src/rtsp/$(DEPDIR) src/rygel/$(DEPDIR) vapi/$(DEPDIR) + -rm -rf src/$(DEPDIR) src/Cable/$(DEPDIR) src/Satellite/$(DEPDIR) src/Terrestrial/$(DEPDIR) src/database/$(DEPDIR) src/database/sqlite/$(DEPDIR) src/dbus/$(DEPDIR) src/io/$(DEPDIR) src/rtsp/$(DEPDIR) src/rygel/$(DEPDIR) vapi/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -2194,7 +2660,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf src/$(DEPDIR) src/Cable/$(DEPDIR) src/Satellite/$(DEPDIR) src/Terrestrial/$(DEPDIR) src/database/$(DEPDIR) src/database/sqlite/$(DEPDIR) src/dbus/$(DEPDIR) src/rtsp/$(DEPDIR) src/rygel/$(DEPDIR) vapi/$(DEPDIR) + -rm -rf src/$(DEPDIR) src/Cable/$(DEPDIR) src/Satellite/$(DEPDIR) src/Terrestrial/$(DEPDIR) src/database/$(DEPDIR) src/database/sqlite/$(DEPDIR) src/dbus/$(DEPDIR) src/io/$(DEPDIR) src/rtsp/$(DEPDIR) src/rygel/$(DEPDIR) vapi/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2213,9 +2679,8 @@ uninstall-am: uninstall-binPROGRAMS -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - ctags-recursive install install-am install-strip \ - tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-binPROGRAMS \ @@ -2236,11 +2701,6 @@ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS - $(NULL) - -src/gnome-dvb-daemon.vala.stamp: $(gnome_dvb_daemon_VALASOURCES) - $(VALAC) -C --thread --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir) $^ - touch $@ dist-hook: @if test -d "$(srcdir)/.bzr"; \ diff -Nru gnome-dvb-daemon-0.1.16/NEWS gnome-dvb-daemon-0.1.21/NEWS --- gnome-dvb-daemon-0.1.16/NEWS 2010-03-17 19:56:44.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/NEWS 2010-08-23 13:54:53.000000000 +0000 @@ -1,4 +1,111 @@ ============== +Version 0.1.21 +============== + +This release implements Rygel's MediaServerSpec2. +By default version 1 is used, use --enable-mediaserver2 +to switch to the newer version. + +- Build fixes for latest Vala and libgee +- Added implementation of Rygel's MediaServerSpec2 +- Renamed option disable-rygel to disable-mediaserver +- Added enable-mediaserver2 option to command line interface +- Append channel name to rtsp URL +- totem: Monitor DBus for changing owner of org.gnome.DVB + +Updated Translations: +--------------------- +- Brazilian Portuguese +- English (United Kingdom) +- Czech +- Finnish +- French +- Italian +- Swedish + +============== +Version 0.1.20 +============== + +This release adds a signal strength and signal quality +indicator to the channels scanner dialog. + +- Display signal strength and signal-to-noise ratio when scanning +- Adjust to changes in Vala 0.9.1 (requires automake 1.11) +- ChannelFactory: set pipeline back to playing in remove_channel if others are still watching it +- Fixed bug where current time wasn't displayed in timer dialog + +Updated Translations: +--------------------- +Spanish + +============== +Version 0.1.19 +============== + +This release contains minor bug fixes. + +- Scanner: Create channels with Channel.without_schedule +- gnomedvb: Catch error when retrieving icon from icon theme +- totem-plugin: Fixed opening of DVB preferences window + +============== +Version 0.1.18 +============== + +This release adds hot-plugging support for devices and +includes various performance improvements regarding accessing +the SQLite database. + +- totem-plugin: Use gnome-dvb-daemon domain for gettext and locale +- SqliteEPGStore: Set synchronous pragma to OFF for speed reasons +- Added support for hot-plugging devices +- Added GetDevices method to manager DBus interface to retrieve informations about devices via udev +- Removed python udev module and use new DBus method instead +- Group sql statements into one transaction where possible +- Schedule: Remove all expired events of a channel with a single query + +Updated Translations: +--------------------- +- Brazilian Portuguese +- Czech +- Danish +- French +- Polish + +============== +Version 0.1.17 +============== + +In this release udev is used to retrieve a list of connected +devices instead of HAL and a lot of bugs have been fixed in +the channel scanner. + +- Made progressbar pulsing when fraction is not known, yet; https://launchpad.net/bugs/540945 fixed +- Change page type of ChannelScanPage to CONTENT marking the cancel button sensitive; https://launchpad.net/bugs/540945 fixed +- Use TreeView to display satellites, antennas and cable providers. Added mnemonics; https://launchpad.net/bugs/540952 fixed +- Fixed crash of assistant on last page if in expert mode +- Set cursor to watch while reading list of antennas/providers; https://launchpad.net/bugs/540948 fixed +- Don't destroy scanner if error is posted on bus; https://launchpad.net/bugs/540937 fixed +- Added icons for gnome-dvb-control and gnome-dvb-setup (many thanks to Klaus Staedler) +- Use udev instead of HAL to retrieve devices +- Fixed compiler errors with Vala 0.8.0 +- Convert XDG user dir path to utf8; https://launchpad.net/bugs/558583 fixed +- Use tuning parameters from initial tuning data instead of NIT; https://launchpad.net/bugs/548738 fixed +- Check if filename of initial tuning data is formated as we expect; https://launchpad.net/bugs/518327 fixed +- Made the call to destroy the scanner async and show dialog with progressbar in the meantime; https://launchpad.net/bugs/519696 fixed +- Don't restore EPG events in constructor of Schedule but delay the whole process +- Use adapter and frontend to determine type of device instead of adapter only; https://launchpad.net/bugs/558806 fixed + +Updated Translations: +--------------------- +- Czech +- English (United Kingdom) +- French +- German +- Spanish + +============== Version 0.1.16 ============== diff -Nru gnome-dvb-daemon-0.1.16/po/ar.po gnome-dvb-daemon-0.1.21/po/ar.po --- gnome-dvb-daemon-0.1.16/po/ar.po 2010-03-17 20:44:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/ar.po 2010-08-23 12:56:16.000000000 +0000 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-23 15:20+0000\n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:28+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" @@ -16,7 +16,7 @@ "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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -86,7 +86,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "قناة" @@ -133,161 +133,161 @@ msgid "There is currently no schedule available for this channel" msgstr "لا يوجد حاليا أي جدول متاح لهذه القناة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "_جدولة التسجيل" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_تحرير" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_عرض" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "مساعدة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_إدارة" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "إدارة جدولة التسجيل" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "إدارة التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_خروج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "الخروج من البرنامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "_قوائم القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "حرر قوائم القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_التفضيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "تفضيلات العرض" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "_ماذا يعرض الآن" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "إكتشف ما يعرض الآن وما سيعرض لاحقا" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_حدِّث" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "حدث دليل البرامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "_اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "إذهب الى اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "_اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "إذهب الى اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "عرض/إخفاء القنوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_شريط الأدوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "عرض/إخفاء شريط الأدوات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_حَول" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "إعرض معلومات حول البرنامج" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "جدولة التسجيل" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "التسجيلات" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "ماذا يعرض الآن" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "اليوم السابق" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "اليوم التالي" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "إدراج موعد تسجيل للحدث المحدد؟" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " finalfantasy1st https://launchpad.net/~finalfantasy1st\n" " saudi linux https://launchpad.net/~saudi-unix" @@ -352,7 +352,7 @@ msgstr "تعديل مجموعه" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "خصائص التلفاز الرقمي" @@ -501,11 +501,11 @@ msgid "_Start time:" msgstr "_وقت البدء:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_المدة:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "دقائق" @@ -565,11 +565,11 @@ msgid "Next" msgstr "التالي" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "لم يتم إيجاد أي أجهزة" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -579,144 +579,173 @@ "الأخيرة تأكد من إغلاق كافة البرامج مثل مشغلات الفيديو التي لها صلاحية وصول " "لبطاقة DVB." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "إختر الجهاز المراد إعداده" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "الإسم" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "النوع" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../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:96 +#: ../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:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "حدث خطأ أثناء استرداد الأجهزة." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "تفاصيل رسالة الخطأ هي :" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "جاري البحث عن أجهزة" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "إختيار الأجهزة" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -"إختر القنوات التي ترغب بإضافتها إلى القائمة.يمكنك أيضا إعادة ترتيب القنوات." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "اختر الكل" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "ألغ أختيار الكل" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "إختر قنوات مشفرة" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "جاري البحث عن قنوات" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "المتطلبات مفقودة" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../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:98 +#: ../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:123 +#: ../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:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "لا يمكن العثور على بيانات ضبط أولية." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../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:132 +#: ../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:133 +#: ../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:134 +#: ../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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "ليست مدرجة" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "الدولة:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "الهوائي:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "القمر:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "موفري الخدمة:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "لا أعلم" @@ -724,21 +753,21 @@ msgid "Welcome to the digital television Assistant." msgstr "مرحبا بك في مساعد التلفاز الرقمي." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "سيتم ضبط الأجهزة والبحث عن القنوات آليا, إن كان ذلك ضروريا." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "انقر \"الى الامام\" للبدء." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "الوضع المتقدم" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "إعداد التلفاز الرقمي" @@ -778,35 +807,40 @@ msgid "An error occured while trying to setup the device." msgstr "حدث خطأ ما أثناء تثبيت الجهاز." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "إعداد جهاز آخر" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "إنتهى الإعداد" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "تم إعداد الجهاز %s بنجاح." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../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:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "ملف القنوات المعد يمكن إستخدامه لإعداد الأجهزة في لوحة التحكم." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -814,65 +848,101 @@ "هل أنت متأكد من رغبتك بالخروج؟\n" "سيتم إلغاء كل العمليات." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "دليل البرنامج" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "التلفاز الرقمي" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "شاهد التلفاز" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "التلفاز الرقمي" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_دليل البرامج" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_حذف" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "تفاصيل" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_رتب القنوات" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "بالإسم" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "بالمجموعة" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_اقلب الترتيب" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "هل تريد حذف التسجيلات؟" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem Movie Player" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "تسجيل %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "GNOME DVB Daemon غير مثبت" + +#. 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 "" + +#~ msgid "Select scrambled channels" +#~ msgstr "إختر قنوات مشفرة" + +#~ msgid "" +#~ "Choose the channels you want to have in your list of channels. You can " +#~ "reorder the channels, too." +#~ msgstr "" +#~ "إختر القنوات التي ترغب بإضافتها إلى القائمة.يمكنك أيضا إعادة ترتيب القنوات." + +#~ msgid "Providers:" +#~ msgstr "موفري الخدمة:" + +#~ msgid "Antenna:" +#~ msgstr "الهوائي:" + +#~ msgid "Country:" +#~ msgstr "الدولة:" + +#~ msgid "Expert mode" +#~ msgstr "الوضع المتقدم" + +#~ msgid "Satellite:" +#~ msgstr "القمر:" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem Movie Player" diff -Nru gnome-dvb-daemon-0.1.16/po/cs.po gnome-dvb-daemon-0.1.21/po/cs.po --- gnome-dvb-daemon-0.1.16/po/cs.po 2010-03-17 20:44:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/cs.po 2010-08-23 12:56:16.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-03-01 23:42+0000\n" -"Last-Translator: Jiří Jindra \n" -"Language-Team: Czech \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-22 06:59+0000\n" +"Last-Translator: David Štancl \n" +"Language-Team: cs \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>=2 && n<=4) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -24,7 +24,7 @@ #: ../client/gnomedvb/__init__.py:37 msgid "GNOME DVB Daemon Website" -msgstr "GNOME DVB Daemon stránka" +msgstr "Web GNOME DVB Daemon" #: ../client/gnomedvb/__init__.py:86 #, python-format @@ -52,7 +52,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "Upravyt seznamy kanálů" +msgstr "Upravit seznamy kanálů" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 msgid "Channel groups" @@ -76,7 +76,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanál" @@ -107,13 +107,14 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 msgid "DVB Control Center" -msgstr "DVB Controlní Centrum" +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 "" -"Vyberte skupinu zařízení a kanál vlevo, k zobrazení průvodce programem" +"Pro zobrazení průvodce programem vyberte v levé části skupinu zařízení a " +"kanál" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 msgid "" @@ -124,163 +125,167 @@ #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 msgid "There is currently no schedule available for this channel" -msgstr "Prvě není žádný rozvrh pro tento kanál" +msgstr "Pro tento kanál program není k dispozici" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" -msgstr "_Rozvrh nahrávání" +msgstr "Plán nah_rávání" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Upravit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" -msgstr "_Zobrazení" +msgstr "_Zobrazit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" -msgstr "Nápověda" +msgstr "_Nápověda" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" -msgstr "_Organizovat" +msgstr "_Správa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" -msgstr "Organizace rozvrhu nahrávání" +msgstr "Správa plánu nahrávání" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_Nahrávky" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" -msgstr "Organizace nahrávání" +msgstr "Správa nahrávek" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" -msgstr "_Konec" +msgstr "U_končit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Ukončit aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "_Seznamy kanálů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Upravit seznamy kanálů" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" -msgstr "_Předvolby" +msgstr "_Nastavení" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Zobrazit předvolby" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "_Co je teď vysíláno" +msgstr "_Právě se vysílá" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" -msgstr "Zjistěte co je vysíláno nyní a co následovně" +msgstr "Zjistěte co se právě vysílá a co je na programu dále" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_Obnovit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Obnovit průvodce programem" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "_Předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Jít na předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "_Následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Jít na následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Kanály" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Zobrazit/Skrýt kanály" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_Nástrojová lišta" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Zobrazit/Skrýt nástrojovou lištu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" -msgstr "_O programu..." +msgstr "O _aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Zobrazit informace o aplikaci" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "Rozvrh nahrávání" +msgstr "Plán nahrávání" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Nahrávky" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" -msgstr "Právě teď" +msgstr "Právě se vysílá" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Předchozí den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Následující den" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "Nastavit nahrávání vybraného pořadu do rozvrhu?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Jiří Jindra https://launchpad.net/~j-jindr" +" David Štancl https://launchpad.net/~david-stancl\n" +" Jiří Jindra https://launchpad.net/~j-jindr\n" +" Konki https://launchpad.net/~pavel-konkol\n" +" Ondra 'Kepi' Kudlík https://launchpad.net/~kepi-orthank\n" +" Sebastian Pölsterl https://launchpad.net/~sebp" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -320,15 +325,15 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:118 msgid "_Name:" -msgstr "_Jméno:" +msgstr "_Název:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "Kanály _soubor" +msgstr "_Soubor s kanály:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" -msgstr "_Složka" +msgstr "_Adresář:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:187 msgid "Select File" @@ -336,14 +341,14 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:196 msgid "Select Directory" -msgstr "Vybrat složku" +msgstr "Vybrat adresář" #: ../client/gnomedvb/ui/preferences/Dialogs.py:209 msgid "Edit group" msgstr "Upravit skupinu" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Předvolby Digitální TV" @@ -357,11 +362,11 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:104 msgid "Setup" -msgstr "Nastavení" +msgstr "Nastavit" #: ../client/gnomedvb/ui/preferences/Preferences.py:106 msgid "Setup devices" -msgstr "Nastavení zařízení" +msgstr "Nastavit zařízení" #: ../client/gnomedvb/ui/preferences/Preferences.py:113 msgid "Create new group" @@ -369,7 +374,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:117 msgid "Create new group for selected device" -msgstr "Vytvořit novou skupinu pro vybrné zařízení" +msgstr "Vytvořit novou skupinu pro vybrané zařízení" #: ../client/gnomedvb/ui/preferences/Preferences.py:123 msgid "Add to group" @@ -377,7 +382,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:127 msgid "Add selected device to existing group" -msgstr "Přidat vybrné zařízení do existující skupiny" +msgstr "Přidat vybrané zařízení do existující skupiny" #: ../client/gnomedvb/ui/preferences/Preferences.py:143 msgid "Configured devices" @@ -398,15 +403,15 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:255 msgid "Group could not be created" -msgstr "Skupina nemohla být vytvořena" +msgstr "Nelze vytvořit skupinu" #: ../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 "" -"Ujistěte se že jste vybrali správný soubor s kanály a složku kde jsou " -"ukládány nahrávky, a obojí lze otevřít." +"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í." #: ../client/gnomedvb/ui/preferences/Preferences.py:286 msgid "Device could not be added to group" @@ -417,8 +422,8 @@ "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í je již přiděleno jiné skupině a že všechna zařízení " -"ve skupině jsou stejného typu." +"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." #: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 msgid "Delete selected recordings?" @@ -435,12 +440,12 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 msgid "Start time" -msgstr "Čas spuštění" +msgstr "Čas začátku" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 #: ../client/gnomedvb/ui/widgets/ScheduleView.py:77 msgid "Duration" -msgstr "Doba trvání" +msgstr "Délka" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" @@ -452,11 +457,11 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "The timer you selected belongs to a currently active recording." -msgstr "Časovač který jste vybrali náleží k právě probíhajícímu nahrávání." +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 msgid "Deleting this timer will abort the recording." -msgstr "Odstranění tohoto časovače zruší nahrávání." +msgstr "Odstraněním tohoto časovače zruší nahrávání." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" @@ -471,7 +476,7 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "Nahrávání bylo nastaveno úspěšně" +msgstr "Nahrávání bylo úspěšně nastaveno" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" @@ -494,21 +499,21 @@ msgid "_Start time:" msgstr "_Čas začátku" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "_Doba trvání" +msgstr "_Délka:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minut" #: ../client/gnomedvb/ui/wizard/__init__.py:4 msgid "digital cable" -msgstr "digitální kabel" +msgstr "digitální kabelové" #: ../client/gnomedvb/ui/wizard/__init__.py:5 msgid "digital satellite" -msgstr "digitální satelit" +msgstr "digitální satelitní" #: ../client/gnomedvb/ui/wizard/__init__.py:6 msgid "digital terrestrial" @@ -536,7 +541,7 @@ #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 msgid "Duration:" -msgstr "Trvání:" +msgstr "Délka:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 msgid "Description:" @@ -544,7 +549,7 @@ #: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 msgid "Start" -msgstr "Start" +msgstr "Začátek" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 msgid "Length" @@ -558,192 +563,220 @@ msgid "Next" msgstr "Další" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Žádná zařízení nebyla nalezena" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 "" -"Buď nejsou nainstalovány žádne DVB karty nebo jsou všechny zaměstnány. V " -"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é 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ě." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Vyberte zařízená které chcete nastavit." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Název" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Typ" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Vyberte zařízení, které chcete nastavit." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Všechna zařízení jsou již nastavena." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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 "" -"Jděte do controlního centra jestliže chcete pozměnit nastavení již " -"nastavených zařízení." +"Jestliže chcete změnit nastavení již nastavených zařízení, spusťte ovládací " +"centrum." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "Nastala chyba při zjišťování zařízení." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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 "" -"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 DVB zařízením a vy k nim máte " "povolen přístup." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" -msgstr "Detailní chybové hlášení je:" +msgstr "Upřesnění chybového hlášení:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Hledání zařízení" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Výběr zařízení" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." -msgstr "" -"Zavřete kanály které chcete mít ve svém seznamu kanálů. Můžete také znovu " -"objednat kanály." +"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:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Vybrat vše" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Zrušit výběr" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Vyberte smíchané kanály" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Kanály:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Vybrat i _zakódované kanály" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Kvalita signálu:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Síla signálu:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Hledání kanálů" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Chybějící požadavky" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" -msgstr "Výběr země a anteny" +msgstr "Výběr země a vysílače (antény)" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Výběr satelitu" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Výběr země a poskytovatele" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 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:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Promiňte, ale '%s' karty nejsou podporovány." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." -msgstr "Nelze nalézt údaje pro naladění." +msgstr "Nelze nalézt výchozí údaje pro lazení." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Prosím ujistěte se že balíček dvb-apps je nainstalován." +msgstr "Ujistěte se prosím, že balíček dvb-apps je nainstalován." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "Prosím vyberte zemi a vysílač nejbližší k Vašemu umístění." +msgstr "Prosím vyberte zemi a vysílač nejbližší k místu, kde se nacházíte." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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 "" -"Pokud nevíte který vysílač zvolit, vyberte \"Nevím\" ze seznamu " +"Pokud nevíte, který vysílač zvolit, vyberte \"Není na seznamu\" ze seznamu " "poskytovatelů." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." -msgstr "Nicméně, hledání kanálů bude takto trvat déle." +msgstr "Hledání kanálu však bude trvat mnohem déle." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Není na seznamu" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Země" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Země:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "Vysíl_ač" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" msgstr "Vysílač" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satelit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" msgstr "Satelit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Poskytovatelé:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" msgstr "Poskytovatel" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Nevím" #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 msgid "Welcome to the digital television Assistant." -msgstr "Výtejte v pomocníku digitální televize" +msgstr "Vítejte v pomocníku nastavení digitální televize." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -"Bude automaticky nastavovat zařízení a hledat kanály , pokud to bude nutné." +"Pokud to bude nutné, pomůže vám automaticky nastavit zařízení a najít kanály." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Začněte tlačítkem \"Vpřed\"" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Režim pro znalce" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "Mód pro _odborníky" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" 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." -msgstr "Vyberte umístění, kde chcete uložit seznam kanálů." +msgstr "Vyberte umístění, kam chcete uložit seznam kanálů." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" @@ -752,7 +785,7 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 msgid "Configuring device" -msgstr "nastavování zařízení" +msgstr "Nastavení zařízení" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 msgid "TV" @@ -760,120 +793,157 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "Žádné kanály nebyly nalezeny" #: ../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 "" +"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 #, python-format msgid "The device has been added to the group %s." -msgstr "Zařízená bylo přidáno do skupiny %s." +msgstr "Zařízení bylo přidáno do skupiny %s." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 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:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Nastavit další zařízení" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Nastavení dokončeno" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Zařízení %s bylo nastaveno úspěšně." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Selhalo nastavování zařízení %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Probíhá úklid. Může to chvíli trvat." + +#: ../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" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" -"Vytvořené kanály mohou být použity při konfiguraci zařízení v controlním " +"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:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"Jste si jisti se zrušením?\n" -"Celý průběh bude ztracen." +"Jste si jisti, že chcete operaci zrušit?\n" +"Celý dosavadní průběh bude ztracen." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" -msgstr "Průvodce programem" +msgstr "Programový průvodce" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Digitální TV" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "Sledovat TV" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "Digitální _TV" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" -msgstr "_Průvodce programem" +msgstr "_Programový průvodce" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Smazat" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "Po_drobnosti" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Seřadit kanály" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" -msgstr "Podle _jména" +msgstr "Podle _názvu" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Podle _skupiny" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Obrácené pořadí" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Odstranit vybrané nahrávání?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Přehrávač filmů Totem" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Nahrávání %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "GNOME DVB Daemon není nainstalován" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Ovládací centrum digitální TV" + +#: ../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" + +#: ../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" diff -Nru gnome-dvb-daemon-0.1.16/po/da.po gnome-dvb-daemon-0.1.21/po/da.po --- gnome-dvb-daemon-0.1.16/po/da.po 2010-03-17 20:44:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/da.po 2010-08-23 12:56:15.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-25 11:30+0000\n" -"Last-Translator: Ville Witt \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:09+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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -24,7 +24,7 @@ #: ../client/gnomedvb/__init__.py:37 msgid "GNOME DVB Daemon Website" -msgstr "GNOME DVB Daemon hjemmesidee" +msgstr "Hjemmeside for GNOME DVB Daemon" #: ../client/gnomedvb/__init__.py:86 #, python-format @@ -58,7 +58,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 #: ../client/gnomedvb/ui/preferences/Dialogs.py:54 msgid "_Group:" -msgstr "Gruppe:" +msgstr "_Gruppe:" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 msgid "Device groups" @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanal" @@ -87,24 +87,24 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 msgid "An error occured while adding the group" -msgstr "En fejl opstod under tilføjelse af gruppen" +msgstr "Der opstod en fejl under tilføjelse af gruppen" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Er du sikker på at du vil slette gruppen '%s'?" +msgstr "Er du sikker på at du vil slette gruppen \"%s\"?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "Alle tildelinger til denne gruppe vil gå tabt" +msgstr "Alle tildelinger til denne gruppe vil gå tabt." #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" -msgstr "En fejl opstod under fjernelse af gruppen" +msgstr "Der opstod en fejl under fjernelse af gruppen" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 msgid "DVB Control Center" -msgstr "DVB Kontrolcenter" +msgstr "Kontrolcenter for DVB" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 msgid "" @@ -117,166 +117,167 @@ msgid "" "No devices are configured. Please go to preferences to configure them." msgstr "" -"Der er ikke nogle konfigurerede enheder. Dette gøres i Opsæting->Enheder" +"Der er ikke nogen konfigurerede enheder. Dette gøres i indstillingerne." #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 msgid "There is currently no schedule available for this channel" -msgstr "Der er p.t. ingen optagerplan til rådighed for denne kanal" +msgstr "Der er p.t. ingen optagelsesplan til rådighed for denne kanal" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" -msgstr "Optagelsesplaner" +msgstr "_Optagelsesplaner" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Rediger" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Vis" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Hjælp" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Håndter" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Administrér optagelsesplan" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" -msgstr "Optagelser" +msgstr "_Optagelser" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Håndter optagelser" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" -msgstr "Afslut" +msgstr "_Afslut" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Afslut programmet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "Kanalliste" +msgstr "_Kanallister" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" -msgstr "Rediger kanal" +msgstr "Rediger kanallister" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" -msgstr "Indstillinger" +msgstr "_Indstillinger" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" -msgstr "Visnings præference" +msgstr "Visningsindstillinger" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "Aktuelle programmer" +msgstr "_Aktuelle programmer" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "Se aktuelle- og næste programmer" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" -msgstr "Opdater" +msgstr "_Opdater" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Forny programoversigten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" -msgstr "Forrig dag" +msgstr "Dagen _før" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Gå til dagen før" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" -msgstr "Næste dag" +msgstr "_Næste dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Gå til næste dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" -msgstr "Vis/Skjul kanaler" +msgstr "Vis/skjul kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "Værk_tøjslinje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" -msgstr "Vis/Skjul værktøjslinjee" +msgstr "Vis/skjul værktøjslinje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" -msgstr "Om dette program" +msgstr "_Om" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Vis programinformation" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Optagelsesplan" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Optagelser" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Aktuelle programmer" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Dagen før" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Næste dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "Planlæg optagelse for valgte hændelse?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" +" Ask Hjorth Larsen https://launchpad.net/~askhl\n" " Ville Witt https://launchpad.net/~villewitt" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 @@ -292,7 +293,7 @@ #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "Adapter: %d, frontend: %d" +msgstr "Adapter: %d, grænseflade: %d" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 #, python-format @@ -301,11 +302,11 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "Føj til grupper" +msgstr "Føj til gruppe" #: ../client/gnomedvb/ui/preferences/Dialogs.py:47 msgid "Add Device to Group" -msgstr "Føj enhed til gruppee" +msgstr "Føj enheden til gruppen" #: ../client/gnomedvb/ui/preferences/Dialogs.py:92 msgid "Create new Group" @@ -317,15 +318,15 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:118 msgid "_Name:" -msgstr "Navn:" +msgstr "_Navn:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "Kanalfil:" +msgstr "Kanal_fil:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" -msgstr "Folder:" +msgstr "_Katalog:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:187 msgid "Select File" @@ -333,24 +334,24 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:196 msgid "Select Directory" -msgstr "Valgte folder" +msgstr "Vælg katalog" #: ../client/gnomedvb/ui/preferences/Dialogs.py:209 msgid "Edit group" msgstr "Redigér gruppe" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Digital TV præferencer" #: ../client/gnomedvb/ui/preferences/Preferences.py:88 msgid "Edit selected group" -msgstr "Rediger valgte gruppee" +msgstr "Rediger den valgte gruppe" #: ../client/gnomedvb/ui/preferences/Preferences.py:95 msgid "Remove selected device" -msgstr "Fjern valgte enhed" +msgstr "Fjern den valgte enhed" #: ../client/gnomedvb/ui/preferences/Preferences.py:104 msgid "Setup" @@ -374,7 +375,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:127 msgid "Add selected device to existing group" -msgstr "Føj valgte enhed til eksisterende gruppee" +msgstr "Føj den valgte enhed til eksisterende gruppe" #: ../client/gnomedvb/ui/preferences/Preferences.py:143 msgid "Configured devices" @@ -382,7 +383,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:154 msgid "Unconfigured devices" -msgstr "Ukonfigurerede enheder" +msgstr "" #: ../client/gnomedvb/ui/preferences/Preferences.py:219 msgid "Device could not be removed from group" @@ -391,7 +392,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:233 #, python-format msgid "Are you sure you want to remove device %s from %s" -msgstr "Vil du fjerne enheden %s fra %s" +msgstr "Vil du fjerne enheden %s fra %s?" #: ../client/gnomedvb/ui/preferences/Preferences.py:255 msgid "Group could not be created" @@ -402,24 +403,24 @@ "Make sure that you selected the correct channels file and directory where " "recordings are stored and that both are readable." msgstr "" -"Vælg den rigtige kanallistefil og mappen til optagelser - begge skæl være " -"læsbare." +"Kontrollér at du har valgt den rigtige kanallistefil og mappen til " +"optagelser - begge skal være læsbare." #: ../client/gnomedvb/ui/preferences/Preferences.py:286 msgid "Device could not be added to group" -msgstr "Enhed kunne ikke føjes til gruppee" +msgstr "Enhed kunne ikke føjes til gruppe" #: ../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 "" -"Enheden skal ikke være tildelt en anden gruppe og alle enheder i gruppen " +"Enheden skal ikke være tildelt en anden gruppe, og alle enheder i gruppen " "skal være af samme type" #: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 msgid "Delete selected recordings?" -msgstr "Slet valgte optagelse?" +msgstr "Slet valgte optagelser?" #: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 msgid "Pick a date" @@ -432,7 +433,7 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 msgid "Start time" -msgstr "Starttidspunkt" +msgstr "" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 #: ../client/gnomedvb/ui/widgets/ScheduleView.py:77 @@ -441,7 +442,7 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" -msgstr "Timer kunne ikke slettes" +msgstr "Timeren kunne ikke slettes" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" @@ -453,11 +454,11 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 msgid "Deleting this timer will abort the recording." -msgstr "Fjernes denne timer afbrydes optagelsen." +msgstr "Fjernes denne timer, afbrydes optagelsen." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" -msgstr "Timer kunne ikke kreeres." +msgstr "Timeren kunne ikke oprettes." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 msgid "" @@ -476,7 +477,7 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:67 msgid "_Channel:" -msgstr "Kanal:" +msgstr "_Kanal:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" @@ -485,17 +486,17 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 msgid "Channel:" -msgstr "Kanal" +msgstr "Kanal:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:95 msgid "_Start time:" -msgstr "Starttidspunkt" +msgstr "_Starttidspunkt" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "Varighed" +msgstr "_Varighed:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minutter" @@ -509,7 +510,7 @@ #: ../client/gnomedvb/ui/wizard/__init__.py:6 msgid "digital terrestrial" -msgstr "digitalt antenne" +msgstr "digital antenne" #: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 msgid "Channel group" @@ -517,7 +518,7 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "Tid:" +msgstr "_Tid:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" @@ -545,7 +546,7 @@ #: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 msgid "Length" -msgstr "Varighed" +msgstr "Længde" #: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 msgid "Now" @@ -555,11 +556,11 @@ msgid "Next" msgstr "Næste" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Ingen enheder blev fundet." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -568,115 +569,131 @@ "Der blev ikke fundet nogle ledige DVB enheder. Endheder kan være optaget af " "andre programmer." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Vælg enhed til konfiguration" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Navn" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" -msgstr "Typee" +msgstr "Type" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Vælg enheden, du vil konfigurere." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." -msgstr "Alle enheder er allerede konfigureret" +msgstr "Alle enheder er allerede konfigureret." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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å til kontrolcenteret hvis du vil ændere opsætingen af konfigurerede " +"Gå til kontrolcenteret hvis du vil ændre opsætningen af konfigurerede " "enheder." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." -msgstr "En fejl opstod under hentning af enheder" +msgstr "Der opstod en fejl under hentning af enheder." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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 "" -"Sørg for at ingen andre programmer tilgår dine DVB enheder og at du har " -"adgang til dem." +"Sørg for at ingen andre programmer tilgår dine DVB-enheder, og at du har " +"adgangsrettigheder til dem." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "Beskrivende fejlmeddelelse:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Søger efter enheder" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" -msgstr "Vælg enhed" +msgstr "Enhedsvalg" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -"Vælg de kanaler du ønsker at have i din kanalliste. Rækkefølgen her vil være " -"den vejledende fremover." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" -msgstr "Vælg alle" +msgstr "Marker alle" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Marker ingen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Vælg kodede kanaler" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Søger efter kanaler" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Ikke opfyldte krav" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Vælg land og sendemast" #: ../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 "Vælg land og udbyder" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" msgstr "Enhed ej understøttet" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "Beklager, men enheder af typen '%s' understøttes ikke." +msgstr "Beklager, men enheder af typen \"%s\" understøttes ikke." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "Kan ikke finde indledende tuningsdata" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "Pakken dvb-apps skal være installeret." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "Vælg land og den nærmeste sendemast." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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." @@ -684,59 +701,71 @@ "Hvis du ikke ved hvilken sendemast du bør vælge, kan du vælge \"Ukendt\" på " "listen af sendemaster." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." -msgstr "Vær opmærksom på at søgningen vil tage betydeligt længere tid." +msgstr "Vær opmærksom på at kanalsøgning vil tage betydeligt længere tid." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" -msgstr "Ej listet" +msgstr "Ikke anført" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Land:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Land:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Sendemast:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satellit:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Udbydere:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellit" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Udbyder" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Ukendt" #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 msgid "Welcome to the digital television Assistant." -msgstr "Velkommen til den digitale digitaltv assistent." +msgstr "Velkommen til den digitale digital-tv-assistent." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -"Den vil konfigurere dine enheder automatiskt og om nødvendigt søge efter " +"Den vil konfigurere dine enheder automatisk, og om nødvendigt søge efter " "kanaler." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Tryk \"Fortsæt\" for at begynde." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Ekspert-tilstand" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" -msgstr "Opsæting af Digital TV" +msgstr "Opsæting af digitalt tv" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." @@ -753,7 +782,7 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 msgid "TV" -msgstr "TV" +msgstr "Tv" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." @@ -774,37 +803,42 @@ msgid "An error occured while trying to setup the device." msgstr "Der opstod en fejl under konfigurationen af enheden." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" -msgstr "Konfiguration af endnu en enhed" +msgstr "Konfigurér endnu en enhed" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Konfiguration fuldført" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Enheden %s er nu konfigureret." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../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 "Opsæting af digital TV" +msgstr "Opsætning af digitalt tv" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../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 fremstillede kanalfil kan bruges til konfigurationen af dine enheder i " +"Den oprettede kanalfil kan bruges til konfigurationen af dine enheder i " "kontrolcenteret." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -812,65 +846,102 @@ "Er du sikker på at du vil afbryde?\\n\n" "Oplysningerne givet vil skulle angives igen." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Programguide" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" -msgstr "Digital TV" +msgstr "Digital-tv" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "Se fjernsyn" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" -msgstr "Digital TV" +msgstr "Digital-_tv" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" -msgstr "Program Guidee" +msgstr "_Programguide" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Slet" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" -msgstr "Detaljer" +msgstr "D_etaljer" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" -msgstr "Sorter kanaler" +msgstr "_Sorter kanaler" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" -msgstr "efter navn" +msgstr "Efter _navn" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" -msgstr "efter gruppe" +msgstr "Efter _gruppe" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" -msgstr "_Omvendt orden" +msgstr "_Omvendt rækkefølge" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Slet valgte optagelse?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem - filmafspiller" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Optagelse %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "GNOME DVB Daemon er ikke installeret" + +#. 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 "" + +#~ msgid "Select scrambled channels" +#~ msgstr "Vælg kodede kanaler" + +#~ msgid "" +#~ "Choose the channels you want to have in your list of channels. You can " +#~ "reorder the channels, too." +#~ msgstr "" +#~ "Vælg de kanaler du ønsker at have i din kanalliste. Rækkefølgen her vil være " +#~ "den vejledende fremover." + +#~ msgid "Country:" +#~ msgstr "Land:" + +#~ msgid "Antenna:" +#~ msgstr "Sendemast:" + +#~ msgid "Expert mode" +#~ msgstr "Ekspert-tilstand" + +#~ msgid "Providers:" +#~ msgstr "Udbydere:" + +#~ msgid "Satellite:" +#~ msgstr "Satellit:" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem - filmafspiller" diff -Nru gnome-dvb-daemon-0.1.16/po/de.po gnome-dvb-daemon-0.1.21/po/de.po --- gnome-dvb-daemon-0.1.16/po/de.po 2010-03-17 20:44:22.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/de.po 2010-08-23 12:56:17.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-23 15:20+0000\n" -"Last-Translator: Sebastian Pölsterl \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:13+0000\n" +"Last-Translator: Jan-Christoph Borchardt \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanal" @@ -124,166 +124,168 @@ 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:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "Geplante Au_fzeichnungen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "B_earbeiten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Ansicht" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Hilfe" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Geplante Aufzeichnungen verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "A_ufzeichnungen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Aufzeichnungen verwalten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "Beenden" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Programm beenden" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "_Kanalliste" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Kannaliste bearbeiten" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "Einstellungen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Einstellungen anzeigen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "_Was läuft gerade" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "Was läuft jetzt und demnächst." -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_Aktualisieren" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Programmführer aktualisieren" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "_Letzter Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Zu vorherigem Tag wechseln" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "_Nächster Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Zu nächstem Tag wechseln" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Kanäle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Sender anzeigen/verstecken" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_Werkzeugleiste" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Werkzeugleiste anzeigen/verstecken" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_Über" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Information über das Programm anzeigen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Geplante Aufzeichnungen" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Aufnahmen" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Was läuft gerade" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Vorheriger Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Nächster Tag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 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:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Florian Steinel https://launchpad.net/~florian-steinel\n" +" Jan-Christoph Borchardt https://launchpad.net/~jancborchardt\n" " Mario Rometsch https://launchpad.net/~roman-rometsch\n" " MixCool https://launchpad.net/~mixcool\n" " Nils Naumann https://launchpad.net/~nau\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" -" Tim Fuchs https://launchpad.net/~tim-fuchs" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" +" Tim Fuchs https://launchpad.net/~tim-fuchs\n" +" staedtler-przyborski https://launchpad.net/~staedtler-przyborski" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -346,7 +348,7 @@ msgstr "Gruppe bearbeiten" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Einstellungen für Digital TV" @@ -476,7 +478,7 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "" +msgstr "Aufnahme erfolgreich in Planung aufgenommen" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" @@ -488,7 +490,7 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" -msgstr "" +msgstr "Timer bearbeiten" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 @@ -499,11 +501,11 @@ msgid "_Start time:" msgstr "_Anfangszeit:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_Dauer:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "Minuten" @@ -525,7 +527,7 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" +msgstr "_Zeit:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" @@ -563,11 +565,11 @@ msgid "Next" msgstr "Nächster" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Es wurden keine Geräte gefunden" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -577,23 +579,23 @@ "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:58 -msgid "Select the device you want to configure." -msgstr "Wählen Sie das zu konfigurierende Gerät" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Name" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Typ" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Wählen Sie das zu konfigurierende Gerät" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Es sind bereits alle Geräte konfiguriert." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -601,11 +603,11 @@ "Im Kontrollzentrum können Sie die Einstellungen von bereits konfigurierten " "Geräten ändern." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "Beim Abfragen der Geräte ist ein Fehler aufgetreten." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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." @@ -613,82 +615,99 @@ "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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "Die ausführliche Fehlermeldung lautet:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Es wird nach Geräten gesucht" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Geräteauswahl" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Dieser Vorgang kann etwas Zeit benötigen" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -"Wählen Sie die Kanäle für Ihre Kanalliste aus. Sie können diese auch " -"umsortieren." +"Sie können die Känale welche in ihrer Kanalliste sein sollen auswählen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Alle auswählen" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Auswahl aufheben" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Verschlüsselte Kanäle auswählen." +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Kanäle:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "_Verschlüsselte Kanäle auswählen" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Signalqualität:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Signalstärke:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Es wird nach Kanälen gesucht" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Fehlende Voraussetzungen" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Länder- und Antennenauswahl" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Auswahl des Satelliten" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Auswahl des Landes und des Versorgers" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" msgstr "Nichtunterstützter Adapter" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Leider werden '%s' Karten nicht unterstützt." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "Es konnten keine Anfangs-Empfangseinstellungen gefunden werden." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "" "Bitte vergewissern Sie sich, dass das dvb-apps Paket installiert ist." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 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:133 +#: ../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." @@ -696,34 +715,46 @@ "Wenn Sie nicht wissen, welche Antenne Sie auswählen müssen, wählen Sie " "\"Keine Ahnung\"." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Nicht aufgeführt" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Land:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Antenne:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satellit:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Versorger:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Land:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antenne:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antenne" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satellit:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Versorger:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Versorger" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Keine Ahnung" @@ -731,7 +762,7 @@ msgid "Welcome to the digital television Assistant." msgstr "Willkommen zum Assistenten für den Digitalen Fernsehempfang" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -739,15 +770,15 @@ "Dies wird ihr Empfangsgerät automatisch konfigurieren und, falls nötig, nach " "Kanälen suchen." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Drücken Sie \"Weiter\" um fortzufahren" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Expertenmodus" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Expertenmodus" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Konfiguration für das Digitale Fernsehen" @@ -770,13 +801,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "Keine Kanäle gefunden" #: ../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 "" +"Stellen Sie sicher, dass die Antenne angschlossen ist und die richtigen " +"Tuningdaten ausgewählt wurden." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format @@ -787,29 +820,34 @@ 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:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Ein weiteres Gerät konfigurieren" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Konfiguration abgeschlossen" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, 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:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Konfiguration von Gerät %s fehlgeschlagen." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Aufräumen. Dies kann eine Weile andauern." + +#: ../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:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -817,7 +855,7 @@ "Die erzeugte Kanallisten-Datei kann verwendet werden, um Ihre Empfangsgeräte " "zu konfigurieren." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -825,68 +863,77 @@ "Sind Sie sicher, dass Sie abbrechen wollen?\n" "Jeglicher Fortschritt wird verloren gehen." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Programmführer" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Digitales Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" -msgstr "" +msgstr "Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "_Digitales Fernsehen" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Programmführer" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Löschen" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "D_etails" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "Kanäle _sortieren" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "Nach _Name" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Nach _Gruppe" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Reihenfolge umkehren" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Ausgewählte Aufnahme löschen?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem Video-Player" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Aufnahme %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "" +msgstr "Der GNOME DVB Daemon ist nicht installiert" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Digital Fernsehen Kontrollzentrum" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Aufnahmen planen und Programmführer durchsuchen" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Digital Fernsehen Einstellungen" #~ msgid "Refresh" #~ msgstr "Aktualisieren" @@ -912,6 +959,12 @@ #~ msgid "Timer" #~ msgstr "Timer" +#~ msgid "Expert mode" +#~ msgstr "Expertenmodus" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem Video-Player" + #~ msgid "Select a group:" #~ msgstr "Wählen Sie eine Gruppe:" @@ -934,8 +987,30 @@ #~ 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." diff -Nru gnome-dvb-daemon-0.1.16/po/en_GB.po gnome-dvb-daemon-0.1.21/po/en_GB.po --- gnome-dvb-daemon-0.1.16/po/en_GB.po 2010-03-17 20:44:20.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/en_GB.po 2010-08-23 12:56:15.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-03-04 21:18+0000\n" -"Last-Translator: Bruce Cowan \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-07-07 13:56+0000\n" +"Last-Translator: Andi Chandler \n" "Language-Team: English (United Kingdom) \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Channel" @@ -122,161 +122,165 @@ msgid "There is currently no schedule available for this channel" msgstr "There is currently no schedule available for this channel" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "_Recording schedule" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Edit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_View" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Help" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Manage" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Manage recording schedule" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_Recordings" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Manage recordings" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Quit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Quit the Program" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "_Channel Lists" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Edit channel lists" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Preferences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Display preferences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "_What's on now" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "See what's currently on and is coming next" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_Refresh" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Refresh programme guide" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "_Previous Day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Go to previous day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "_Next Day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Go to next day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Channels" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "View/Hide channels" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_Toolbar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "View/Hide toolbar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_About" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Display information about the programme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Recording schedule" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Recordings" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "What's on now" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Previous Day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Next Day" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "Schedule recording for the selected event?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Bruce Cowan https://launchpad.net/~bruce89" +" Andi Chandler https://launchpad.net/~bing\n" +" Bruce Cowan https://launchpad.net/~bruce89\n" +" Jonathon Fernyhough https://launchpad.net/~jfernyhough\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" +" jgraeme https://launchpad.net/~jgraeme" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -339,7 +343,7 @@ msgstr "Edit group" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Digital TV Preferences" @@ -491,11 +495,11 @@ msgid "_Start time:" msgstr "_Start time:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_Duration:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minutes" @@ -555,11 +559,11 @@ msgid "Next" msgstr "Next" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "No devices have been found." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -569,23 +573,23 @@ "make sure you close all programs such as video players that access your DVB " "card." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Select the device you want to configure." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Name" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Type" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Select the device you want to configure." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "All devices are already configured." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -593,11 +597,11 @@ "Go to the control centre if you want to alter the settings of already " "configured devices." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "An error occurred while retrieving devices." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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." @@ -605,80 +609,97 @@ "Make sure other applications don't access DVB devices and you have " "permissions to access them." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "The detailed error message is:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Searching for devices" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Device selection" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "This process can take some time" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Select all" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Deselect all" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Select scrambled channels" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Channels:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Select _scrambled channels" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Signal quality:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Signal strength:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Scanning for channels" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Missing requirements" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Country and antenna selection" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Satellite selection" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Country and provider selection" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" msgstr "Unsupported adaptor" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Sorry, but '%s' cards aren't supported." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "Could not find initial tuning data." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "Please make sure that the dvb-apps package is installed." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "" "Please choose a country and the antenna that is closest to your location." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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." @@ -686,34 +707,46 @@ "If you don't know which antenna to choose select \"Don't know\" from the " "list of providers." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." msgstr "" "However, searching for channels will take considerably longer this way." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Not listed" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Country:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Antenna:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satellite:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Providers:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Country:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antenna:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antenna" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satellite:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Providers:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Provider" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Don't know" @@ -721,7 +754,7 @@ msgid "Welcome to the digital television Assistant." msgstr "Welcome to the digital television Assistant." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -729,15 +762,15 @@ "It will automatically configure your devices and search for channels, if " "necessary." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Click \"Forward\" to begin." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Expert mode" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Expert mode" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Digital TV configuration" @@ -760,13 +793,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "No channels were found." #: ../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 "" +"Make sure that the antenna is connected and you have selected the correct " +"tuning data." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format @@ -777,29 +812,34 @@ msgid "An error occured while trying to setup the device." msgstr "An error occurred while trying to setup the device." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Configure Another Device" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Configuration finished" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "The device %s has been configured sucessfully." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Failed configuring device %s." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Cleaning up. This may take a while." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Setup digital TV" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -807,7 +847,7 @@ "The generated channels file can be used to configure your devices in the " "control centre." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -815,65 +855,102 @@ "Are you sure you want to abort?\n" "All process will be lost." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Programme Guide" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Digital TV" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "Watch TV" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "Digital _TV" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Programme Guide" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Delete" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "D_etails" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Order channels" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "By _name" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "By _group" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Reverse order" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Delete selected recording?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem Movie Player" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Recording %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "GNOME DVB Daemon is not installed" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Digital TV Control Centre" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Schedule recordings and browse programme guide" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Digital TV Setup" + +#~ msgid "Select scrambled channels" +#~ msgstr "Select scrambled channels" + +#~ msgid "" +#~ "Choose the channels you want to have in your list of channels. You can " +#~ "reorder the channels, too." +#~ msgstr "" +#~ "Choose the channels you want to have in your list of channels. You can " +#~ "reorder the channels, too." + +#~ msgid "Country:" +#~ msgstr "Country:" + +#~ msgid "Antenna:" +#~ msgstr "Antenna:" + +#~ msgid "Providers:" +#~ msgstr "Providers:" + +#~ msgid "Expert mode" +#~ msgstr "Expert mode" + +#~ msgid "Satellite:" +#~ msgstr "Satellite:" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem Movie Player" diff -Nru gnome-dvb-daemon-0.1.16/po/es.po gnome-dvb-daemon-0.1.21/po/es.po --- gnome-dvb-daemon-0.1.16/po/es.po 2010-03-17 20:44:24.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/es.po 2010-08-23 12:56:17.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-23 15:20+0000\n" -"Last-Translator: Sebastian Pölsterl \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:16+0000\n" +"Last-Translator: Jonay \n" "Language-Team: Spanish \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -49,7 +49,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "" +msgstr "Editar Lista de Canales" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 msgid "Channel groups" @@ -58,7 +58,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 #: ../client/gnomedvb/ui/preferences/Dialogs.py:54 msgid "_Group:" -msgstr "" +msgstr "_Grupo:" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 msgid "Device groups" @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Canal" @@ -124,170 +124,173 @@ msgid "There is currently no schedule available for this channel" msgstr "No hay un programa disponible para este canal" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "Planificación de _grabación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Edición" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Ver" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "_Ayuda" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Administrar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Administrar la planificación de grabación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_Grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Administrar grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Salir" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Salir del programa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "" +msgstr "_Lista de Canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Editar listas de canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Preferencias" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Preferencias de visualización" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "" +msgstr "Qué hay de nuevo" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 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:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" -msgstr "" +msgstr "_Actualizar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Refrescar la programación" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" -msgstr "" +msgstr "Día anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Ir al día anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" -msgstr "" +msgstr "Día siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Ir al día siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" -msgstr "" +msgstr "_Canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Ver/Ocultar canales" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" -msgstr "" +msgstr "_Barra de herramientas" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Ver/Ocultar barra de herramientas" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "Acerca _de" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Mostrar información acerca del programa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Programa de grabación" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Grabaciones" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Qué se está emitiendo ahora" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Día anterior" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Día siguiente" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 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:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " DiegoJ https://launchpad.net/~diegojromerolopez\n" +" Jonay https://launchpad.net/~jonay-santana\n" " Juan Asensio Sánchez https://launchpad.net/~okelet\n" " Juan J. Martínez https://launchpad.net/~jjmartinez\n" " Martin Albisetti https://launchpad.net/~beuno\n" " Miguel Ángel Del Rey https://launchpad.net/~miguel-delrey\n" " Monkey https://launchpad.net/~monkey-libre\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " Sortega https://launchpad.net/~sebasop\n" " WRdHat https://launchpad.net/~wag-guillen\n" -" pico.dev https://launchpad.net/~pico.dev" +" ironfisher https://launchpad.net/~dgvalde\n" +" pico.dev https://launchpad.net/~pico.dev\n" +" zer berros https://launchpad.net/~cerverros" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -311,31 +314,31 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "" +msgstr "Agregar al grupo" #: ../client/gnomedvb/ui/preferences/Dialogs.py:47 msgid "Add Device to Group" -msgstr "" +msgstr "Añadir dispositivo al grupo" #: ../client/gnomedvb/ui/preferences/Dialogs.py:92 msgid "Create new Group" -msgstr "" +msgstr "Crear nuevo grupo" #: ../client/gnomedvb/ui/preferences/Dialogs.py:112 msgid "General" -msgstr "" +msgstr "General" #: ../client/gnomedvb/ui/preferences/Dialogs.py:118 msgid "_Name:" -msgstr "" +msgstr "_Nombre:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "" +msgstr "_Archivo de canales:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" -msgstr "" +msgstr "_Directorio:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:187 msgid "Select File" @@ -350,7 +353,7 @@ msgstr "Editar grupo" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Preferencias de TV Digital" @@ -481,19 +484,19 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "" +msgstr "La grabación ha sido programada correctamente" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" -msgstr "" +msgstr "Añadir temporizador" #: ../client/gnomedvb/ui/timers/TimerDialog.py:67 msgid "_Channel:" -msgstr "" +msgstr "_Canal:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" -msgstr "" +msgstr "Editar Temporizador" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 @@ -502,13 +505,13 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:95 msgid "_Start time:" -msgstr "" +msgstr "_Hora de inicio:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "" +msgstr "_Duración:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minutos" @@ -530,7 +533,7 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" +msgstr "_Hora:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" @@ -568,11 +571,11 @@ msgid "Next" msgstr "Siguiente" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "No se han encontrado dispositivos." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -582,23 +585,23 @@ "segundo caso asegúrate de que cierras todos los programas como reproductores " "de vídeo que puedan acceder a tu tarjeta DVB." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Seleccione el dispositivo que desea configurar." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Nombre" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Tipo" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Seleccione el dispositivo que desea configurar." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Todos los dispositivos están ya configurados." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -606,11 +609,11 @@ "Vaya al centro de control si quiere modificar parámetros de dispositivos ya " "configurados." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "Se produjo un error al recuperar los dispositivos." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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." @@ -618,80 +621,96 @@ "Asegúrese de que otras aplicaciones no tienen acceso a los dispositivos DVB " "y tiene permisos para acceder a ellos." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "El mensaje de error detallado es:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Buscando dispositivos" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Selección de dispositivos" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Este proceso puede durar algún tiempo." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." -msgstr "" -"Selecciona los canales que quieres tener en tu lista de canales. También " -"puedes reordenar los canales." +"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:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" -msgstr "" +msgstr "Seleccionar todo" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" -msgstr "" +msgstr "Deseleccionar todo" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Seleccione canales mezclados" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Canales:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Seleccionar canales _codificados" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Calidad de la señal:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Potencia de señal:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Buscando canales" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Requerimientos faltantes" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Selección de país y antena" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Selección del satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Selección de país y proveedor" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 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:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Lo sentimos, pero las tarjetas '%s' no están soportadas." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "No se pudo encontrar información inicial de ajuste." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "Por favor, asegúrese de que el paquete dvb-apps está instalado." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 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." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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." @@ -699,33 +718,45 @@ "Si no sabes qué antena elegir, selecciona \"No lo sé\" de la lista de " "proveedores." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "No está en la lista" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "País:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Antena:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satélite:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Proveedores:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_País:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satélite:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Proveedores:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Proveedor" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "No lo sé" @@ -733,7 +764,7 @@ msgid "Welcome to the digital television Assistant." msgstr "Bienvenido al asistente de televisión digital." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -741,15 +772,15 @@ "Configurará automáticamente tus dispositivos y buscará canales, de ser " "necesario." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Haga click en \"Adelante\" para empezar." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Modo experto" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Modo experto" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Configuración de TV digital" @@ -772,13 +803,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "No se encontraron canales." #: ../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 "" +"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 #, python-format @@ -791,29 +824,34 @@ "Ha ocurrido un error mientras se intentaba ejecutar el servicio de " "instalación" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Configurar otro dispositivo" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "La configuración ha terminado" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "El dispositivo %s ha sido configurado con éxito." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Fallo configurando el dispositivo %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Limpiando. Esto puede llevar un momento." + +#: ../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:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -821,7 +859,7 @@ "El archivo de canales generado puede ser utilizado para configurar tus " "dispositivos en el centro de control." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -829,68 +867,77 @@ "¿Estás seguro que deseas abortar?\n" "Todos los procesos se perderán." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Guía de programas" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "TV Digital" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" -msgstr "" +msgstr "Ver TV" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "_TV Digital" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Programación" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Eliminar" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "D_etalles" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Ordenar canales" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "Por _nombre" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Por _grupo" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Orden reverso" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "¿Eliminar la grabación seleccionada?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Reproductor de películas Totem" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Grabando %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "" +msgstr "El demonio GNOME DVB no esta instalado" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Centro de control digial TV" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Programa grabaciones y navega la guía de programación" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Ajustes de televisión digital" #~ msgid "Device groups:" #~ msgstr "Grupos de dispositivo:" @@ -922,15 +969,31 @@ #~ msgid "Scanning for channels on device %s" #~ msgstr "Buscando canales en el dispositivo %s" +#~ msgid "" +#~ "Choose the channels you want to have in your list of channels. You can " +#~ "reorder the channels, too." +#~ msgstr "" +#~ "Selecciona los canales que quieres tener en tu lista de canales. También " +#~ "puedes reordenar los canales." + +#~ msgid "Expert mode" +#~ msgstr "Modo experto" + #~ msgid "DVB card is not configured" #~ msgstr "La tarjeta DVB no está configurada" #~ msgid "Do you want to search for channels now?" #~ msgstr "¿Deseas buscar canales ahora?" +#~ msgid "Totem Movie Player" +#~ msgstr "Reproductor de películas Totem" + #~ msgid "Add To Group" #~ msgstr "Agregar al grupo" +#~ msgid "Select scrambled channels" +#~ msgstr "Seleccione canales mezclados" + #~ msgid "Channel List Editor" #~ msgstr "Canal del editor de lista" @@ -946,5 +1009,17 @@ #~ msgid "Recordings' Directory" #~ msgstr "Directorio de grabaciones" +#~ msgid "Country:" +#~ msgstr "País:" + #~ msgid "Start time:" #~ msgstr "Hora de inicio:" + +#~ msgid "Providers:" +#~ msgstr "Proveedores:" + +#~ msgid "Satellite:" +#~ msgstr "Satélite:" + +#~ msgid "Antenna:" +#~ msgstr "Antena:" diff -Nru gnome-dvb-daemon-0.1.16/po/fi.po gnome-dvb-daemon-0.1.21/po/fi.po --- gnome-dvb-daemon-0.1.16/po/fi.po 2010-03-17 20:44:22.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/fi.po 2010-08-23 12:56:15.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-03-17 13:02+0100\n" -"PO-Revision-Date: 2009-12-23 22:27+0000\n" -"Last-Translator: Jussi Aalto \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-08-04 07:47+0000\n" +"Last-Translator: Timo Jyrinki \n" "Language-Team: Finnish \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" -msgstr "" +msgstr "GNOME DVB Velho" #: ../client/gnomedvb/__init__.py:37 msgid "GNOME DVB Daemon Website" -msgstr "" +msgstr "GNOME DVB Velhon kotisivusto" #: ../client/gnomedvb/__init__.py:86 #, python-format @@ -49,62 +49,62 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "" +msgstr "Muokkaa kanavalistoja" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 msgid "Channel groups" -msgstr "" +msgstr "Kanavaryhmät" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 #: ../client/gnomedvb/ui/preferences/Dialogs.py:54 msgid "_Group:" -msgstr "" +msgstr "_Ryhmä:" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 msgid "Device groups" -msgstr "" +msgstr "Laiteryhmät" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 msgid "All channels" -msgstr "" +msgstr "Kaikki kanavat" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" -msgstr "" +msgstr "Äänikanava" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 msgid "Choose a channel group" -msgstr "" +msgstr "Valitse kanavaryhmä" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 msgid "Channels of group" -msgstr "" +msgstr "Ryhmän kanavat" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 msgid "An error occured while adding the group" -msgstr "" +msgstr "Ryhmän lisäämisessä tapahtui virhe" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "" +msgstr "Oletko varma että haluat poistaa ryhmän '%s'?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "" +msgstr "Kaikki tehtävät tähän ryhmään menetetään" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 msgid "An error occured while removing the group" -msgstr "" +msgstr "Ryhmää poistettaessa tapahtui virhe" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 msgid "DVB Control Center" -msgstr "" +msgstr "DVB Ohjauspaneeli" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 msgid "" @@ -115,167 +115,170 @@ msgid "" "No devices are configured. Please go to preferences to configure them." msgstr "" +"Yhtään laitetta ei ole asennettuna. Mene suosikkeihin asettaaksesi kokoonpano" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 msgid "There is currently no schedule available for this channel" msgstr "Tälle kanavalle ei tällä hetkellä ole saatavilla ohjelmatietoja" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" -msgstr "" +msgstr "_Nauhoitusksien ajoitus" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" -msgstr "" +msgstr "_Muokkaa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" -msgstr "" +msgstr "_Näkymä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" -msgstr "Ohje" +msgstr "Tuki" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" -msgstr "" +msgstr "_Hallinta" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" -msgstr "" +msgstr "Muokkaa tallennusten aikataulua" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" -msgstr "" +msgstr "_Nauhoitukset" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" -msgstr "" +msgstr "Hallinnoi nauhoituksia" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" -msgstr "_Lopeta" +msgstr "_Poistu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Lopeta ohjelma" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "" +msgstr "_Kanavalistat" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" -msgstr "" +msgstr "Muokkaa kanavalistoja" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Asetukset" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" -msgstr "" +msgstr "Näytä suosikit" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "" +msgstr "_Mitä on meneillään" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" -msgstr "" +msgstr "Katso mitä on meneillään ja mitä on tulossa seuraavaksi" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" -msgstr "" +msgstr "_Päivitä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Päivitä ohjelmaopas" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" -msgstr "" +msgstr "_Edellinen päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Näytä edellinen päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" -msgstr "" +msgstr "_Seuraava päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Näytä seuraava päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" -msgstr "" +msgstr "_Kanavat" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Näytä/piilota kanavat" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" -msgstr "" +msgstr "_Työkalupalkki" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Näytä/piilota työkalupalkki" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" -msgstr "_Tietoja" +msgstr "_Tietoa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Näytä tietoja ohjelmasta" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "" +msgstr "Tallennusaikataulu" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Nauhoitukset" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" -msgstr "" +msgstr "Mitä on menossa nyt" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Edellinen päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Seuraava päivä" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" -msgstr "" +msgstr "Nauhoitetaanko valittu tapahtuma?" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Eetu Huisman https://launchpad.net/~eh\n" -" Jussi Aalto https://launchpad.net/~jtaalto" +" Heikki Kulhia https://launchpad.net/~hessuk\n" +" Jussi Aalto https://launchpad.net/~jtaalto\n" +" Timo Jyrinki https://launchpad.net/~timo-jyrinki" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -285,12 +288,12 @@ #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 #, python-format msgid "%s (%s)\n" -msgstr "" +msgstr "%s(%s)\n" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "" +msgstr "Sovitin: %d, Etupaneeli: %d" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 #, python-format @@ -299,31 +302,31 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "" +msgstr "Lisää ryhmään" #: ../client/gnomedvb/ui/preferences/Dialogs.py:47 msgid "Add Device to Group" -msgstr "" +msgstr "Lisää laite ryhmään" #: ../client/gnomedvb/ui/preferences/Dialogs.py:92 msgid "Create new Group" -msgstr "" +msgstr "Luo uusi ryhmä" #: ../client/gnomedvb/ui/preferences/Dialogs.py:112 msgid "General" -msgstr "" +msgstr "Yleisasetukset" #: ../client/gnomedvb/ui/preferences/Dialogs.py:118 msgid "_Name:" -msgstr "" +msgstr "_Nimi:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "" +msgstr "Kanavat _tiedosto:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" -msgstr "" +msgstr "_Hakemisto:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:187 msgid "Select File" @@ -331,14 +334,14 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:196 msgid "Select Directory" -msgstr "Valitse kansio" +msgstr "Valitse hakemisto" #: ../client/gnomedvb/ui/preferences/Dialogs.py:209 msgid "Edit group" -msgstr "Muokkaa ryhmää" +msgstr "Ryhmän muokkaus" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Digi-tv-asetukset" @@ -352,11 +355,11 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:104 msgid "Setup" -msgstr "" +msgstr "Asennus" #: ../client/gnomedvb/ui/preferences/Preferences.py:106 msgid "Setup devices" -msgstr "" +msgstr "Asenna laitteet" #: ../client/gnomedvb/ui/preferences/Preferences.py:113 msgid "Create new group" @@ -376,481 +379,548 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:143 msgid "Configured devices" -msgstr "" +msgstr "Asennetut laitteet" #: ../client/gnomedvb/ui/preferences/Preferences.py:154 msgid "Unconfigured devices" -msgstr "" +msgstr "Asentamattomat laitteet" #: ../client/gnomedvb/ui/preferences/Preferences.py:219 msgid "Device could not be removed from group" -msgstr "" +msgstr "Laitetta ei voida poistaa ryhmästä" #: ../client/gnomedvb/ui/preferences/Preferences.py:233 #, python-format msgid "Are you sure you want to remove device %s from %s" msgstr "" +"Oletko varma että haluat poistaa laitteen %s paikasta %s" #: ../client/gnomedvb/ui/preferences/Preferences.py:255 msgid "Group could not be created" -msgstr "" +msgstr "Ryhmää ei voitu luoda" #: ../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 "" +"Varmista että olet valinnut oikean kanavan tiedoston ja hakemiston, jonne " +"nauhoitukset tallennetaan ja että molemmat ovat luettavissa." #: ../client/gnomedvb/ui/preferences/Preferences.py:286 msgid "Device could not be added to group" -msgstr "" +msgstr "Laitetta ei voitu lisätä ryhmään" #: ../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 "" +"Varmista, että laitetta ei ole jo määritetty toiseen ryhmään ja että kaikki " +"ryhmän laitteet ovat samanlaisia" #: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 msgid "Delete selected recordings?" -msgstr "" +msgstr "Poistetaanko valitut tallenteet?" #: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 msgid "Pick a date" -msgstr "" +msgstr "Valitse päivämäärä" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 #: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 msgid "Title" -msgstr "" +msgstr "Nimi" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 msgid "Start time" -msgstr "" +msgstr "Aloitusaika" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 #: ../client/gnomedvb/ui/widgets/ScheduleView.py:77 msgid "Duration" -msgstr "" +msgstr "Kesto" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" -msgstr "" +msgstr "Ajastinta ei voitu poistaa" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" -msgstr "" +msgstr "Perutaanko käynnissä oleva nauhoitus?" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 msgid "The timer you selected belongs to a currently active recording." -msgstr "" +msgstr "Valitsemasi ajastin kuuluu käynnissä olevalle nauhoitukselle" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 msgid "Deleting this timer will abort the recording." -msgstr "" +msgstr "Tämän ajastimen poistaminen lopettaa nauhoituksen" #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" -msgstr "" +msgstr "Ajastinta ei voitu luoda" #: ../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 "" +"Varmista että ajastin ei ole ristiriidassa jonkin toisen ajastimen kanssa " +"eikä ala menneisyydestä" #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "" +msgstr "Nauhoitus on ajastettu onnistuneesti" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" -msgstr "" +msgstr "Lisää ajastin" #: ../client/gnomedvb/ui/timers/TimerDialog.py:67 msgid "_Channel:" -msgstr "" +msgstr "_Kanava:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" -msgstr "" +msgstr "Muokka ajastinta" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 msgid "Channel:" -msgstr "" +msgstr "Kanava:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:95 msgid "_Start time:" -msgstr "" +msgstr "_Alkamisaika:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "" +msgstr "_Kesto:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" -msgstr "" +msgstr "minuuttia" #: ../client/gnomedvb/ui/wizard/__init__.py:4 msgid "digital cable" -msgstr "" +msgstr "digitaalinen kaapeli" #: ../client/gnomedvb/ui/wizard/__init__.py:5 msgid "digital satellite" -msgstr "" +msgstr "digitaalinen satelliitti" #: ../client/gnomedvb/ui/wizard/__init__.py:6 msgid "digital terrestrial" -msgstr "" +msgstr "digitaalinen antenni" #: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 msgid "Channel group" -msgstr "" +msgstr "Kanavaryhmä" #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" +msgstr "_Aika:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" -msgstr "" +msgstr "Tiedot" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 msgid "Title:" -msgstr "" +msgstr "Nimi:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 msgid "Date:" -msgstr "" +msgstr "Päivämäärä:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 msgid "Duration:" -msgstr "" +msgstr "Kesto:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 msgid "Description:" -msgstr "" +msgstr "Kuvaus:" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 msgid "Start" -msgstr "" +msgstr "Aloita" #: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 msgid "Length" -msgstr "" +msgstr "Kesto" #: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 msgid "Now" -msgstr "" +msgstr "Nyt" #: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 msgid "Next" -msgstr "" +msgstr "Seuraava" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." -msgstr "" +msgstr "Yhtään laitetta ei löytynyt" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 "" +"Joko yhtään DVB-korttia ei ole asennettu tai kaikki kortit ovat käytössä. " +"Jos kaikki kortit ovat käytössä, varmista että suljet kaikki ohjelmat kuten " +"videon toisto jotka käyttävät DVB-korttia." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" -msgstr "" +msgstr "Nimi" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" -msgstr "" +msgstr "Tyyppi" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Valitse laite, jonka haluat määrittää." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." -msgstr "" +msgstr "Kaikki laitteet on jo määritetty" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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 "" +"Mene asetusvalikkoon jos haluat muuttaa jo määritettyjen laitteiden asetuksia" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." -msgstr "" +msgstr "Laitteita haettaessa tapahtui virhe" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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 "" +"Varmista että muut ohjelmat eivät käytä DVB-laitteita ja että sinulla on " +"lupa käyttää niitä." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" -msgstr "" +msgstr "Yksityiskohtainen virheilmoitus on:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" -msgstr "" +msgstr "Etsitään laitteita" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" -msgstr "" +msgstr "Laitteen valinta" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Tämä vaihe voi kestää jonkin aikaa." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." -msgstr "" +"You can select the channels you want to have in your list of channels." +msgstr "Voit valita kanavat, jotka haluat omaan kanavalistaasi" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" -msgstr "" +msgstr "Valitse kaikki" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" -msgstr "" +msgstr "Poista kaikki valinnat" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Kanavat:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Valitse sekoitetut kanavat" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Signaalilaatu:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Signaalin voimakkuus:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" -msgstr "" +msgstr "Etsitään kanavia" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" -msgstr "" +msgstr "Puuttuvat vaatimukset" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" -msgstr "" +msgstr "Maan ja antennin valinta" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Satelliitin valinta" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" -msgstr "" +msgstr "Maan ja palveluntarjoajan valinta" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" -msgstr "" +msgstr "Tukematon sovitin" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." -msgstr "" +msgstr "Anteeksi, mutta '%s'-kortit eivät ole tuettuja" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." -msgstr "" +msgstr "Alustavia viritystietoja ei löytynyt" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." -msgstr "" +msgstr "Vamistathan että paketti dvb-apps on asennettu." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "" +msgstr "Valitse valtio ja antenni, joka on lähinnä omaa sijaintiasi." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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 "" +"Jos et tiedät mikä antenni sinun tulisi valita, valitse \"En tiedä\" " +"palveluntarjoajien listalta." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." msgstr "" +"Kuitenkin kanavien etsintä tällä tavalla vie huomattavasti pidemmän aikaa." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" -msgstr "" +msgstr "Ei luettelossa" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Maa:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antenni:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antenni" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satelliitti:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satelliitti" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Palveluntarjoaja:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Palveluntarjoaja" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" -msgstr "" +msgstr "En tiedä" #: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 msgid "Welcome to the digital television Assistant." -msgstr "" +msgstr "Tervetuloa digi-tv:n Avustajaan" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" +"Se tekee automaattisesti kokoonpanoasetukset laitteillesi ja tarvittaessa " +"etsii kanavia." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." -msgstr "" +msgstr "Näpäytä \"Seuraava\" aloittaaksesi" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Asiantuntijatila" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" -msgstr "" +msgstr "Digi-tv kokoonpano" #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 msgid "Choose a location where you want to save the list of channels." -msgstr "" +msgstr "Valitse paikka, johon haluat tallentaa kanavalistan." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" -msgstr "" +msgstr "Tallenna kanavat" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 msgid "Configuring device" -msgstr "" +msgstr "Määritetään laite" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 msgid "TV" -msgstr "" +msgstr "TV" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "Kanavia ei löytynyt" #: ../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 "" +"Varmista, että antenni on yhdistetty ja olet valinnut oikeat viritystiedot" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format msgid "The device has been added to the group %s." -msgstr "" +msgstr "Laite on lisätty ryhmään %s" #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 msgid "An error occured while trying to setup the device." -msgstr "" +msgstr "Laitteen asennuksessa tapahtui virhe" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" -msgstr "" +msgstr "Tee uusi laitekokoonpano" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" -msgstr "" +msgstr "Kokoonpano saatiin valmiiksi" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." -msgstr "" +msgstr "Laitteen %s kokoonpano on valmis." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Laitteen %s kokoonpano epäonnistui" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Siivotaan. Tämä saattaa kestää hetken." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" -msgstr "" +msgstr "Asenna digi-TV" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" +"Luodut kanavien tiedostoa voidaan käyttää asentamaan laitteitasi " +"asetuskeskuksessa." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" +"Oletko varma että haluat keskeyttää?\n" +"Koko prosessi menetetään." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" -msgstr "" +msgstr "Ohjelmaopas" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" -msgstr "" +msgstr "Digi-TV" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" -msgstr "" +msgstr "Katso televisiota" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" -msgstr "" +msgstr "Digitaalinen _TV" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" -msgstr "" +msgstr "_Ohjelmaopas" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" -msgstr "" +msgstr "_Poisto" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" -msgstr "" +msgstr "Y_ksityiskohdat" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" -msgstr "" +msgstr "_Tilaa kanavat" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" -msgstr "" +msgstr "_Nimen mukaan" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" -msgstr "" +msgstr "_Ryhmän mukaan" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" -msgstr "" +msgstr "Käänteinen jä_rjestys" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" -msgstr "" - -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "" +msgstr "Poistetaanko valittu tallenne?" -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" -msgstr "" +msgstr "Tallennetaan %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "" +msgstr "GNOME DVB Velho ei ole asennettu" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Digitaalisen TV:n ohjauskeskus" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Ajasta tallenteita ja selaa ohjelmaopasta" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Digi-TV:n asetukset" #~ msgid "Refresh" #~ msgstr "Päivitä" diff -Nru gnome-dvb-daemon-0.1.16/po/fr.po gnome-dvb-daemon-0.1.21/po/fr.po --- gnome-dvb-daemon-0.1.16/po/fr.po 2010-03-17 20:44:22.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/fr.po 2010-08-23 12:56:15.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-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-23 15:19+0000\n" -"Last-Translator: Sebastian Pölsterl \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 22:07+0000\n" +"Last-Translator: Guillaume Mazoyer \n" "Language-Team: French \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 msgid "GNOME DVB Daemon" -msgstr "Démon DVB pour GNOME" +msgstr "Service DVB pour GNOME" #: ../client/gnomedvb/__init__.py:37 msgid "GNOME DVB Daemon Website" -msgstr "Site web du démon DVB pour GNOME" +msgstr "Site Internet du Service DVB pour GNOME" #: ../client/gnomedvb/__init__.py:86 #, python-format @@ -73,9 +73,9 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" -msgstr "Canal" +msgstr "Chaîne" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 msgid "Choose a channel group" @@ -87,20 +87,20 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 msgid "An error occured while adding the group" -msgstr "Une erreur est survenue lors de l'ajout de ce groupe" +msgstr "Une erreur est survenue lors de l'ajout du groupe" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 #, python-format msgid "Are you sure you want to delete the group '%s'?" -msgstr "Etes vous sur de vouloir supprimer le groupe '%s' ?" +msgstr "Êtes-vous sûr de vouloir supprimer le groupe '%s' ?" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 msgid "All assignments to this group will be lost." -msgstr "" +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 de ce groupe" +msgstr "Une erreur est survenue lors de la suppression du groupe" #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 msgid "DVB Control Center" @@ -110,179 +110,181 @@ 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 chaine sur la gauche pour voir " -"le programme TV" +"Choisissez un groupe de périphérique 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 les préférences." +msgstr "Aucun matériel n'est configuré. Configurez-le dans Préférences." #: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 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:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" -msgstr "" +msgstr "_Planning d'enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" -msgstr "_Éditer" +msgstr "_Édition" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" -msgstr "" +msgstr "_Affichage" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Aide" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" -msgstr "" +msgstr "_Gérer" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Gestion de la programmation des enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" -msgstr "En_registrements" +msgstr "_Enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Gérer les enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Quitter" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Quitter le programme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "Listes des _chaînes" +msgstr "_Listes des chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Editer les listes de chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Préférences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Afficher les préférences" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "" +msgstr "_En ce moment" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "Voir le programme actuel et le prochain" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" -msgstr "_Rafraîchir" +msgstr "_Actualiser" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" -msgstr "Rafraîchir le programme TV" +msgstr "Actualiser le guide TV" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" -msgstr "Jour _précédent" +msgstr "_Jour précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Aller au jour précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" -msgstr "Jour suiva_nt" +msgstr "_Jour suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Aller au jour suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" -msgstr "Voi/Cacher les chaînes" +msgstr "Montrer/Cacher les chaînes" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" -msgstr "Barre d'ou_tils" +msgstr "_Barre d'outils" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" -msgstr "Voir/Cacher la barre d'outils" +msgstr "Montrer/Cacher la barre d'outils" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_À propos" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Afficher les informations sur le programme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" -msgstr "Enregistrement programmé" +msgstr "Planning d'enregistrement" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Enregistrements" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" -msgstr "Programme en cours" +msgstr "En ce moment" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Jour Précédent" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Jour Suivant" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" 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:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" +" Guillaume Mazoyer https://launchpad.net/~respawneral\n" " Michel Boisset https://launchpad.net/~michel-boisset\n" " Pierre Slamich https://launchpad.net/~pierre-slamich\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " Simon Pireyn https://launchpad.net/~spireyn\n" " Stéphane Loeuillet https://launchpad.net/~leroutier\n" -" durden https://launchpad.net/~david-lebouquin" +" durden https://launchpad.net/~david-lebouquin\n" +" rudy1210 https://launchpad.net/~rudy1210" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 msgid "Devices" @@ -297,7 +299,7 @@ #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "" +msgstr "Adaptateur : %d, Vue : %d" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 #, python-format @@ -306,15 +308,15 @@ #: ../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 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 msgid "Create new Group" -msgstr "Créer un nouveau groupe" +msgstr "Créer un nouveau Groupe" #: ../client/gnomedvb/ui/preferences/Dialogs.py:112 msgid "General" @@ -345,9 +347,9 @@ msgstr "Modifier le groupe" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 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 msgid "Edit selected group" @@ -355,7 +357,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:95 msgid "Remove selected device" -msgstr "Enlever le matériel sélectionné" +msgstr "Enlever le périphérique sélectionné" #: ../client/gnomedvb/ui/preferences/Preferences.py:104 msgid "Setup" @@ -363,7 +365,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:106 msgid "Setup devices" -msgstr "" +msgstr "Configurer le matériel" #: ../client/gnomedvb/ui/preferences/Preferences.py:113 msgid "Create new group" @@ -391,7 +393,7 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:219 msgid "Device could not be removed from group" -msgstr "Le périphérique ne pourrait pas être enlevé du groupe" +msgstr "Le périphérique n'a pas pu être enlevé du groupe" #: ../client/gnomedvb/ui/preferences/Preferences.py:233 #, python-format @@ -401,27 +403,27 @@ #: ../client/gnomedvb/ui/preferences/Preferences.py:255 msgid "Group could not be created" -msgstr "Le groupe ne pourrait pas être créé" +msgstr "Le groupe n'a pas pu être crée" #: ../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 "" -"Vérifier que vous avez sélectionné le bon fichier des chaînes et le bon " -"répertoire où les enregistrements sont stockés et que les deux sont lisibles." +"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." #: ../client/gnomedvb/ui/preferences/Preferences.py:286 msgid "Device could not be added to group" -msgstr "Le périphérique ne pourrait pas être ajouté au groupe" +msgstr "Le périphérique n'a pas pu être ajouté au groupe" #: ../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 "" -"Vérifier que le périphérique n'est pas déjà dans un autre groupe et que les " -"périphériques du groupe sont du même type." +"Vérifier 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 msgid "Delete selected recordings?" @@ -447,7 +449,7 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" -msgstr "Le minuteur ne pourrait pas être effacé" +msgstr "Le minuteur n'a pas pu être effacé" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" @@ -465,7 +467,7 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 msgid "Timer could not be created" -msgstr "Le minuteur ne pourrait pas être créé" +msgstr "Le minuteur n'a pas pu être créé" #: ../client/gnomedvb/ui/timers/MessageDialogs.py:30 msgid "" @@ -473,7 +475,7 @@ "in the past." msgstr "" "Vérifier que le minuteur n'entre pas en conflit avec un autre et ne commence " -"dans le passé." +"pas dans le passé." #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" @@ -498,35 +500,35 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:95 msgid "_Start time:" -msgstr "" +msgstr "_Heure de début :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_Durée :" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minutes" #: ../client/gnomedvb/ui/wizard/__init__.py:4 msgid "digital cable" -msgstr "" +msgstr "câble numérique" #: ../client/gnomedvb/ui/wizard/__init__.py:5 msgid "digital satellite" -msgstr "" +msgstr "satellite numérique" #: ../client/gnomedvb/ui/wizard/__init__.py:6 msgid "digital terrestrial" -msgstr "" +msgstr "terrestre numérique" #: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 msgid "Channel group" -msgstr "" +msgstr "Groupe de chaînes" #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" +msgstr "_Heure :" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" @@ -564,11 +566,11 @@ msgid "Next" msgstr "Suivant" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Aucun matériel n'a été trouvé." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -578,23 +580,23 @@ "Dans ce dernier cas, fermer tous les programmes tel que les lecteurs vidéo " "qui accèdent à votre carte DVB." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Sélectionner le matériel que vous souhaitez configurer." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Nom" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Type" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../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." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Tous les matériels sont déjà configurés" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -602,125 +604,156 @@ "Allez dans le centre de contrôle si vous voulez modifier le réglage d'un " "matériel déjà configuré." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." -msgstr "Une erreur est survenue durant la recherche du matériel" +msgstr "Une erreur est survenue durant la recherche du matériel." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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 "" -"Vérifiez que les autres applications n'accèdent pas aux matériels DVB et que " -"vous avez les permissions d'y accéder." +"Vérifiez que d'autres applications n'accèdent pas aux périphériques DVB et " +"que vous avez les permissions d'y accéder." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "Le message d'erreur détaillé est :" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Recherche du matériel" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Sélection du matériel" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Ce processus risque de prendre un certain temps" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 msgid "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -"Choisissez les chaînes que vous souhaitez mettre dans votre liste de " -"chaînes. Vous pouvez aussi réordonner les chaînes." +"Vous pouvez sélectionner les canaux que vous désirez avoir dans votre liste " +"de canaux" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Tout sélectionner" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Tout désélectionner" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Chaînes :" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "_Sélectionner les chaînes cryptées" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Qualité du signal :" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Intensité du signal :" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Recherche des chaînes" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" -msgstr "" +msgstr "Paramètres manquants" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" -msgstr "" +msgstr "Choix de pays et d'émetteur" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Choix du satellite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" -msgstr "" +msgstr "Choix du pays et du fournisseur" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" -msgstr "Adaptateur non supporté" +msgstr "Tuner non supporté" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Désolé mais les cartes '%s' ne sont pas supportées." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." -msgstr "" +msgstr "Aucun paramètre initial de réglage n'a été trouvé" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." -msgstr "Vérifier que le paquet dvb-apps est installé." +msgstr "Vérifier que le paquet dvb-apps est bien installé." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." -msgstr "Choisissez un pays et l'antenne la 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:133 +#: ../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 "" +"Si vous ne savez pas quel émetteur choisir, choisissez \"Je ne sais pas\" " +"dans la liste." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." -msgstr "" -"Cependant la recherche des chaînes prendra beaucoup plus de temps de cette " -"manière." +msgstr "Néanmoins, la recherche de chaînes sera plus longue." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Non listé" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Pays :" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Antenne :" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satellite :" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Pays :" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Emetteur :" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Emetteur" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satellite :" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Fournisseurs d'accés :" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Fournisseur d'accès" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Je ne sais pas" @@ -728,7 +761,7 @@ 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:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -736,21 +769,21 @@ "Cela va configurer automatiquement vos périphériques et effectuer la " "recherche des chaînes si nécessaire." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Cliquer \"Suivant\" pour commencer" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Mode expert" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Mode expert" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 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 endroit où sauvegarder la liste des chaînes." +msgstr "Choisissez un dossier où sauvegarder la liste des chaînes." #: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 msgid "Save channels" @@ -767,13 +800,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "Aucune chaîne(s) trouvée(s)." #: ../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 "" +"Assurez vous que votre antenne est branchée et que vous avez sélectionné les " +"bons réglages." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format @@ -784,29 +819,34 @@ 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:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Configurer un autre périphérique" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" -msgstr "Configuration terminé" +msgstr "Configuration terminée" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, 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:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Echec de configuration du périphérique %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "RAZ. Patience..." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" -msgstr "" +msgstr "Réglage TV numérique" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -814,76 +854,85 @@ "Le fichier des chaînes généré peut être utilisé pour configurer votre " "périphérique dans le centre de contrôle." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -"Êtes-vous sûr de vouloir d'annuler ?\n" -"Tous les process seront perdus." +"Êtes-vous sûr de vouloir annuler ?\n" +"Tous les processus seront perdus." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Guide des programmes" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Télévision numérique" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "Regarder la télévision" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "_Télévision numérique" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" -msgstr "Guide des _programmes" +msgstr "_Guide des programmes" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" -msgstr "" +msgstr "_Supprimer" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" -msgstr "" +msgstr "_Détails" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Ordre des chaînes" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "Par _nom" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Par _groupe" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" -msgstr "Inve_rser l'ordre" +msgstr "_Inverser l'ordre" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Supprimer l'enregistrement sélectionné ?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Lecteur vidéo Totem" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" -msgstr "" +msgstr "Enregistrement %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "GNOME DVB Daemon n'est pas installé" +msgstr "Le service GNOME DVB n'est pas installé" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Centre de contrôle DVB" + +#: ../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" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Réglage DVB" #~ msgid "Toolbar" #~ msgstr "Barre d'outils" @@ -894,6 +943,9 @@ #~ msgid "Add To Group" #~ msgstr "Ajouter au Groupe" +#~ msgid "Totem Movie Player" +#~ msgstr "Lecteur vidéo Totem" + #~ msgid "Channel List Editor" #~ msgstr "Editeur de liste de canaux" @@ -908,3 +960,22 @@ #~ msgid "Device groups:" #~ msgstr "Groupes de périphériques:" + +#~ 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." diff -Nru gnome-dvb-daemon-0.1.16/po/it.po gnome-dvb-daemon-0.1.21/po/it.po --- gnome-dvb-daemon-0.1.16/po/it.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/it.po 2010-08-23 12:56:16.000000000 +0000 @@ -0,0 +1,925 @@ +# Italian 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. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-07-01 10:49+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: 2010-08-23 12:56+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#: ../client/gnomedvb/__init__.py:34 +msgid "GNOME DVB Daemon" +msgstr "GNOME DVB Daemon" + +#: ../client/gnomedvb/__init__.py:37 +msgid "GNOME DVB Daemon Website" +msgstr "Sito internet di GNOME DVB Daemon" + +#: ../client/gnomedvb/__init__.py:86 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d ora" +msgstr[1] "%d ore" + +#: ../client/gnomedvb/__init__.py:88 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d minuto" +msgstr[1] "%d minuti" + +#: ../client/gnomedvb/__init__.py:90 +#, python-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "%d secondo" +msgstr[1] "%d secondi" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 +msgid "Edit Channel Lists" +msgstr "Modifica le liste dei canali" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +msgid "Channel groups" +msgstr "Gruppi di canali" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +msgid "_Group:" +msgstr "_Gruppo:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +msgid "Device groups" +msgstr "Gruppi di periferiche" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +msgid "All channels" +msgstr "Tutti i canali" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 +#: ../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 +msgid "Channel" +msgstr "Canale" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +msgid "Choose a channel group" +msgstr "Scegli un gruppo di canali" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +msgid "Channels of group" +msgstr "Canali del gruppo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "Errore nell'aggiunta del gruppo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "Sei sicuro di voler cancellare il gruppo '%s'?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "Tutti gli assegnamenti a questo gruppo saranno persi." + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "Errore nella rimozione del gruppo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +msgid "DVB Control Center" +msgstr "Centro di Controllo DVB" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 +msgid "" +"Choose a device group and channel on the left to view the program guide" +msgstr "" +"Scegli un gruppo di periferiche e un canale sulla sinistra per vedere la " +"guida dei programmi" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "" +"No devices are configured. Please go to preferences to configure them." +msgstr "" +"Nessuna periferica è configurata. Prego andare nelle preferenze per " +"configurarla." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "There is currently no schedule available for this channel" +msgstr "Non c'è al momento nessun orario disponibile per questo canale" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 +msgid "_Recording schedule" +msgstr "Orario _registrazioni" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +msgid "_Edit" +msgstr "_Modifica" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_View" +msgstr "_Visualizza" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "Help" +msgstr "Aiuto" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +msgid "_Manage" +msgstr "_Gestisci" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +msgid "Manage recording schedule" +msgstr "Gestisci l'orario di registrazione" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +msgid "_Recordings" +msgstr "_Registrazioni" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "Manage recordings" +msgstr "Gestisci registrazioni" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "_Quit" +msgstr "_Esci" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "Quit the Program" +msgstr "Esci dal programma" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +msgid "_Channel Lists" +msgstr "_Lista canali" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "Edit channel lists" +msgstr "Modifica le liste dei canali" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "_Preferences" +msgstr "_Preferenze" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "Display preferences" +msgstr "Visualizza preferenze" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +msgid "_What's on now" +msgstr "_Cos'è in onda ora" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "See what's currently on and is coming next" +msgstr "Guarda cos'è in onda ora e prossimamente" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "_Refresh" +msgstr "_Aggiorna" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +msgid "Refresh program guide" +msgstr "Aggiorna la guida dei programmi" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +msgid "_Previous Day" +msgstr "_Giorno precedente" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +msgid "Go to previous day" +msgstr "Vai al giorno precedente" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +msgid "_Next Day" +msgstr "_Giorno successivo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +msgid "Go to next day" +msgstr "Vai al giorno successivo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +msgid "_Channels" +msgstr "_Canali" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "View/Hide channels" +msgstr "Mostra/Nascondi canali" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "_Toolbar" +msgstr "_Barra degli strumenti" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "View/Hide toolbar" +msgstr "Mostra/Nascondi barra degli strumenti" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +msgid "_About" +msgstr "_A riguardo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "Display informations about the program" +msgstr "Mostra informazioni sul programma" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "Orario registrazioni" + +#. 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 +msgid "Recordings" +msgstr "Registrazioni" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 +msgid "What's on now" +msgstr "Cosa c'è adesso" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +msgid "Previous Day" +msgstr "Giorno precedente" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +msgid "Next Day" +msgstr "Giorno successivo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 +msgid "Schedule recording for the selected event?" +msgstr "Programma la registrazione dell'evento selezionato?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" r1348 https://launchpad.net/~req1348" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +msgid "Devices" +msgstr "Periferiche" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "Adattatore: %d, Interfaccia: %d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#, python-format +msgid "Group %d" +msgstr "Gruppo %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "Aggiungi al gruppo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +msgid "Add Device to Group" +msgstr "Aggiungi periferica al gruppo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +msgid "Create new Group" +msgstr "Crea un nuovo gruppo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +msgid "General" +msgstr "Generale" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +msgid "_Name:" +msgstr "_Nome:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +msgid "Channels _file:" +msgstr "_File canali:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +msgid "_Directory:" +msgstr "_Cartella:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +msgid "Select File" +msgstr "Seleziona file" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +msgid "Select Directory" +msgstr "Seleziona cartella" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +msgid "Edit group" +msgstr "Modifica gruppo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:38 +#: ../client/totem-plugin/dvb-daemon.py:352 +msgid "Digital TV Preferences" +msgstr "Preferenze TV digitale" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +msgid "Edit selected group" +msgstr "Modifica il gruppo selezionato" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +msgid "Remove selected device" +msgstr "Rimuovi la periferica selezionata" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +msgid "Setup" +msgstr "Configurazione" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup devices" +msgstr "Configura periferiche" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +msgid "Create new group" +msgstr "Crea un nuovo gruppo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +msgid "Create new group for selected device" +msgstr "Crea un nuovo gruppo per la periferica selezionata" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +msgid "Add to group" +msgstr "Aggiungi al gruppo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +msgid "Add selected device to existing group" +msgstr "Aggiungi la periferica selezionata ad un gruppo esistente" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +msgid "Configured devices" +msgstr "Periferiche configurate" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +msgid "Unconfigured devices" +msgstr "Periferiche non configurate" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +msgid "Device could not be removed from group" +msgstr "La periferica non può essere rimossa dal gruppo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "Sei sicuro di voler rimuovere la periferica %s da %s" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +msgid "Group could not be created" +msgstr "Il gruppo non può essere creato" + +#: ../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 "" +"Accertati di aver selezionato la cartella ed il file canali corretti dove le " +"registrazioni sono memorizzati e che entrambi siano leggibili." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +msgid "Device could not be added to group" +msgstr "La periferica non può essere aggiunta al gruppo" + +#: ../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 "" +"Accertati che la periferica non sia già assegnata ad un altro gruppo e che " +"tutte le periferiche nel gruppo siano dello stesso tipo." + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +msgid "Delete selected recordings?" +msgstr "Cancellare le registrazioni selezionate?" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "Seleziona una data" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "Titolo" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +msgid "Start time" +msgstr "Orario d'inizio" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:77 +msgid "Duration" +msgstr "Durata" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +msgid "Timer could not be deleted" +msgstr "Il timer non può essere cancellato" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +msgid "Abort active recording?" +msgstr "Interrompere le registrazioni attive?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "The timer you selected belongs to a currently active recording." +msgstr "Il timer selezionato appartiene ad una registrazione attiva." + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +msgid "Deleting this timer will abort the recording." +msgstr "Cancellare questo timer interromperà la registrazione." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "Il timer non può essere creato" + +#: ../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 "" +"Accertati che il timer non sia in conflitto con un altro e che non inizi nel " +"passato." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "La registrazione è stata programmata con successo" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +msgid "Add Timer" +msgstr "Aggiungi timer" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +msgid "_Channel:" +msgstr "_Canale:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +msgid "Edit Timer" +msgstr "Modifica timer" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +msgid "Channel:" +msgstr "Canale:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +msgid "_Start time:" +msgstr "_Ora di inizio:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +msgid "_Duration:" +msgstr "_Durata:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +msgid "minutes" +msgstr "minuti" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "cavo digitale" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "satellite digitale" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "digitale terrestre" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "Gruppo canale" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "_Ora:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 +msgid "Details" +msgstr "Dettagli" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +msgid "Title:" +msgstr "Titolo:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +msgid "Date:" +msgstr "Data:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +msgid "Duration:" +msgstr "Durata:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +msgid "Description:" +msgstr "Descrizione:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "Avvio" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "Lunghezza" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +msgid "Now" +msgstr "Ora" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +msgid "Next" +msgstr "Successivo" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "Nessuna periferica trovata" + +#: ../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 "" +"Nessuna scheda DVB installata o tutte le schede sono occupate. Nel secondo " +"caso accertati di chiudere tutti i programmi tipo riproduttori video che " +"accedono alla scheda DVB." + +#: ../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 "Seleziona la periferica che vuoi configurare" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "Tutte le periferiche sono già configurate" + +#: ../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 "" +"Vai al centro di controllo se vuoi modificare le impostazioni di periferiche " +"già configurate" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "Errore nel recupero delle periferiche" + +#: ../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 "" +"Controlla che altri programmi non accedano alle periferiche DVB a che tu " +"abbia i permessi per accederle." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "Il messaggio d'errore dettagliato è:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "Ricerca delle periferiche" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "Selezione periferica" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Questo processo può impiegare un po' di tempo" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 +msgid "" +"You can select the channels you want to have in your list of channels." +msgstr "Puoi selezionare i canali che vuoi avere nella tua lista dei canali." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +msgid "Select all" +msgstr "Seleziona tutto" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +msgid "Deselect all" +msgstr "Deseleziona tutto" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Canali:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "_Seleziona canali criptati" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Qualità del segnale:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Intensità segnale:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +msgid "Scanning for channels" +msgstr "Scansione canali" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "Requisiti mancanti" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "Selezione nazione ed antenna" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Selezione satellite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "Selezione nazione e provider" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "Periferica non supportata" + +#. 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 "Spiacente, ma le schede '%s' non sono supportate" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "Non posso trovare i dati di sintonizzazione iniziale" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "Prego accertarsi che il pacchetto dvb-apps sia installato." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "" +"Please choose a country and the antenna that is closest to your location." +msgstr "" +"Prego selezionare una nazione e l'antenna più vicina alla tua posizione." + +#: ../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 "" +"Se non sai quale antenna scegliere, scegli \"Non lo so\" dalla lista dei " +"provider." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "" +"However, searching for channels will take considerably longer this way." +msgstr "" +"Comunque, la ricerca dei canali impiegherà così un tempo molto più lungo." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "Non in elenco" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Nazione:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antenna:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antenna" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satellite:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Provider:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Provider" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +msgid "Don't know" +msgstr "Non lo so" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +msgid "Welcome to the digital television Assistant." +msgstr "Benvenuto all'Assistente della televisione digitale" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "" +"It will automatically configure your devices and search for channels, if " +"necessary." +msgstr "" +"Configurerà automaticamente le tue periferiche e ricercherà i canali, se " +"necessario." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +msgid "Click \"Forward\" to begin." +msgstr "Clicca \"Avanti\" per iniziare." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "Modalità _esperto" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +msgid "Digital TV configuration" +msgstr "Configurazione TV digitale" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "Scegli una posizione dove vuoi salvare la lista dei canali." + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "Salva i canali" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +msgid "Configuring device" +msgstr "Configurazione della periferica" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +msgid "TV" +msgstr "TV" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "No channels were found." +msgstr "Nessun canale trovato." + +#: ../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 "" +"Controlla che l'antenna sia connessa e di aver selezionato i dati di " +"sintonizzazione corretti." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#, python-format +msgid "The device has been added to the group %s." +msgstr "La periferica è stata aggiunta al gruppo %s." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +msgid "An error occured while trying to setup the device." +msgstr "Errore nella configurazione della periferica." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configure Another Device" +msgstr "Configura un'altra periferica" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +msgid "Configuration finished" +msgstr "Configurazione terminata" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "La periferica %s è stata configurata con successo." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#, python-format +msgid "Failed configuring device %s." +msgstr "Configurazione della periferica %s fallita." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Pulizia. Potrebbe impiegare un po' di tempo." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "Configura TV digitale" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +msgid "" +"The generated channels file can be used to configure your devices in the " +"control center." +msgstr "" +"Il file canali generato può essere usato per configurare le tue periferiche " +"nel centro di controllo." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" +"Sei sicuro di voler terminare?\n" +"Tutti i processo saranno persi." + +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 +msgid "Program Guide" +msgstr "Guida al programma" + +#: ../client/totem-plugin/dvb-daemon.py:307 +msgid "Digital TV" +msgstr "TV digitale" + +#: ../client/totem-plugin/dvb-daemon.py:347 +msgid "Watch TV" +msgstr "Guarda TV" + +#: ../client/totem-plugin/dvb-daemon.py:348 +msgid "Digital _TV" +msgstr "_TV digitale" + +#: ../client/totem-plugin/dvb-daemon.py:350 +msgid "_Program Guide" +msgstr "Guida _programma" + +#: ../client/totem-plugin/dvb-daemon.py:353 +msgid "_Delete" +msgstr "_Cancella" + +#: ../client/totem-plugin/dvb-daemon.py:354 +msgid "D_etails" +msgstr "D_ettagli" + +#: ../client/totem-plugin/dvb-daemon.py:355 +msgid "_Order channels" +msgstr "_Ordina canali" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "By _name" +msgstr "Per _nome" + +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "By _group" +msgstr "Per _gruppo" + +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "_Reverse order" +msgstr "Ordine inve_rso" + +#: ../client/totem-plugin/dvb-daemon.py:514 +msgid "Delete selected recording?" +msgstr "Eliminare le registrazioni selezionate?" + +#: ../client/totem-plugin/dvb-daemon.py:588 +#, python-format +msgid "Recording %d" +msgstr "Registrazione %d" + +#: ../client/totem-plugin/dvb-daemon.py:648 +msgid "GNOME DVB Daemon is not installed" +msgstr "GNOME DVB daemon non è installato" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Centro controllo TV digitale" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Programma registrazioni e sfoglia la guida ai programmi" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Configurazione TV digitale" diff -Nru gnome-dvb-daemon-0.1.16/po/LINGUAS gnome-dvb-daemon-0.1.21/po/LINGUAS --- gnome-dvb-daemon-0.1.16/po/LINGUAS 2010-03-17 20:49:39.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/LINGUAS 2010-08-23 13:36:14.000000000 +0000 @@ -8,7 +8,9 @@ es fi fr +it pl +pt_BR sr sv te diff -Nru gnome-dvb-daemon-0.1.16/po/pl.po gnome-dvb-daemon-0.1.21/po/pl.po --- gnome-dvb-daemon-0.1.16/po/pl.po 2010-03-17 20:44:20.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/pl.po 2010-08-23 12:56:15.000000000 +0000 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-03-04 20:35+0000\n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 21:27+0000\n" "Last-Translator: Tomasz Świątek \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" @@ -16,7 +16,7 @@ "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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -77,7 +77,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanał" @@ -126,163 +126,163 @@ 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:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "_Harmonogram nagrań" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Edytuj" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Widok" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Pomoc" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Zarządzaj" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Zarządzaj harmonogramem nagrań" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_Nagrania" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Zarządzaj nagraniami" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Zakończ" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Zakończ program" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "Lista Kanałów" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Edytuj listę kanałów" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Preferencje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Wyświetl preferencje" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "_Teraz na antenie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "Zobacz co teraz i wkrótce w programie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_Odśwież" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Odśwież przewodnik po programach" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "_Poprzedni Dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Przejdź do poprzedniego dnia" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "_Następny Dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Przejdź do następnego dnia" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Kanały" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Pokaż/Ukryj kanały" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_Pasek narzędzi" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Pokaż/Ukryj pasek narzędzi" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_O programie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Wyświetl informacje o programie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Harmonogram nagrań" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Nagrania" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Teraz na antenie" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Poprzedni dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Następny dzień" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 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:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Jarosław Ogrodnik https://launchpad.net/~goz\n" " Michał Sawicz https://launchpad.net/~saviq\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " Tomasz Świątek https://launchpad.net/~devegoo\n" " pp/bs https://launchpad.net/~pawprok" @@ -347,7 +347,7 @@ msgstr "Edytuj grupę" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Preferencje TV Cyfrowej" @@ -500,11 +500,11 @@ msgid "_Start time:" msgstr "_Czas rozpoczęcia:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_Czas Trwania:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minut" @@ -564,11 +564,11 @@ msgid "Next" msgstr "Następny" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Nie znaleziono urządzeń" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -577,23 +577,23 @@ "W systemie nie ma żadnych kart DVB albo wszystkie są zajęte. W tym drugim " "wypadku zamknij wszystkie programy używające kart DVB (np. odtwarzacz wideo)." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:58 -msgid "Select the device you want to configure." -msgstr "Zaznacz urządzenie kŧóre chcesz skonfigurować." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Nazwa" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Rodzaj" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Zaznacz urządzenie kŧóre chcesz skonfigurować." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Wszystkie urządzenia są już skonfigurowane." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -601,11 +601,11 @@ "Przejdź do centrum sterowania jeśli chcesz zmienić ustawienia urządzeń już " "skonfigurowanych." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "Wystąpił błąd podczas pozyskiwania urządzeń." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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." @@ -613,111 +613,139 @@ "Upewnij się że inna aplikacja nie używa urządzeń DVB i że posiadasz " "odpowiednie prawa dostępu do nich." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "Szczegółowy komunikat błędu wygląda tak:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Wyszukiwanie urządzeń" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Wybór urządzeń" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Ten proces może chwilę potrwać." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 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ść." +"You can select the channels you want to have in your list of channels." +msgstr "Możesz zaznaczyć kanały które chcesz mieć na swojej liście." -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Zaznacz wszystko" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Odznacz wszystko" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Wybieraj zakodowane kanały" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Kanały:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Zaznacz _kodowane kanały" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Jakość sygnału:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Moc sygnału:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Wyszukiwanie kanałów" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Brakujące wymagania" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Wybór kraju i nadajnika" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Wybór satelit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Wybór kraju i dostawcy" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" msgstr "Nieobsługiwane urządzenie" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Przykro nam, ale urządzenie \"%s\" nie jest obsługiwane." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "Brak początkowych danych strojenia." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "Upewnij się, że zainstalowano pakiet dvb-apps." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 msgid "" "Please choose a country and the antenna that is closest to your location." msgstr "Wybierz kraj oraz najbliższy nadajnik." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:133 +#: ../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 "Jeśli nie znasz nadajnika, wybierz \"Nieznany\" z listy dostawców." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:134 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 msgid "" "However, searching for channels will take considerably longer this way." msgstr "Miej na uwadze, że poszukiwanie kanałów potrwa dłużej." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Brak na liście" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Kraj:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Kraj:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antena:" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" msgstr "Antena" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satelita:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Dostawca:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satelita" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Dostawcy:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Dostawca" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Nieznany" @@ -725,7 +753,7 @@ msgid "Welcome to the digital television Assistant." msgstr "Witaj w asystencie cyfrowej telewizji" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -733,15 +761,15 @@ "Program automatycznie skonfiguruje i wyszuka kanały, jeśli będzie to " "konieczne." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Wybierz \"Dalej\" aby rozpocząć." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Tryb zaawansowany" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Tryb eksperta" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Konfiguracja telewizji cyfrowej" @@ -764,13 +792,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +msgstr "Nie znaleziono kanałów." #: ../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 "" +"Upewnij się że antena jest podłączona i że zaznaczyłeś właściwe dane " +"potrzebne do skanowania." #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 #, python-format @@ -781,29 +811,34 @@ msgid "An error occured while trying to setup the device." msgstr "Wystąpił błąd podczas próby skonfigurowania urządzenia." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Skonfiguruj inne urządzenie" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Konfiguracja zakończona" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, 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:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Niepowodzenie przy konfigurowaniu urządzenia %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Czyszczenie. To zajmie chwilę." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Skonfiguruj telewizję cyfrową" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -811,7 +846,7 @@ "Wygenerowana lista kanałów może być użyta do skonfigurowania urządzeń w " "centrum sterowania." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -819,69 +854,78 @@ "Na pewno chcesz przerwać?\n" "Wszystkie dane zostaną utracone." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Przewodnik po programach" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Telewizja cyfrowa" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "Oglądaj TV" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "_Telewizja cyfrowa" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Przewodnik po programach" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Usuń" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "_Szczegóły" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" -msgstr "_Uporżdkuj kanały" +msgstr "_Uporządkuj kanały" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "Według _nazw" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Według _grup" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Odwrócony porządek" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Usunąć wybrane nagranie?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem - odtwarzacz filmów" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Nagrywanie %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "Demon GNOME DVB nie jest zainstalowany" +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Centrum Sterowania Cyfrowej TV" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Zaprogramuj nagrania i przeglądaj przewodnik programowy" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Ustawienia Cyfrowej TV" + #~ msgid "Device groups:" #~ msgstr "Grupy urządzeń:" @@ -906,12 +950,28 @@ #~ msgid "Pick date" #~ msgstr "Wybierz datę" +#~ 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 "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" @@ -934,5 +994,17 @@ #~ 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.16/po/POTFILES.in gnome-dvb-daemon-0.1.21/po/POTFILES.in --- gnome-dvb-daemon-0.1.16/po/POTFILES.in 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/POTFILES.in 2010-04-01 09:50:30.000000000 +0000 @@ -29,3 +29,5 @@ client/gnomedvb/ui/wizard/SetupWizard.py client/totem-plugin/dvb-daemon.py client/totem-plugin/dvb-daemon.totem-plugin.in +data/gnome-dvb-control.desktop.in.in +data/gnome-dvb-setup.desktop.in.in diff -Nru gnome-dvb-daemon-0.1.16/po/POTFILES.skip gnome-dvb-daemon-0.1.21/po/POTFILES.skip --- gnome-dvb-daemon-0.1.16/po/POTFILES.skip 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/POTFILES.skip 2010-04-01 09:50:30.000000000 +0000 @@ -1 +1,3 @@ src/Main.c +data/gnome-dvb-control.desktop.in +data/gnome-dvb-setup.desktop.in diff -Nru gnome-dvb-daemon-0.1.16/po/pt_BR.po gnome-dvb-daemon-0.1.21/po/pt_BR.po --- gnome-dvb-daemon-0.1.16/po/pt_BR.po 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/pt_BR.po 2010-08-23 12:56:16.000000000 +0000 @@ -0,0 +1,929 @@ +# Brazilian Portuguese 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. +# +msgid "" +msgstr "" +"Project-Id-Version: gnome-dvb-daemon\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-08-08 22:44+0000\n" +"Last-Translator: marcosx \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: 2010-08-23 12:56+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#: ../client/gnomedvb/__init__.py:34 +msgid "GNOME DVB Daemon" +msgstr "GNOME DVB Daemon" + +#: ../client/gnomedvb/__init__.py:37 +msgid "GNOME DVB Daemon Website" +msgstr "Website do GNOME DVB Daemon" + +#: ../client/gnomedvb/__init__.py:86 +#, python-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "%d hora" +msgstr[1] "%d horas" + +#: ../client/gnomedvb/__init__.py:88 +#, python-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "%d minuto" +msgstr[1] "%d minutos" + +#: ../client/gnomedvb/__init__.py:90 +#, 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 listas de canal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 +msgid "Channel groups" +msgstr "Grupos de Canal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 +#: ../client/gnomedvb/ui/preferences/Dialogs.py:54 +msgid "_Group:" +msgstr "_Grupo:" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 +msgid "Device groups" +msgstr "Grupos de Dispositivo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:126 +msgid "All channels" +msgstr "Todos os canais" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:140 +#: ../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 +msgid "Channel" +msgstr "Canal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:154 +msgid "Choose a channel group" +msgstr "Escolha um grupo de canal" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:155 +msgid "Channels of group" +msgstr "Canais do grupo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:256 +msgid "An error occured while adding the group" +msgstr "Ocorreu um erro ao adicionar o grupo" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:265 +#, python-format +msgid "Are you sure you want to delete the group '%s'?" +msgstr "Você tem certeza que quer deletar o grupo '%s'?" + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:268 +msgid "All assignments to this group will be lost." +msgstr "Todas as atribuições a este grupo serão perdidas." + +#: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:283 +msgid "An error occured while removing the group" +msgstr "Ocorreu um erro ao remover o grupo" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:53 +msgid "DVB Control Center" +msgstr "Painel de Controle do DVB" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:102 +msgid "" +"Choose a device group and channel on the left to view the program guide" +msgstr "" +"Escolha um grupo de dispositivo e canal à esquerda para vizualizar o guia de " +"programas" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:103 +msgid "" +"No devices are configured. Please go to preferences to configure them." +msgstr "" +"Nenhum dispositivo configurado. Por favor, vá em opções para configura-los." + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:104 +msgid "There is currently no schedule available for this channel" +msgstr "Não há nenhum agendamento disponível para este canal" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 +msgid "_Recording schedule" +msgstr "_Gravando agendamento" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +msgid "_Edit" +msgstr "_Editar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 +msgid "_View" +msgstr "_Visualizar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 +msgid "Help" +msgstr "Ajuda" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +msgid "_Manage" +msgstr "_Gerenciar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 +msgid "Manage recording schedule" +msgstr "Gerenciar gerenciamento de gravação" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +msgid "_Recordings" +msgstr "Gravações" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +msgid "Manage recordings" +msgstr "Gerenciar gravações" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 +msgid "_Quit" +msgstr "_Sair" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 +msgid "Quit the Program" +msgstr "Sair do Programa" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +msgid "_Channel Lists" +msgstr "_Listas de Canal" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +msgid "Edit channel lists" +msgstr "Editar listas de canal" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 +msgid "_Preferences" +msgstr "_Opções" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 +msgid "Display preferences" +msgstr "Mostrar opções" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +msgid "_What's on now" +msgstr "_O que está passando agora" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 +msgid "See what's currently on and is coming next" +msgstr "Veja o que está passando e que vem a seguir" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +msgid "_Refresh" +msgstr "_Atualizar" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 +msgid "Refresh program guide" +msgstr "Atualizar guia de programação" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +msgid "_Previous Day" +msgstr "_Dia Anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 +msgid "Go to previous day" +msgstr "Ir para dia anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 +msgid "_Next Day" +msgstr "_Próximo Dia" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 +msgid "Go to next day" +msgstr "Ir para próximo dia" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +msgid "_Channels" +msgstr "_Canais" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +msgid "View/Hide channels" +msgstr "Visualizar/ Esconder canais" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 +msgid "_Toolbar" +msgstr "_Barra de ferramentas" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 +msgid "View/Hide toolbar" +msgstr "Visualizar/Esconder barra de ferramentas" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 +msgid "_About" +msgstr "_Sobre" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 +msgid "Display informations about the program" +msgstr "Mostrar informações sobre o programa" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 +msgid "Recording schedule" +msgstr "Gravando agendamento" + +#. 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 +msgid "Recordings" +msgstr "Gravações" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 +msgid "What's on now" +msgstr "O que está passando agora" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +msgid "Previous Day" +msgstr "Dia anterior" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +msgid "Next Day" +msgstr "Próximo dia" + +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 +msgid "Schedule recording for the selected event?" +msgstr "Agendar gravação para o evento selecionado?" + +#. translators: These appear in the About dialog, usual format applies. +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Douglas Santos https://launchpad.net/~douglasrpg\n" +" Felipe G. Wozniak https://launchpad.net/~felipewozniak\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" +" marcosx https://launchpad.net/~marcosx" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 +msgid "Devices" +msgstr "Dispositivos" + +#. translators: first is device's name, second its type +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:66 +#, python-format +msgid "%s (%s)\n" +msgstr "%s (%s)\n" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 +#, python-format +msgid "Adapter: %d, Frontend: %d" +msgstr "Adaptador: %d, Frontend: %d" + +#: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 +#, python-format +msgid "Group %d" +msgstr "Grupo %d" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:29 +msgid "Add to Group" +msgstr "Adicionar ao Grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:47 +msgid "Add Device to Group" +msgstr "Adicionar dispositivo ao Grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:92 +msgid "Create new Group" +msgstr "Criar um novo grupo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:112 +msgid "General" +msgstr "Geral" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:118 +msgid "_Name:" +msgstr "_Nome:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:130 +msgid "Channels _file:" +msgstr "Canais _arquivo:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:159 +msgid "_Directory:" +msgstr "_Diretório:" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:187 +msgid "Select File" +msgstr "Selecionar Arquivo" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:196 +msgid "Select Directory" +msgstr "Selecionar Diretório" + +#: ../client/gnomedvb/ui/preferences/Dialogs.py:209 +msgid "Edit group" +msgstr "Editar grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:38 +#: ../client/totem-plugin/dvb-daemon.py:352 +msgid "Digital TV Preferences" +msgstr "Opções de TV Digital" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:88 +msgid "Edit selected group" +msgstr "Editar grupo selecionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:95 +msgid "Remove selected device" +msgstr "Remover dispositivo selecionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:104 +msgid "Setup" +msgstr "Configuração" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:106 +msgid "Setup devices" +msgstr "Dispositivos de configuração" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:113 +msgid "Create new group" +msgstr "Criar um novo grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:117 +msgid "Create new group for selected device" +msgstr "Criar um novo grupo para o dispositivo selecionado" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:123 +msgid "Add to group" +msgstr "Adicionar ao grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:127 +msgid "Add selected device to existing group" +msgstr "Adicionar dispositivo selecionado ao grupo existente" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:143 +msgid "Configured devices" +msgstr "Dispositivos configurados" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:154 +msgid "Unconfigured devices" +msgstr "Dispositivos não configurados" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:219 +msgid "Device could not be removed from group" +msgstr "O dispositivo não pode ser removido do grupo" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:233 +#, python-format +msgid "Are you sure you want to remove device %s from %s" +msgstr "" +"Você tem certeza que quer remover o dispositivo %s de %s" + +#: ../client/gnomedvb/ui/preferences/Preferences.py:255 +msgid "Group could not be created" +msgstr "O grupo não pode ser criado" + +#: ../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 "" +"Tenha certeza que você selecionou o arquivo de canais correto e o diretório " +"onde as gravações estão armazenadas e que ambos podem ser lidos." + +#: ../client/gnomedvb/ui/preferences/Preferences.py:286 +msgid "Device could not be added to group" +msgstr "O dispositivo não pode ser adicionado ao grupo" + +#: ../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 "" +"Tenha certeza de que o dispositivo já não está atribuído a um grupo " +"diferente e que todos os dispositivos no grupo são do mesmo tipo." + +#: ../client/gnomedvb/ui/recordings/RecordingsDialog.py:95 +msgid "Delete selected recordings?" +msgstr "Deletar gravações selecionadas?" + +#: ../client/gnomedvb/ui/timers/CalendarDialog.py:25 +msgid "Pick a date" +msgstr "Escolher uma data" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:83 +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:39 +msgid "Title" +msgstr "Título" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:91 +msgid "Start time" +msgstr "Hora de início" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:98 +#: ../client/gnomedvb/ui/widgets/ScheduleView.py:77 +msgid "Duration" +msgstr "Duração" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 +msgid "Timer could not be deleted" +msgstr "O contador não pode ser deletado" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 +msgid "Abort active recording?" +msgstr "Abortar gravação ativa?" + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:179 +msgid "The timer you selected belongs to a currently active recording." +msgstr "O contador que você selecionou pertence a uma gravação ativa." + +#: ../client/gnomedvb/ui/timers/EditTimersDialog.py:180 +msgid "Deleting this timer will abort the recording." +msgstr "Deletar este contador vai abortar a gravação." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:28 +msgid "Timer could not be created" +msgstr "O contador não pode ser criado" + +#: ../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 "" +"Tenha certeza de que o contador não está conflitando com outro e que não " +"começa no passado." + +#: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 +msgid "Recording has been scheduled successfully" +msgstr "A gravação foi agendada com sucesso" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:64 +msgid "Add Timer" +msgstr "Adicionar contador" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:67 +msgid "_Channel:" +msgstr "_Canal:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:84 +msgid "Edit Timer" +msgstr "Editar Contador" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:87 +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 +msgid "Channel:" +msgstr "Canal:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:95 +msgid "_Start time:" +msgstr "_Hora de início:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 +msgid "_Duration:" +msgstr "_Duração:" + +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 +msgid "minutes" +msgstr "minutos" + +#: ../client/gnomedvb/ui/wizard/__init__.py:4 +msgid "digital cable" +msgstr "Cabo digital" + +#: ../client/gnomedvb/ui/wizard/__init__.py:5 +msgid "digital satellite" +msgstr "Satélite digital" + +#: ../client/gnomedvb/ui/wizard/__init__.py:6 +msgid "digital terrestrial" +msgstr "Terrestre digital" + +#: ../client/gnomedvb/ui/widgets/ChannelGroupsView.py:31 +msgid "Channel group" +msgstr "Grupo de canais" + +#: ../client/gnomedvb/ui/widgets/DateTime.py:50 +msgid "_Time:" +msgstr "_Horário:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 +msgid "Details" +msgstr "Detalhes" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:56 +msgid "Title:" +msgstr "Título:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:64 +msgid "Date:" +msgstr "Data:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:68 +msgid "Duration:" +msgstr "Duração:" + +#: ../client/gnomedvb/ui/widgets/DetailsDialog.py:72 +msgid "Description:" +msgstr "Descrição:" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:35 +msgid "Start" +msgstr "Início" + +#: ../client/gnomedvb/ui/widgets/RecordingsView.py:41 +msgid "Length" +msgstr "Duração" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:41 +msgid "Now" +msgstr "Agora" + +#: ../client/gnomedvb/ui/widgets/RunningNextView.py:53 +msgid "Next" +msgstr "Próximo" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 +msgid "No devices have been found." +msgstr "Nenhum dispositivo foi encontrado." + +#: ../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 "Selecione o dispositivo que você quer congigurar." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 +msgid "All devices are already configured." +msgstr "Todos os dispositivos já estão 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 "" +"Vá para o painel de controle se você quiser alterar as configurações de " +"dispositivos já configurados." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 +msgid "An error occured while retrieving devices." +msgstr "Ocorreu um erro ao recuperar dispositivos." + +#: ../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 "" +"Tenha certeza de que outras aplicações não acessam dispositivos DVB e que " +"você tem permissões para acessá-los." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 +msgid "The detailed error message is:" +msgstr "A mensagem de erro detalhada é:" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 +msgid "Searching for devices" +msgstr "Procurando por dispositivos" + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 +msgid "Device selection" +msgstr "Seleção de dispositivos" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:60 +msgid "This process can take some time." +msgstr "Este processo pode levar algum tempo." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:61 +msgid "" +"You can select the channels you want to have in your list of channels." +msgstr "Você pode selecionar os canais que quer ter em sua lista de canais." + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 +msgid "Select all" +msgstr "Selecionar tudo" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 +msgid "Deselect all" +msgstr "Desmarcar tudo" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Canais" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Selecionar canais _embaralhados" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Qualidade de sinal:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 +msgid "Scanning for channels" +msgstr "Procurando por canais" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 +msgid "Missing requirements" +msgstr "Requerimentos que faltam" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 +msgid "Country and antenna selection" +msgstr "País e seleção de antena" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Seleção de satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 +msgid "Country and provider selection" +msgstr "País e seleção de provedor" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 +msgid "Unsupported adapter" +msgstr "Adaptador não suportado" + +#. 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 "Desculpe, mas placas '%s' não são suportadas." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 +msgid "Could not find initial tuning data." +msgstr "Não pode encontrar informação de sintonização inicial" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 +msgid "Please make sure that the dvb-apps package is installed." +msgstr "Por favor, tenha certeza de que o pacote dvb-apps está instalado." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 +msgid "" +"Please choose a country and the antenna that is closest to your location." +msgstr "" +"Por favor, selecione o país e a antena que está mais perto de seu local." + +#: ../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 "" +"Se você não sabe qual antena escolher selecione \"Não sei\" da lista de " +"provedores." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:137 +msgid "" +"However, searching for channels will take considerably longer this way." +msgstr "" +"No entanto, procurar por canais vai demorar consideravelmente mais deste " +"modo." + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 +msgid "Not listed" +msgstr "Não listado" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_País:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antena:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satélite:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satélite" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Provedores" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Provedor" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 +msgid "Don't know" +msgstr "Não sei" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:29 +msgid "Welcome to the digital television Assistant." +msgstr "Bem-vindo ao Assistente de televisão digital." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +msgid "" +"It will automatically configure your devices and search for channels, if " +"necessary." +msgstr "" +"Isto vai configurar automaticamente seus dispositivos e procurar por canais, " +"se necessário." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 +msgid "Click \"Forward\" to begin." +msgstr "Clique \"Avançar\" para começar." + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Modo Expert" + +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 +msgid "Digital TV configuration" +msgstr "Configuração da TV Digital" + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:35 +msgid "Choose a location where you want to save the list of channels." +msgstr "Escolha um local onde você quer salvar a lista de canais." + +#: ../client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py:46 +msgid "Save channels" +msgstr "Salvar canais" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:46 +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:90 +msgid "Configuring device" +msgstr "Configurando dispositivo" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:119 +msgid "TV" +msgstr "TV" + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 +msgid "No channels were found." +msgstr "Nenhum canal encontrado." + +#: ../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 "" +"Tenha certeza de que a antena está conectada e você selecionou a estação " +"correta." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:140 +#, python-format +msgid "The device has been added to the group %s." +msgstr "O dispositivo foi adicionado ao grupo %s." + +#: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:149 +msgid "An error occured while trying to setup the device." +msgstr "Ocorreu um erro ao tentar configurar o dispositivo." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 +msgid "Configure Another Device" +msgstr "Configurar Outro Dispositivo" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 +msgid "Configuration finished" +msgstr "Configuração finalizada" + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 +#, python-format +msgid "The device %s has been configured sucessfully." +msgstr "O dispositivo %s foi configurado com sucesso." + +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 +#, python-format +msgid "Failed configuring device %s." +msgstr "Falha ao configurar o dispositivo %s." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Limpando. Isto pode levar algum tempo." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 +msgid "Setup digital TV" +msgstr "Configurar TV digital" + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 +msgid "" +"The generated channels file can be used to configure your devices in the " +"control center." +msgstr "" +"O arquivo de canais gerados pode ser usado para configurar seus dispositivos " +"no painel de Controle." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 +msgid "" +"Are you sure you want to abort?\n" +"All process will be lost." +msgstr "" +"Você tem certeza que quer abortar?\n" +"Todos os processos serão perdidos." + +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 +msgid "Program Guide" +msgstr "Guia de programação" + +#: ../client/totem-plugin/dvb-daemon.py:307 +msgid "Digital TV" +msgstr "TV Digital" + +#: ../client/totem-plugin/dvb-daemon.py:347 +msgid "Watch TV" +msgstr "Assistir TV" + +#: ../client/totem-plugin/dvb-daemon.py:348 +msgid "Digital _TV" +msgstr "TV _Digital" + +#: ../client/totem-plugin/dvb-daemon.py:350 +msgid "_Program Guide" +msgstr "_Guia de programação" + +#: ../client/totem-plugin/dvb-daemon.py:353 +msgid "_Delete" +msgstr "_Excluir" + +#: ../client/totem-plugin/dvb-daemon.py:354 +msgid "D_etails" +msgstr "D_etalhes" + +#: ../client/totem-plugin/dvb-daemon.py:355 +msgid "_Order channels" +msgstr "Ordenar canais" + +#: ../client/totem-plugin/dvb-daemon.py:358 +msgid "By _name" +msgstr "Por _nome" + +#: ../client/totem-plugin/dvb-daemon.py:359 +msgid "By _group" +msgstr "Por _grupo" + +#: ../client/totem-plugin/dvb-daemon.py:362 +msgid "_Reverse order" +msgstr "_Inverter ordem" + +#: ../client/totem-plugin/dvb-daemon.py:514 +msgid "Delete selected recording?" +msgstr "Excluir gravação selecionada?" + +#: ../client/totem-plugin/dvb-daemon.py:588 +#, python-format +msgid "Recording %d" +msgstr "Gravando %d" + +#: ../client/totem-plugin/dvb-daemon.py:648 +msgid "GNOME DVB Daemon is not installed" +msgstr "GNOME DVB Daemon não está instalado" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Painel de Controle de TV Digital" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Agendar gravações e procurar por guia de programação" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Configurar TV Digital" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem Movie Player" diff -Nru gnome-dvb-daemon-0.1.16/po/sr.po gnome-dvb-daemon-0.1.21/po/sr.po --- gnome-dvb-daemon-0.1.16/po/sr.po 2010-03-17 20:44:20.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/sr.po 2010-08-23 12:56:15.000000000 +0000 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2009-11-19 12:45+0000\n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:33+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Serbian \n" "MIME-Version: 1.0\n" @@ -16,7 +16,7 @@ "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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -77,7 +77,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "" @@ -124,161 +124,161 @@ msgid "There is currently no schedule available for this channel" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "П_реглед" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Помоћ" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Изађи" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Поставке" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Поставке приказа" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_О програму" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Снимци" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Претходни дан" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Следећи дан" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " Данило Шеган https://launchpad.net/~danilo" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 @@ -342,7 +342,7 @@ msgstr "" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "" @@ -488,11 +488,11 @@ msgid "_Start time:" msgstr "" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "" @@ -552,152 +552,182 @@ msgid "Next" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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:58 -msgid "Select the device you want to configure." -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../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:96 +#: ../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:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" msgstr "" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../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:98 +#: ../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:123 +#: ../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:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../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:132 +#: ../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:133 +#: ../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:134 +#: ../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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "" @@ -705,21 +735,21 @@ msgid "Welcome to the digital television Assistant." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "" @@ -759,103 +789,117 @@ msgid "An error occured while trying to setup the device." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../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:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "" +#. 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 "" + #~ msgid "Refresh" #~ msgstr "Освежи" diff -Nru gnome-dvb-daemon-0.1.16/po/sv.po gnome-dvb-daemon-0.1.21/po/sv.po --- gnome-dvb-daemon-0.1.16/po/sv.po 2010-03-17 20:44:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/sv.po 2010-08-23 12:56:16.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: dvb-daemon\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2009-11-19 12:53+0000\n" -"Last-Translator: faultygearbox \n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-08-09 13:24+0000\n" +"Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -49,7 +49,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:33 msgid "Edit Channel Lists" -msgstr "" +msgstr "Redigera kanallistor" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:56 msgid "Channel groups" @@ -58,7 +58,7 @@ #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:97 #: ../client/gnomedvb/ui/preferences/Dialogs.py:54 msgid "_Group:" -msgstr "" +msgstr "_Grupp:" #: ../client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py:104 msgid "Device groups" @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanal" @@ -121,157 +121,157 @@ 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:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "_Inspelningsschema" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Redigera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Visa" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Hjälp" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Hantera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "Hantera inspelningsschemat" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "_Inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Hantera inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "A_vsluta" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Avsluta programmet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" -msgstr "" +msgstr "_Kanallistor" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Redigera kanallistor" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Inställningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Visningsinställningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" -msgstr "" +msgstr "_Vad går på tv nu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 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:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" -msgstr "" +msgstr "_Uppdatera" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Uppdatera programguide" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" -msgstr "" +msgstr "_Föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Gå till föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" -msgstr "" +msgstr "_Nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Gå till nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" -msgstr "" +msgstr "_Kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Visa/Dölj kanaler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" -msgstr "" +msgstr "Ver_ktygsrad" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Visa/Göm verktygsfält" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_Om" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "Visa information om programmet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "Inspelningsschema" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Inspelningar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Vad visas nu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Föregående dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Nästa dag" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 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:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" @@ -292,7 +292,7 @@ #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:67 #, python-format msgid "Adapter: %d, Frontend: %d" -msgstr "" +msgstr "Adapter: %d, Framände: %d" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:72 #, python-format @@ -301,31 +301,31 @@ #: ../client/gnomedvb/ui/preferences/Dialogs.py:29 msgid "Add to Group" -msgstr "" +msgstr "Lägg till i grupp" #: ../client/gnomedvb/ui/preferences/Dialogs.py:47 msgid "Add Device to Group" -msgstr "" +msgstr "Lägg till enhet till grupp" #: ../client/gnomedvb/ui/preferences/Dialogs.py:92 msgid "Create new Group" -msgstr "" +msgstr "Skapa ny grupp" #: ../client/gnomedvb/ui/preferences/Dialogs.py:112 msgid "General" -msgstr "" +msgstr "Allmänt" #: ../client/gnomedvb/ui/preferences/Dialogs.py:118 msgid "_Name:" -msgstr "" +msgstr "_Namn:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:130 msgid "Channels _file:" -msgstr "" +msgstr "Fil med kana_ler:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:159 msgid "_Directory:" -msgstr "" +msgstr "_Katalog:" #: ../client/gnomedvb/ui/preferences/Dialogs.py:187 msgid "Select File" @@ -340,7 +340,7 @@ msgstr "Redigera grupp" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Inställningar för digital-tv" @@ -441,7 +441,7 @@ #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:165 msgid "Timer could not be deleted" -msgstr "Timern kunde inte tas bort" +msgstr "Tidsinspelningen kunde inte tas bort" #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:177 msgid "Abort active recording?" @@ -469,19 +469,19 @@ #: ../client/gnomedvb/ui/timers/MessageDialogs.py:40 msgid "Recording has been scheduled successfully" -msgstr "" +msgstr "Inspelningen har schemalagts" #: ../client/gnomedvb/ui/timers/TimerDialog.py:64 msgid "Add Timer" -msgstr "" +msgstr "Lägg till tidsinspelning" #: ../client/gnomedvb/ui/timers/TimerDialog.py:67 msgid "_Channel:" -msgstr "" +msgstr "_Kanal:" #: ../client/gnomedvb/ui/timers/TimerDialog.py:84 msgid "Edit Timer" -msgstr "" +msgstr "Redigera tidsinspelning" #: ../client/gnomedvb/ui/timers/TimerDialog.py:87 #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:60 @@ -490,13 +490,13 @@ #: ../client/gnomedvb/ui/timers/TimerDialog.py:95 msgid "_Start time:" -msgstr "" +msgstr "_Starttid:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" -msgstr "" +msgstr "_Längd:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "minuter" @@ -518,7 +518,7 @@ #: ../client/gnomedvb/ui/widgets/DateTime.py:50 msgid "_Time:" -msgstr "" +msgstr "_Tid:" #: ../client/gnomedvb/ui/widgets/DetailsDialog.py:28 msgid "Details" @@ -556,11 +556,11 @@ msgid "Next" msgstr "Nästa" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "Ingen enhet har hittats." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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 " @@ -570,23 +570,23 @@ "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:58 -msgid "Select the device you want to configure." -msgstr "Välj enheten du vill konfigurera." - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "Namn" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Typ" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:84 +msgid "Select the device you want to configure." +msgstr "Välj enheten du vill konfigurera." + +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:98 msgid "All devices are already configured." msgstr "Alla enheter är redan konfigurerade." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:96 +#: ../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." @@ -594,11 +594,11 @@ "Gå till kontrollpanelen om du vill ändra inställningarna för redan " "konfigurerade enheter." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "Ett fel inträffade under hämtandet av enheter." -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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." @@ -606,79 +606,95 @@ "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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "Detaljerade felmeddelandet är:" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "Söker efter enheter" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Enhetsval" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"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." +"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:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" -msgstr "" +msgstr "Markera alla" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" -msgstr "" +msgstr "Avmarkera alla" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" -msgstr "Välj kodade kanaler" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" +msgstr "_Kanaler:" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "Välj k_odade kanaler" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "Signalkvalitet:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "Signalstyrka:" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Söker efter kanaler" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "Saknade beroenden" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:93 msgid "Country and antenna selection" msgstr "Land och antennval" #: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:96 +msgid "Satellite selection" +msgstr "Val av satellit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:99 msgid "Country and provider selection" msgstr "Land och leverantörsval" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:98 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:101 msgid "Unsupported adapter" msgstr "Adaptern stöds inte" #. translators: first %s is the DVB type, e.g. DVB-S -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:123 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:126 #, python-format msgid "Sorry, but '%s' cards aren't supported." msgstr "Tyvärr, \"%s\"-kort stöds ej." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "Kunde inte hitta initialt tuningdata." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:131 msgid "Please make sure that the dvb-apps package is installed." msgstr "Försäkra dig om att paketet dvb-apps är installerat." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:132 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:135 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:133 +#: ../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." @@ -686,34 +702,46 @@ "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:134 +#: ../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." -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Ej listad" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Land:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Antenn:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Satellit:" - -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" -msgstr "Leverantörer:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "_Land:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "_Antenn:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "Antenn" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "_Satellit:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "Satellit" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "_Leverantörer:" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "Leverantör" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "Vet ej" @@ -721,7 +749,7 @@ msgid "Welcome to the digital television Assistant." msgstr "Välkommen till den digitala televisionsguiden." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." @@ -729,15 +757,15 @@ "Den kommer automatiskt att konfigurera dina enheter och även söka efter " "kanaler om det behövs." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "Klicka på \"Framåt\" för att starta." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Expertläge" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "_Expertläge" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Konfiguration av digital-tv" @@ -760,13 +788,15 @@ #: ../client/gnomedvb/ui/wizard/pages/SetupDevicePage.py:128 msgid "No channels were found." -msgstr "" +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:140 #, python-format @@ -777,29 +807,34 @@ 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:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "Konfigurera en annan enhet" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "Konfigurationen är färdig" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "Enheten %s har nu konfigurerats." -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." -msgstr "" +msgstr "Misslyckades med att konfigurera enheten %s." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:44 +msgid "Cleaning up. This may take a while." +msgstr "Städar upp. Detta kan ta lite tid." + +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:82 +#: ../data/gnome-dvb-setup.desktop.in.in.h:2 msgid "Setup digital TV" msgstr "Konfigurera digital-tv" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -807,7 +842,7 @@ "Den genererade kanalfilen kan användas för att konfigurera dina enheter i " "kontrollpanelen." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." @@ -815,68 +850,77 @@ "Är du säker på att du vill avbryta?\n" "Alla ändringar kommer att gå förlorade." -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Programguide" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Digital-tv" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" -msgstr "" +msgstr "Se på tv" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "Digital-_tv" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Programguide" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Ta bort" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "D_etaljer" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Ordna kanaler" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "Efter _namn" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "Efter _grupp" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "_Baklänges" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Ta bort markerad inspelning?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Filmspelaren Totem" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "Inspelning %d" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" -msgstr "" +msgstr "GNOME DVB Daemon är inte installerat" + +#. www.k-d-w.org/ +#: ../data/gnome-dvb-control.desktop.in.in.h:1 +msgid "Digital TV Control Center" +msgstr "Kontrollcenter för digital-tv" + +#: ../data/gnome-dvb-control.desktop.in.in.h:2 +msgid "Schedule recordings and browse program guide" +msgstr "Schemalägg inspelningar och bläddra i tv-tablån" + +#: ../data/gnome-dvb-setup.desktop.in.in.h:1 +msgid "Digital TV Setup" +msgstr "Konfigurera digital-tv" #, python-format #~ msgid "Adapter: %d, Frontend: %d" @@ -1094,6 +1138,9 @@ #~ msgid "Scanning for channels on device %s" #~ msgstr "Söker efter kanaler på enhet %s" +#~ msgid "Expert mode" +#~ msgstr "Expertläge" + #~ msgid "Toolbar" #~ msgstr "Verktygsrad" @@ -1109,14 +1156,39 @@ #~ 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 "" +#~ "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.16/po/te.po gnome-dvb-daemon-0.1.21/po/te.po --- gnome-dvb-daemon-0.1.16/po/te.po 2010-03-17 20:44:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/te.po 2010-08-23 12:56:16.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2009-11-19 12:52+0000\n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:29+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Telugu \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: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -73,7 +73,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "ఛానెల్" @@ -120,161 +120,161 @@ msgid "There is currently no schedule available for this channel" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "సహాయం" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_అభిరుచులు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "ప్రదర్శనా అభిరుచులు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "ముందు రోజుకి వెళ్ళు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "తర్వాతి రోజుకి వెళ్ళు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_గురించి" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "ఈ ఉపకరణం గురించిన సమాచారాన్ని చూపించు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "ముందు రోజు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "తర్వాతి రోజు" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " వీవెన్ (Veeven) https://launchpad.net/~veeven" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 @@ -338,7 +338,7 @@ msgstr "" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "డిజిటల్ టీవీ అభిరుచులు" @@ -484,11 +484,11 @@ msgid "_Start time:" msgstr "" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "నిమిషాలు" @@ -548,152 +548,182 @@ msgid "Next" msgstr "తరువాత" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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:58 -msgid "Select the device you want to configure." -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "పేరు" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "రకం" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../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:96 +#: ../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:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" msgstr "" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../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:98 +#: ../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:123 +#: ../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:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../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:132 +#: ../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:133 +#: ../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:134 +#: ../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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "తెలియదు" @@ -701,21 +731,21 @@ msgid "Welcome to the digital television Assistant." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "" @@ -755,103 +785,117 @@ msgid "An error occured while trying to setup the device." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../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:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_తొలగించు" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "_వివరాలు" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "" +#. 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 "" + #~ msgid "Device groups:" #~ msgstr "పరికర సమూహాలు:" diff -Nru gnome-dvb-daemon-0.1.16/po/tr.po gnome-dvb-daemon-0.1.21/po/tr.po --- gnome-dvb-daemon-0.1.16/po/tr.po 2010-03-17 20:44:20.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/po/tr.po 2010-08-23 12:56:15.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: gnome-dvb-daemon\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-03-17 13:02+0100\n" -"PO-Revision-Date: 2010-02-23 15:18+0000\n" +"POT-Creation-Date: 2010-08-23 13:55+0200\n" +"PO-Revision-Date: 2010-06-21 20:26+0000\n" "Last-Translator: Sebastian Pölsterl \n" "Language-Team: Turkish \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" -"X-Launchpad-Export-Date: 2010-03-17 20:44+0000\n" +"X-Launchpad-Export-Date: 2010-08-23 12:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../client/gnomedvb/__init__.py:34 @@ -70,7 +70,7 @@ #: ../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:84 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:96 msgid "Channel" msgstr "Kanal" @@ -117,161 +117,161 @@ msgid "There is currently no schedule available for this channel" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:155 -#: ../client/totem-plugin/dvb-daemon.py:317 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/totem-plugin/dvb-daemon.py:349 msgid "_Recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:156 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 msgid "_Edit" msgstr "_Düzenle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:157 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:159 msgid "_View" msgstr "_Görüntü" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:158 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:160 msgid "Help" msgstr "Yardım" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:165 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 msgid "_Manage" msgstr "_Yönet" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:166 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:267 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:269 msgid "Manage recording schedule" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:167 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 msgid "_Recordings" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:168 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 msgid "Manage recordings" msgstr "Kayıtları yönetme" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:169 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:171 msgid "_Quit" msgstr "_Çıkış" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:170 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:172 msgid "Quit the Program" msgstr "Programdan Çık" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 msgid "_Channel Lists" msgstr "_Kanal Listesi" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:176 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 msgid "Edit channel lists" msgstr "Kanal listesini düzenle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:177 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:179 msgid "_Preferences" msgstr "_Özellikler" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:178 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:180 msgid "Display preferences" msgstr "Ekran tercihleri" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:184 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 msgid "_What's on now" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:185 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 msgid "See what's currently on and is coming next" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:186 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 msgid "_Refresh" msgstr "_Yenile" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:187 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:295 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:297 msgid "Refresh program guide" msgstr "Program rehberini tazele" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:188 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 msgid "_Previous Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:189 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:305 msgid "Go to previous day" msgstr "Bir önceki güne git" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:190 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:192 msgid "_Next Day" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:191 -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:193 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:314 msgid "Go to next day" msgstr "Ertesi güne git" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:194 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 msgid "_Channels" msgstr "_Kanallar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:195 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 msgid "View/Hide channels" msgstr "Kanalları Göster/Gizle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:196 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:198 msgid "_Toolbar" msgstr "_Araç Çubuğu" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:197 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:199 msgid "View/Hide toolbar" msgstr "Araç çubuğunu Göster/Gizle" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:207 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:209 msgid "_About" msgstr "_Hakkında" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:208 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:210 msgid "Display informations about the program" msgstr "" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:263 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:265 #: ../client/gnomedvb/ui/timers/EditTimersDialog.py:45 msgid "Recording schedule" msgstr "" #. Add recordings -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:274 +#: ../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:269 +#: ../client/totem-plugin/dvb-daemon.py:301 msgid "Recordings" msgstr "Kayıtlar" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:283 -#: ../client/totem-plugin/dvb-daemon.py:298 -#: ../client/totem-plugin/dvb-daemon.py:319 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:285 +#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:351 msgid "What's on now" msgstr "Şu an tv de ne var!" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:301 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:303 msgid "Previous Day" msgstr "Önceki Gün" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:310 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:312 msgid "Next Day" msgstr "Sonraki Gün" -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:498 -#: ../client/totem-plugin/dvb-daemon.py:175 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:500 +#: ../client/totem-plugin/dvb-daemon.py:178 msgid "Schedule recording for the selected event?" msgstr "" #. translators: These appear in the About dialog, usual format applies. -#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:586 +#: ../client/gnomedvb/ui/controlcenter/ControlCenterWindow.py:588 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" -" Sebastian Pölsterl https://launchpad.net/~marduk-k-d-w\n" +" Sebastian Pölsterl https://launchpad.net/~sebp\n" " zeugma https://launchpad.net/~sunder67" #: ../client/gnomedvb/ui/preferences/DeviceGroupsView.py:57 @@ -335,7 +335,7 @@ msgstr "Grubu düzenle" #: ../client/gnomedvb/ui/preferences/Preferences.py:38 -#: ../client/totem-plugin/dvb-daemon.py:320 +#: ../client/totem-plugin/dvb-daemon.py:352 msgid "Digital TV Preferences" msgstr "Dijital TV Tercihler" @@ -481,11 +481,11 @@ msgid "_Start time:" msgstr "_Başlangıç zamanı:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:108 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:111 msgid "_Duration:" msgstr "_Süre:" -#: ../client/gnomedvb/ui/timers/TimerDialog.py:122 +#: ../client/gnomedvb/ui/timers/TimerDialog.py:125 msgid "minutes" msgstr "dakikalar" @@ -545,152 +545,182 @@ msgid "Next" msgstr "Sonraki" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:51 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:52 msgid "No devices have been found." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:53 +#: ../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:58 -msgid "Select the device you want to configure." -msgstr "" - -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:68 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:67 msgid "Name" msgstr "İsim" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:74 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:73 msgid "Type" msgstr "Tür" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:94 +#: ../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:96 +#: ../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:104 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:108 msgid "An error occured while retrieving devices." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:106 +#: ../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:108 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:112 msgid "The detailed error message is:" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:117 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:121 msgid "Searching for devices" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:133 +#: ../client/gnomedvb/ui/wizard/pages/AdaptersPage.py:137 msgid "Device selection" msgstr "Cihaz seçimi" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:57 +#: ../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 "" -"Choose the channels you want to have in your list of channels. You can " -"reorder the channels, too." +"You can select the channels you want to have in your list of channels." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:62 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:67 msgid "Select all" msgstr "Tümünü seç" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:64 +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:69 msgid "Deselect all" msgstr "Tümünün seçimini kaldır" -#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:107 -msgid "Select scrambled channels" +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:84 +msgid "_Channels:" msgstr "" #: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:119 +msgid "Select _scrambled channels" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:135 +msgid "Signal quality:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:146 +msgid "Signal strength:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/ChannelScanPage.py:161 msgid "Scanning for channels" msgstr "Kanallar için tarama" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:84 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:87 msgid "Missing requirements" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:90 #: ../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:98 +#: ../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:123 +#: ../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:127 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:130 msgid "Could not find initial tuning data." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:128 +#: ../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:132 +#: ../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:133 +#: ../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:134 +#: ../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:139 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:142 msgid "Not listed" msgstr "Listelenmemiş" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:150 -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:222 -msgid "Country:" -msgstr "Ülke:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:154 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:228 +msgid "_Country:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:179 +msgid "_Antenna:" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:188 +msgid "Antenna" +msgstr "" + +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:201 +msgid "_Satellite:" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:172 -msgid "Antenna:" -msgstr "Anten:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:209 +msgid "Satellite" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:195 -msgid "Satellite:" -msgstr "Uydu:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:251 +msgid "_Providers:" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:242 -msgid "Providers:" +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:259 +msgid "Provider" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:269 +#: ../client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py:308 msgid "Don't know" msgstr "" @@ -698,21 +728,21 @@ msgid "Welcome to the digital television Assistant." msgstr "Dijital televizyon asistanına hoşgeldiniz." -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 msgid "" "It will automatically configure your devices and search for channels, if " "necessary." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:33 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:38 msgid "Click \"Forward\" to begin." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:37 -msgid "Expert mode" -msgstr "Uzman modu" +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:42 +msgid "_Expert mode" +msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:41 +#: ../client/gnomedvb/ui/wizard/pages/IntroPage.py:46 msgid "Digital TV configuration" msgstr "Dijital TV yapılandırması" @@ -752,29 +782,34 @@ msgid "An error occured while trying to setup the device." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:31 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:37 msgid "Configure Another Device" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:35 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:41 msgid "Configuration finished" msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:42 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:48 #, python-format msgid "The device %s has been configured sucessfully." msgstr "" -#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:44 +#: ../client/gnomedvb/ui/wizard/pages/SummaryPage.py:50 #, python-format msgid "Failed configuring device %s." msgstr "" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:57 +#: ../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 "Dijital TV kurulumu" -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:119 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:156 msgid "" "The generated channels file can be used to configure your devices in the " "control center." @@ -782,71 +817,95 @@ "Oluşturulan kanal dosyasını yapılandırmak için kontrol merkezi içindeki " "cihazlar kullanılabilir." -#: ../client/gnomedvb/ui/wizard/SetupWizard.py:165 +#: ../client/gnomedvb/ui/wizard/SetupWizard.py:203 msgid "" "Are you sure you want to abort?\n" "All process will be lost." msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:147 -#: ../client/totem-plugin/dvb-daemon.py:191 -#: ../client/totem-plugin/dvb-daemon.py:304 +#: ../client/totem-plugin/dvb-daemon.py:150 +#: ../client/totem-plugin/dvb-daemon.py:194 +#: ../client/totem-plugin/dvb-daemon.py:336 msgid "Program Guide" msgstr "Program Rehberi" -#: ../client/totem-plugin/dvb-daemon.py:275 +#: ../client/totem-plugin/dvb-daemon.py:307 msgid "Digital TV" msgstr "Dijital TV" -#: ../client/totem-plugin/dvb-daemon.py:315 +#: ../client/totem-plugin/dvb-daemon.py:347 msgid "Watch TV" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:316 +#: ../client/totem-plugin/dvb-daemon.py:348 msgid "Digital _TV" msgstr "Digital _TV" -#: ../client/totem-plugin/dvb-daemon.py:318 +#: ../client/totem-plugin/dvb-daemon.py:350 msgid "_Program Guide" msgstr "_Program rehberi" -#: ../client/totem-plugin/dvb-daemon.py:321 +#: ../client/totem-plugin/dvb-daemon.py:353 msgid "_Delete" msgstr "_Sil" -#: ../client/totem-plugin/dvb-daemon.py:322 +#: ../client/totem-plugin/dvb-daemon.py:354 msgid "D_etails" msgstr "_Detaylar" -#: ../client/totem-plugin/dvb-daemon.py:323 +#: ../client/totem-plugin/dvb-daemon.py:355 msgid "_Order channels" msgstr "_Diğer kanallar" -#: ../client/totem-plugin/dvb-daemon.py:326 +#: ../client/totem-plugin/dvb-daemon.py:358 msgid "By _name" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:327 +#: ../client/totem-plugin/dvb-daemon.py:359 msgid "By _group" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:330 +#: ../client/totem-plugin/dvb-daemon.py:362 msgid "_Reverse order" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:483 +#: ../client/totem-plugin/dvb-daemon.py:514 msgid "Delete selected recording?" msgstr "Seçili kayıt silinsin mi?" -#: ../client/totem-plugin/dvb-daemon.py:526 -msgid "Totem Movie Player" -msgstr "Totem Film Oynatıcı" - -#: ../client/totem-plugin/dvb-daemon.py:572 +#: ../client/totem-plugin/dvb-daemon.py:588 #, python-format msgid "Recording %d" msgstr "" -#: ../client/totem-plugin/dvb-daemon.py:632 +#: ../client/totem-plugin/dvb-daemon.py:648 msgid "GNOME DVB Daemon is not installed" msgstr "" + +#. 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 "" + +#~ msgid "Country:" +#~ msgstr "Ülke:" + +#~ msgid "Expert mode" +#~ msgstr "Uzman modu" + +#~ msgid "Totem Movie Player" +#~ msgstr "Totem Film Oynatıcı" + +#~ msgid "Satellite:" +#~ msgstr "Uydu:" + +#~ msgid "Antenna:" +#~ msgstr "Anten:" diff -Nru gnome-dvb-daemon-0.1.16/README gnome-dvb-daemon-0.1.21/README --- gnome-dvb-daemon-0.1.16/README 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/README 2010-05-23 13:54:09.000000000 +0000 @@ -14,6 +14,7 @@ - libgee >= 0.5.0 - sqlite >= 3.4 - gst-rtsp-server 0.10.5 (http://people.freedesktop.org/~wtay/) + - gudev UI: - Python >= 2.5 diff -Nru gnome-dvb-daemon-0.1.16/src/Cable/CableChannel.c gnome-dvb-daemon-0.1.21/src/Cable/CableChannel.c --- gnome-dvb-daemon-0.1.16/src/Cable/CableChannel.c 2009-10-01 10:38:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Cable/CableChannel.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* CableChannel.c generated by valac, the Vala compiler +/* CableChannel.c generated by valac 0.9.7, the Vala compiler * generated from CableChannel.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -118,11 +118,11 @@ static gpointer dvb_cable_channel_parent_class = NULL; -GType dvb_channel_get_type (void); -GType dvb_cable_channel_get_type (void); -GType dvb_dvb_src_inversion_get_type (void); -GType dvb_dvb_src_code_rate_get_type (void); -GType dvb_dvb_src_modulation_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +GType dvb_cable_channel_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; #define DVB_CABLE_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelPrivate)) enum { DVB_CABLE_CHANNEL_DUMMY_PROPERTY, @@ -131,21 +131,24 @@ DVB_CABLE_CHANNEL_CODE_RATE, DVB_CABLE_CHANNEL_MODULATION }; +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); +static void dvb_cable_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); guint dvb_channel_get_Frequency (DVBChannel* self); DVBDvbSrcInversion dvb_cable_channel_get_Inversion (DVBCableChannel* self); guint dvb_cable_channel_get_SymbolRate (DVBCableChannel* self); DVBDvbSrcCodeRate dvb_cable_channel_get_CodeRate (DVBCableChannel* self); DVBDvbSrcModulation dvb_cable_channel_get_Modulation (DVBCableChannel* self); -static void dvb_cable_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); +static char* dvb_cable_channel_real_to_string (DVBChannel* base); const char* dvb_channel_get_Name (DVBChannel* self); const char* dvb_utils_get_nick_from_enum (GType enumtype, gint val); guint dvb_channel_get_VideoPID (DVBChannel* self); char* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -static char* dvb_cable_channel_real_to_string (DVBChannel* base); -DVBChannel* dvb_channel_construct (GType object_type); 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); @@ -156,6 +159,18 @@ +DVBCableChannel* dvb_cable_channel_construct_without_schedule (GType object_type) { + DVBCableChannel * self; + self = (DVBCableChannel*) dvb_channel_construct_without_schedule (object_type); + return self; +} + + +DVBCableChannel* dvb_cable_channel_new_without_schedule (void) { + return dvb_cable_channel_construct_without_schedule (DVB_TYPE_CABLE_CHANNEL); +} + + static void dvb_cable_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source) { DVBCableChannel * self; self = (DVBCableChannel*) base; @@ -170,7 +185,7 @@ static char* dvb_cable_channel_real_to_string (DVBChannel* base) { DVBCableChannel * self; - char* result; + char* result = NULL; char* _tmp0_; char* _tmp1_; self = (DVBCableChannel*) base; @@ -279,12 +294,14 @@ GType dvb_cable_channel_get_type (void) { - static GType dvb_cable_channel_type_id = 0; - if (dvb_cable_channel_type_id == 0) { + static volatile gsize dvb_cable_channel_type_id__volatile = 0; + if (g_once_init_enter (&dvb_cable_channel_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBCableChannelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_cable_channel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBCableChannel), 0, (GInstanceInitFunc) dvb_cable_channel_instance_init, NULL }; + GType dvb_cable_channel_type_id; dvb_cable_channel_type_id = g_type_register_static (DVB_TYPE_CHANNEL, "DVBCableChannel", &g_define_type_info, 0); + g_once_init_leave (&dvb_cable_channel_type_id__volatile, dvb_cable_channel_type_id); } - return dvb_cable_channel_type_id; + return dvb_cable_channel_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Cable/CableChannel.vala gnome-dvb-daemon-0.1.21/src/Cable/CableChannel.vala --- gnome-dvb-daemon-0.1.16/src/Cable/CableChannel.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Cable/CableChannel.vala 2010-05-26 16:23:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -26,6 +26,10 @@ public uint SymbolRate {get; set;} public DvbSrcCodeRate CodeRate {get; set;} public DvbSrcModulation Modulation {get; set;} + + public CableChannel.without_schedule () { + Channel.without_schedule (); + } public override void setup_dvb_source (Gst.Element source) { source.set ("frequency", this.Frequency); diff -Nru gnome-dvb-daemon-0.1.16/src/Cable/CableScanner.c gnome-dvb-daemon-0.1.21/src/Cable/CableScanner.c --- gnome-dvb-daemon-0.1.16/src/Cable/CableScanner.c 2010-02-23 13:10:56.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Cable/CableScanner.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* CableScanner.c generated by valac, the Vala compiler +/* CableScanner.c generated by valac 0.9.7, the Vala compiler * generated from CableScanner.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -26,10 +26,11 @@ #include #include #include +#include +#include +#include #include #include -#include -#include #define DVB_TYPE_ID_BUS_CABLE_SCANNER (dvb_id_bus_cable_scanner_get_type ()) @@ -39,6 +40,7 @@ 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; @@ -105,8 +107,6 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; #define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) @@ -124,7 +124,7 @@ typedef struct _DVBCableChannelClass DVBCableChannelClass; #define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) -typedef struct _DBusObjectVTable _DBusObjectVTable; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _DVBIDBusCableScannerIface { GTypeInterface parent_iface; @@ -136,6 +136,10 @@ gboolean (*AddScanningDataFromFile) (DVBIDBusCableScanner* self, const char* path, GError** error); }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _DVBIDBusCableScannerDBusProxy { DBusGProxy parent_instance; gboolean disposed; @@ -149,7 +153,6 @@ GQueue* frequencies; GstStructure* current_tuning_params; GeeHashSet* scanned_frequencies; - GeeHashMap* transport_streams; }; struct _DVBScannerClass { @@ -158,6 +161,7 @@ DVBScannedItem* (*get_scanned_item) (DVBScanner* self, const GstStructure* structure); DVBChannel* (*get_new_channel) (DVBScanner* self); void (*add_values_from_structure_to_channel) (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); + void (*add_scanning_data_from_string) (DVBScanner* self, const char* line); }; struct _DVBCableScanner { @@ -198,21 +202,20 @@ DVB_DVB_SRC_INVERSION_INVERSION_AUTO } DVBDvbSrcInversion; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - static gpointer dvb_cable_scanner_parent_class = NULL; static DVBIDBusCableScannerIface* dvb_cable_scanner_dvb_id_bus_cable_scanner_parent_iface = NULL; -GType dvb_id_bus_cable_scanner_get_type (void); +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 char* path, GError** error); gboolean dvb_id_bus_cable_scanner_WriteChannelsToFile (DVBIDBusCableScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); void dvb_id_bus_cable_scanner_AddScanningData (DVBIDBusCableScanner* self, guint frequency, const char* modulation, guint symbol_rate, const char* code_rate, GError** error); gboolean dvb_id_bus_cable_scanner_AddScanningDataFromFile (DVBIDBusCableScanner* self, const char* path, 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_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); @@ -227,11 +230,12 @@ 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 char* name, const char* network, const char* type, gboolean scrambled, DBusConnection* _connection); -GType dvb_id_bus_cable_scanner_dbus_proxy_get_type (void); -DVBIDBusCableScanner* dvb_id_bus_cable_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +static void _dbus_dvb_id_bus_cable_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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 @@ -245,42 +249,41 @@ static void dvb_id_bus_cable_scanner_dbus_proxy_dvb_id_bus_cable_scanner__interface_init (DVBIDBusCableScannerIface* iface); static void dvb_id_bus_cable_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void 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); -GType dvb_scanned_item_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_channel_list_get_type (void); -GType dvb_cable_scanner_get_type (void); +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_cable_scanner_get_type (void) G_GNUC_CONST; enum { DVB_CABLE_SCANNER_DUMMY_PROPERTY }; -GType dvb_device_get_type (void); +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 inline void dvb_cable_scanner_add_scanning_data (DVBCableScanner* self, guint frequency, const char* modulation, guint symbol_rate, const char* code_rate); static void dvb_cable_scanner_real_AddScanningData (DVBIDBusCableScanner* base, guint frequency, const char* modulation, guint symbol_rate, const char* code_rate, GError** error); +static inline void dvb_cable_scanner_add_scanning_data (DVBCableScanner* self, guint frequency, const char* modulation, guint symbol_rate, const char* code_rate); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); -char* dvb_utils_read_file_contents (GFile* file, GError** error); -static gboolean dvb_cable_scanner_real_AddScanningDataFromFile (DVBIDBusCableScanner* base, const char* path, GError** error); +static void dvb_cable_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line); +static void dvb_cable_scanner_real_prepare (DVBScanner* base); void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const char* key); -GType dvb_dvb_src_modulation_get_type (void); +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; DVBDvbSrcModulation dvb_get_modulation_val (const char* constellation); -GType dvb_dvb_src_code_rate_get_type (void); +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; DVBDvbSrcCodeRate dvb_get_code_rate_val (const char* code_rate_string); -static void dvb_cable_scanner_real_prepare (DVBScanner* base); +static DVBScannedItem* dvb_cable_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); DVBScannedItem* dvb_scanned_item_new (guint frequency); DVBScannedItem* dvb_scanned_item_construct (GType object_type, guint frequency); -static DVBScannedItem* dvb_cable_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); -DVBCableChannel* dvb_cable_channel_new (void); -DVBCableChannel* dvb_cable_channel_construct (GType object_type); -GType dvb_cable_channel_get_type (void); static DVBChannel* dvb_cable_scanner_real_get_new_channel (DVBScanner* base); -GType dvb_dvb_src_inversion_get_type (void); +DVBCableChannel* dvb_cable_channel_new_without_schedule (void); +DVBCableChannel* dvb_cable_channel_construct_without_schedule (GType object_type); +GType dvb_cable_channel_get_type (void) G_GNUC_CONST; +static void dvb_cable_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; void dvb_cable_channel_set_Inversion (DVBCableChannel* self, DVBDvbSrcInversion value); void dvb_cable_channel_set_Modulation (DVBCableChannel* self, DVBDvbSrcModulation value); void dvb_channel_set_Frequency (DVBChannel* self, guint value); void dvb_cable_channel_set_SymbolRate (DVBCableChannel* self, guint value); void dvb_cable_channel_set_CodeRate (DVBCableChannel* self, DVBDvbSrcCodeRate value); -static void dvb_cable_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); 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); @@ -289,11 +292,10 @@ void dvb_scanner_Destroy (DVBScanner* self, GError** error); gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const char* path, GError** error); gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); +gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const char* path, 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 gint _vala_array_length (gpointer array); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -302,6 +304,7 @@ 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); void dvb_id_bus_cable_scanner_Run (DVBIDBusCableScanner* self, GError** error) { DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->Run (self, error); @@ -328,11 +331,36 @@ } +/** + * @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 char* path, GError** error) { return DVB_ID_BUS_CABLE_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, 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_cable_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -346,7 +374,7 @@ 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"); + 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]); @@ -1344,6 +1372,24 @@ } +static void _dbus_dvb_id_bus_cable_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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)); @@ -1353,6 +1399,7 @@ 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); } @@ -1363,20 +1410,23 @@ 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 GType dvb_id_bus_cable_scanner_type_id = 0; - if (dvb_id_bus_cable_scanner_type_id == 0) { + 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; + return dvb_id_bus_cable_scanner_type_id__volatile; } @@ -1409,20 +1459,20 @@ 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 _tmp22_; + dbus_uint32_t _tmp0_; guint freq_left = 0U; - dbus_uint32_t _tmp23_; + 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, &_tmp22_); + dbus_message_iter_get_basic (&iter, &_tmp0_); dbus_message_iter_next (&iter); - frequency = _tmp22_; - dbus_message_iter_get_basic (&iter, &_tmp23_); + frequency = _tmp0_; + dbus_message_iter_get_basic (&iter, &_tmp1_); dbus_message_iter_next (&iter); - freq_left = _tmp23_; + freq_left = _tmp1_; g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); } @@ -1441,40 +1491,40 @@ 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 _tmp24_; + dbus_uint32_t _tmp2_; guint sid = 0U; - dbus_uint32_t _tmp25_; + dbus_uint32_t _tmp3_; char* name = NULL; - const char* _tmp26_; + const char* _tmp4_; char* network = NULL; - const char* _tmp27_; + const char* _tmp5_; char* type = NULL; - const char* _tmp28_; + const char* _tmp6_; gboolean scrambled = FALSE; - dbus_bool_t _tmp29_; + 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, &_tmp24_); + dbus_message_iter_get_basic (&iter, &_tmp2_); dbus_message_iter_next (&iter); - frequency = _tmp24_; - dbus_message_iter_get_basic (&iter, &_tmp25_); + frequency = _tmp2_; + dbus_message_iter_get_basic (&iter, &_tmp3_); dbus_message_iter_next (&iter); - sid = _tmp25_; - dbus_message_iter_get_basic (&iter, &_tmp26_); + sid = _tmp3_; + dbus_message_iter_get_basic (&iter, &_tmp4_); dbus_message_iter_next (&iter); - name = g_strdup (_tmp26_); - dbus_message_iter_get_basic (&iter, &_tmp27_); + name = g_strdup (_tmp4_); + dbus_message_iter_get_basic (&iter, &_tmp5_); dbus_message_iter_next (&iter); - network = g_strdup (_tmp27_); - dbus_message_iter_get_basic (&iter, &_tmp28_); + network = g_strdup (_tmp5_); + dbus_message_iter_get_basic (&iter, &_tmp6_); dbus_message_iter_next (&iter); - type = g_strdup (_tmp28_); - dbus_message_iter_get_basic (&iter, &_tmp29_); + type = g_strdup (_tmp6_); + dbus_message_iter_get_basic (&iter, &_tmp7_); dbus_message_iter_next (&iter); - scrambled = _tmp29_; + scrambled = _tmp7_; g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); _g_free0 (name); _g_free0 (network); @@ -1482,6 +1532,27 @@ } +static void _dbus_handle_dvb_id_bus_cable_scanner_frontend_stats (DVBIDBusCableScanner* self, DBusConnection* connection, DBusMessage* message) { + DBusMessageIter iter; + double signal_strength = 0.0; + double _tmp8_; + double 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")) { @@ -1490,6 +1561,8 @@ _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; @@ -1526,7 +1599,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1540,78 +1613,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp30_; + const char* _tmp10_; _edomain = DBUS_GERROR; - _tmp30_ = _dbus_error.name + 27; - if (strcmp (_tmp30_, "Failed") == 0) { + _tmp10_ = _dbus_error.name + 27; + if (strcmp (_tmp10_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp30_, "NoMemory") == 0) { + } else if (strcmp (_tmp10_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp30_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp10_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp30_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp10_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp30_, "NoReply") == 0) { + } else if (strcmp (_tmp10_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp30_, "IOError") == 0) { + } else if (strcmp (_tmp10_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp30_, "BadAddress") == 0) { + } else if (strcmp (_tmp10_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp30_, "NotSupported") == 0) { + } else if (strcmp (_tmp10_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp30_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp10_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp30_, "AccessDenied") == 0) { + } else if (strcmp (_tmp10_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp30_, "AuthFailed") == 0) { + } else if (strcmp (_tmp10_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp30_, "NoServer") == 0) { + } else if (strcmp (_tmp10_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp30_, "Timeout") == 0) { + } else if (strcmp (_tmp10_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp30_, "NoNetwork") == 0) { + } else if (strcmp (_tmp10_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp30_, "AddressInUse") == 0) { + } else if (strcmp (_tmp10_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp30_, "Disconnected") == 0) { + } else if (strcmp (_tmp10_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp30_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp10_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp30_, "FileNotFound") == 0) { + } else if (strcmp (_tmp10_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp30_, "FileExists") == 0) { + } else if (strcmp (_tmp10_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp30_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp10_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp30_, "TimedOut") == 0) { + } else if (strcmp (_tmp10_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp30_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp10_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp30_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp10_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp30_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp10_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp30_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp10_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp30_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp10_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp30_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp10_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp30_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp10_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp30_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp10_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp30_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp10_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp30_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp10_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp30_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp10_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp30_, "RemoteException") == 0) { + } else if (strcmp (_tmp10_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1631,7 +1704,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1645,78 +1718,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp31_; + const char* _tmp11_; _edomain = DBUS_GERROR; - _tmp31_ = _dbus_error.name + 27; - if (strcmp (_tmp31_, "Failed") == 0) { + _tmp11_ = _dbus_error.name + 27; + if (strcmp (_tmp11_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp31_, "NoMemory") == 0) { + } else if (strcmp (_tmp11_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp31_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp11_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp31_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp11_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp31_, "NoReply") == 0) { + } else if (strcmp (_tmp11_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp31_, "IOError") == 0) { + } else if (strcmp (_tmp11_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp31_, "BadAddress") == 0) { + } else if (strcmp (_tmp11_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp31_, "NotSupported") == 0) { + } else if (strcmp (_tmp11_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp31_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp11_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp31_, "AccessDenied") == 0) { + } else if (strcmp (_tmp11_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp31_, "AuthFailed") == 0) { + } else if (strcmp (_tmp11_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp31_, "NoServer") == 0) { + } else if (strcmp (_tmp11_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp31_, "Timeout") == 0) { + } else if (strcmp (_tmp11_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp31_, "NoNetwork") == 0) { + } else if (strcmp (_tmp11_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp31_, "AddressInUse") == 0) { + } else if (strcmp (_tmp11_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp31_, "Disconnected") == 0) { + } else if (strcmp (_tmp11_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp31_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp11_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp31_, "FileNotFound") == 0) { + } else if (strcmp (_tmp11_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp31_, "FileExists") == 0) { + } else if (strcmp (_tmp11_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp31_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp11_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp31_, "TimedOut") == 0) { + } else if (strcmp (_tmp11_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp31_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp11_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp31_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp11_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp31_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp11_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp31_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp11_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp31_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp11_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp31_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp11_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp31_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp11_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp31_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp11_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp31_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp11_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp31_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp11_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp31_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp11_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp31_, "RemoteException") == 0) { + } else if (strcmp (_tmp11_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1735,17 +1808,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp32_; + const char* _tmp12_; gboolean _result; - dbus_bool_t _tmp33_; + dbus_bool_t _tmp13_; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp32_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp32_); + _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); @@ -1755,78 +1828,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp34_; + const char* _tmp14_; _edomain = DBUS_GERROR; - _tmp34_ = _dbus_error.name + 27; - if (strcmp (_tmp34_, "Failed") == 0) { + _tmp14_ = _dbus_error.name + 27; + if (strcmp (_tmp14_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp34_, "NoMemory") == 0) { + } else if (strcmp (_tmp14_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp34_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp14_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp34_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp14_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp34_, "NoReply") == 0) { + } else if (strcmp (_tmp14_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp34_, "IOError") == 0) { + } else if (strcmp (_tmp14_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp34_, "BadAddress") == 0) { + } else if (strcmp (_tmp14_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp34_, "NotSupported") == 0) { + } else if (strcmp (_tmp14_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp34_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp14_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp34_, "AccessDenied") == 0) { + } else if (strcmp (_tmp14_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp34_, "AuthFailed") == 0) { + } else if (strcmp (_tmp14_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp34_, "NoServer") == 0) { + } else if (strcmp (_tmp14_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp34_, "Timeout") == 0) { + } else if (strcmp (_tmp14_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp34_, "NoNetwork") == 0) { + } else if (strcmp (_tmp14_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp34_, "AddressInUse") == 0) { + } else if (strcmp (_tmp14_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp34_, "Disconnected") == 0) { + } else if (strcmp (_tmp14_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp34_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp14_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp34_, "FileNotFound") == 0) { + } else if (strcmp (_tmp14_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp34_, "FileExists") == 0) { + } else if (strcmp (_tmp14_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp34_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp14_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp34_, "TimedOut") == 0) { + } else if (strcmp (_tmp14_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp34_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp14_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp34_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp14_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp34_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp14_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp14_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp14_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp34_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp14_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp34_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp14_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp34_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp14_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp34_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp14_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp34_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp14_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp34_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp14_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp34_, "RemoteException") == 0) { + } else if (strcmp (_tmp14_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1836,9 +1909,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp33_); + dbus_message_iter_get_basic (&_iter, &_tmp13_); dbus_message_iter_next (&_iter); - _result = _tmp33_; + _result = _tmp13_; dbus_message_unref (_reply); return _result; } @@ -1849,29 +1922,29 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - guint* _tmp35_; - DBusMessageIter _tmp36_; - int _tmp37_; - const char* _tmp39_; + guint* _tmp15_; + DBusMessageIter _tmp16_; + int _tmp17_; + const char* _tmp19_; gboolean _result; - dbus_bool_t _tmp40_; + dbus_bool_t _tmp20_; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp35_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp36_); - for (_tmp37_ = 0; _tmp37_ < channel_sids_length1; _tmp37_++) { - dbus_uint32_t _tmp38_; - _tmp38_ = *_tmp35_; - dbus_message_iter_append_basic (&_tmp36_, DBUS_TYPE_UINT32, &_tmp38_); - _tmp35_++; - } - dbus_message_iter_close_container (&_iter, &_tmp36_); - _tmp39_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp39_); + _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); @@ -1881,78 +1954,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp41_; + const char* _tmp21_; _edomain = DBUS_GERROR; - _tmp41_ = _dbus_error.name + 27; - if (strcmp (_tmp41_, "Failed") == 0) { + _tmp21_ = _dbus_error.name + 27; + if (strcmp (_tmp21_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp41_, "NoMemory") == 0) { + } else if (strcmp (_tmp21_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp41_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp21_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp41_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp21_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp41_, "NoReply") == 0) { + } else if (strcmp (_tmp21_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp41_, "IOError") == 0) { + } else if (strcmp (_tmp21_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp41_, "BadAddress") == 0) { + } else if (strcmp (_tmp21_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp41_, "NotSupported") == 0) { + } else if (strcmp (_tmp21_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp41_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp21_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp41_, "AccessDenied") == 0) { + } else if (strcmp (_tmp21_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp41_, "AuthFailed") == 0) { + } else if (strcmp (_tmp21_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp41_, "NoServer") == 0) { + } else if (strcmp (_tmp21_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp41_, "Timeout") == 0) { + } else if (strcmp (_tmp21_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp41_, "NoNetwork") == 0) { + } else if (strcmp (_tmp21_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp41_, "AddressInUse") == 0) { + } else if (strcmp (_tmp21_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp41_, "Disconnected") == 0) { + } else if (strcmp (_tmp21_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp41_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp21_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp41_, "FileNotFound") == 0) { + } else if (strcmp (_tmp21_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp41_, "FileExists") == 0) { + } else if (strcmp (_tmp21_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp41_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp21_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp41_, "TimedOut") == 0) { + } else if (strcmp (_tmp21_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp41_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp21_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp41_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp21_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp41_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp21_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp41_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp21_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp41_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp21_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp41_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp21_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp41_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp21_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp41_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp21_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp41_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp21_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp41_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp21_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp41_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp21_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp41_, "RemoteException") == 0) { + } else if (strcmp (_tmp21_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1962,9 +2035,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp40_); + dbus_message_iter_get_basic (&_iter, &_tmp20_); dbus_message_iter_next (&_iter); - _result = _tmp40_; + _result = _tmp20_; dbus_message_unref (_reply); return _result; } @@ -1975,24 +2048,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp42_; - const char* _tmp43_; - dbus_uint32_t _tmp44_; - const char* _tmp45_; + dbus_uint32_t _tmp22_; + const char* _tmp23_; + dbus_uint32_t _tmp24_; + const char* _tmp25_; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "AddScanningData"); dbus_message_iter_init_append (_message, &_iter); - _tmp42_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp42_); - _tmp43_ = modulation; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp43_); - _tmp44_ = symbol_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp44_); - _tmp45_ = code_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp45_); + _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); @@ -2002,78 +2075,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp46_; + const char* _tmp26_; _edomain = DBUS_GERROR; - _tmp46_ = _dbus_error.name + 27; - if (strcmp (_tmp46_, "Failed") == 0) { + _tmp26_ = _dbus_error.name + 27; + if (strcmp (_tmp26_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp46_, "NoMemory") == 0) { + } else if (strcmp (_tmp26_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp46_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp26_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp46_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp26_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp46_, "NoReply") == 0) { + } else if (strcmp (_tmp26_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp46_, "IOError") == 0) { + } else if (strcmp (_tmp26_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp46_, "BadAddress") == 0) { + } else if (strcmp (_tmp26_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp46_, "NotSupported") == 0) { + } else if (strcmp (_tmp26_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp46_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp26_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp46_, "AccessDenied") == 0) { + } else if (strcmp (_tmp26_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp46_, "AuthFailed") == 0) { + } else if (strcmp (_tmp26_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp46_, "NoServer") == 0) { + } else if (strcmp (_tmp26_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp46_, "Timeout") == 0) { + } else if (strcmp (_tmp26_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp46_, "NoNetwork") == 0) { + } else if (strcmp (_tmp26_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp46_, "AddressInUse") == 0) { + } else if (strcmp (_tmp26_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp46_, "Disconnected") == 0) { + } else if (strcmp (_tmp26_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp46_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp26_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp46_, "FileNotFound") == 0) { + } else if (strcmp (_tmp26_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp46_, "FileExists") == 0) { + } else if (strcmp (_tmp26_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp46_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp26_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp46_, "TimedOut") == 0) { + } else if (strcmp (_tmp26_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp46_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp26_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp46_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp26_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp46_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp26_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp46_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp26_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp46_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp26_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp46_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp26_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp46_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp26_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp46_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp26_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp46_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp26_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp46_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp26_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp46_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp26_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp46_, "RemoteException") == 0) { + } else if (strcmp (_tmp26_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -2092,17 +2165,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp47_; + const char* _tmp27_; gboolean _result; - dbus_bool_t _tmp48_; + dbus_bool_t _tmp28_; if (((DVBIDBusCableScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp47_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp47_); + _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); @@ -2112,78 +2185,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp49_; + const char* _tmp29_; _edomain = DBUS_GERROR; - _tmp49_ = _dbus_error.name + 27; - if (strcmp (_tmp49_, "Failed") == 0) { + _tmp29_ = _dbus_error.name + 27; + if (strcmp (_tmp29_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp49_, "NoMemory") == 0) { + } else if (strcmp (_tmp29_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp49_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp29_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp49_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp29_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp49_, "NoReply") == 0) { + } else if (strcmp (_tmp29_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp49_, "IOError") == 0) { + } else if (strcmp (_tmp29_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp49_, "BadAddress") == 0) { + } else if (strcmp (_tmp29_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp49_, "NotSupported") == 0) { + } else if (strcmp (_tmp29_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp49_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp29_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp49_, "AccessDenied") == 0) { + } else if (strcmp (_tmp29_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp49_, "AuthFailed") == 0) { + } else if (strcmp (_tmp29_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp49_, "NoServer") == 0) { + } else if (strcmp (_tmp29_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp49_, "Timeout") == 0) { + } else if (strcmp (_tmp29_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp49_, "NoNetwork") == 0) { + } else if (strcmp (_tmp29_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp49_, "AddressInUse") == 0) { + } else if (strcmp (_tmp29_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp49_, "Disconnected") == 0) { + } else if (strcmp (_tmp29_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp49_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp29_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp49_, "FileNotFound") == 0) { + } else if (strcmp (_tmp29_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp49_, "FileExists") == 0) { + } else if (strcmp (_tmp29_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp49_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp29_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp49_, "TimedOut") == 0) { + } else if (strcmp (_tmp29_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp49_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp29_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp49_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp29_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp49_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp29_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp49_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp29_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp49_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp29_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp49_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp29_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp49_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp29_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp49_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp29_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp49_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp29_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp49_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp29_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp49_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp29_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp49_, "RemoteException") == 0) { + } else if (strcmp (_tmp29_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2193,9 +2266,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp48_); + dbus_message_iter_get_basic (&_iter, &_tmp28_); dbus_message_iter_next (&_iter); - _result = _tmp48_; + _result = _tmp28_; dbus_message_unref (_reply); return _result; } @@ -2257,143 +2330,56 @@ } -static char* string_chug (const char* self) { - char* result; - char* _result_; - g_return_val_if_fail (self != NULL, NULL); - _result_ = g_strdup (self); - g_strchug (_result_); - result = _result_; - return result; -} - - -static gboolean dvb_cable_scanner_real_AddScanningDataFromFile (DVBIDBusCableScanner* base, const char* path, GError** error) { +static void dvb_cable_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line) { DVBCableScanner * self; - gboolean result; - GError * _inner_error_; - GFile* datafile; - char* contents; + gint cols_length1; + gint _cols_size_; + char** _tmp1_; + char** _tmp0_; + char** cols; + gint cols_length; + guint freq; + char* modulation; + guint symbol_rate; + char* code_rate; self = (DVBCableScanner*) base; - g_return_val_if_fail (path != NULL, FALSE); - _inner_error_ = NULL; - datafile = g_file_new_for_path (path); - g_debug ("CableScanner.vala:75: Reading scanning data from %s", path); - contents = NULL; - { - char* _tmp0_; - char* _tmp1_; - _tmp0_ = dvb_utils_read_file_contents (datafile, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch0_g_error; - } - contents = (_tmp1_ = _tmp0_, _g_free0 (contents), _tmp1_); - } - goto __finally0; - __catch0_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("CableScanner.vala:81: Could not read %s: %s", e->message, path); - _g_error_free0 (e); - } - } - __finally0: - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (datafile); - _g_free0 (contents); - return FALSE; - } else { - _g_object_unref0 (datafile); - _g_free0 (contents); - 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 (contents == NULL) { - result = FALSE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; - } - { - char** _tmp2_; - char** line_collection; - int line_collection_length1; - int line_it; - line_collection = _tmp2_ = g_strsplit (contents, "\n", 0); - line_collection_length1 = _vala_array_length (_tmp2_); - for (line_it = 0; line_it < _vala_array_length (_tmp2_); line_it = line_it + 1) { - char* line; - line = g_strdup (line_collection[line_it]); - { - char* _tmp3_; - char** _tmp5_; - gint cols_size; - gint cols_length1; - char** _tmp4_; - char** cols; - gint cols_length; - guint freq; - char* modulation; - guint symbol_rate; - char* code_rate; - line = (_tmp3_ = string_chug (line), _g_free0 (line), _tmp3_); - if (g_str_has_prefix (line, "#")) { - _g_free0 (line); - continue; - } - cols = (_tmp5_ = _tmp4_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp4_), cols_size = cols_length1, _tmp5_); - cols_length = 0; - while (TRUE) { - if (!(cols[cols_length] != NULL)) { - break; - } - cols_length++; - } - cols_length++; - if (cols_length < 5) { - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - continue; - } - freq = (guint) atoi (cols[1]); - modulation = g_strdup (cols[4]); - symbol_rate = (guint) (atoi (cols[2]) / 1000); - code_rate = g_strdup (cols[3]); - dvb_cable_scanner_add_scanning_data (self, freq, modulation, symbol_rate, code_rate); - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (modulation); - _g_free0 (code_rate); - } - } - line_collection = (_vala_array_free (line_collection, line_collection_length1, (GDestroyNotify) g_free), NULL); + g_return_if_fail (line != NULL); + cols = (_tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp0_), _cols_size_ = cols_length1, _tmp1_); + cols_length = 0; + while (TRUE) { + if (!(cols[cols_length] != NULL)) { + break; + } + cols_length++; + } + cols_length++; + if (cols_length < 5) { + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); + return; } - result = TRUE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; + freq = (guint) atoi (cols[1]); + modulation = g_strdup (cols[4]); + symbol_rate = (guint) (atoi (cols[2]) / 1000); + code_rate = g_strdup (cols[3]); + dvb_cable_scanner_add_scanning_data (self, freq, modulation, symbol_rate, code_rate); + _g_free0 (code_rate); + _g_free0 (modulation); + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); } static void dvb_cable_scanner_real_prepare (DVBScanner* base) { DVBCableScanner * self; GstElement* dvbsrc; - char** _tmp1_; - gint keys_size; gint keys_length1; + gint _keys_size_; + char** _tmp1_; char** _tmp0_ = NULL; char** keys; self = (DVBCableScanner*) base; - g_debug ("CableScanner.vala:113: Setting up pipeline for DVB-C scan"); + g_debug ("CableScanner.vala:95: Setting up pipeline for DVB-C scan"); dvbsrc = gst_bin_get_by_name (GST_BIN (((DVBScanner*) self)->pipeline), "dvbsrc"); - keys = (_tmp1_ = (_tmp0_ = g_new0 (char*, 2 + 1), _tmp0_[0] = g_strdup ("frequency"), _tmp0_[1] = g_strdup ("symbol-rate"), _tmp0_), keys_length1 = 2, keys_size = keys_length1, _tmp1_); + keys = (_tmp1_ = (_tmp0_ = g_new0 (char*, 2 + 1), _tmp0_[0] = g_strdup ("frequency"), _tmp0_[1] = g_strdup ("symbol-rate"), _tmp0_), keys_length1 = 2, _keys_size_ = keys_length1, _tmp1_); { char** key_collection; int key_collection_length1; @@ -2411,14 +2397,14 @@ } g_object_set ((GObject*) dvbsrc, "modulation", dvb_get_modulation_val (gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "modulation")), NULL); g_object_set ((GObject*) dvbsrc, "code-rate-hp", dvb_get_code_rate_val (gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "inner-fec")), NULL); - _gst_object_unref0 (dvbsrc); keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL); + _gst_object_unref0 (dvbsrc); } static DVBScannedItem* dvb_cable_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure) { DVBCableScanner * self; - DVBScannedItem* result; + DVBScannedItem* result = NULL; guint freq = 0U; self = (DVBCableScanner*) base; g_return_val_if_fail (structure != NULL, NULL); @@ -2430,9 +2416,9 @@ static DVBChannel* dvb_cable_scanner_real_get_new_channel (DVBScanner* base) { DVBCableScanner * self; - DVBChannel* result; + DVBChannel* result = NULL; self = (DVBCableScanner*) base; - result = (DVBChannel*) dvb_cable_channel_new (); + result = (DVBChannel*) dvb_cable_channel_new_without_schedule (); return result; } @@ -2478,7 +2464,7 @@ 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"); + 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]); @@ -2525,6 +2511,7 @@ static void dvb_cable_scanner_class_init (DVBCableScannerClass * klass) { dvb_cable_scanner_parent_class = g_type_class_peek_parent (klass); + DVB_SCANNER_CLASS (klass)->add_scanning_data_from_string = dvb_cable_scanner_real_add_scanning_data_from_string; DVB_SCANNER_CLASS (klass)->prepare = dvb_cable_scanner_real_prepare; 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; @@ -2536,11 +2523,11 @@ 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 = dvb_cable_scanner_real_AddScanningData; - iface->AddScanningDataFromFile = dvb_cable_scanner_real_AddScanningDataFromFile; iface->Run = (void (*)(DVBIDBusCableScanner* ,GError**)) dvb_scanner_Run; iface->Destroy = (void (*)(DVBIDBusCableScanner* ,GError**)) dvb_scanner_Destroy; iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusCableScanner* ,const char* ,GError**)) dvb_scanner_WriteAllChannelsToFile; iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusCableScanner* ,guint* ,int ,const char* ,GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusCableScanner* ,const char* ,GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2549,14 +2536,16 @@ GType dvb_cable_scanner_get_type (void) { - static GType dvb_cable_scanner_type_id = 0; - if (dvb_cable_scanner_type_id == 0) { + 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}; + 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_once_init_leave (&dvb_cable_scanner_type_id__volatile, dvb_cable_scanner_type_id); } - return dvb_cable_scanner_type_id; + return dvb_cable_scanner_type_id__volatile; } @@ -2590,25 +2579,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); -} - - 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); @@ -2648,4 +2618,23 @@ } +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, double arg_1, double 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); +} + + diff -Nru gnome-dvb-daemon-0.1.16/src/Cable/CableScanner.vala gnome-dvb-daemon-0.1.21/src/Cable/CableScanner.vala --- gnome-dvb-daemon-0.1.16/src/Cable/CableScanner.vala 2009-11-14 14:21:34.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Cable/CableScanner.vala 2010-06-13 11:05:22.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -28,6 +28,8 @@ 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; @@ -69,44 +71,24 @@ base.add_structure_to_scan (tuning_params); } - public bool AddScanningDataFromFile (string path) throws DBus.Error { - File datafile = File.new_for_path(path); - - debug ("Reading scanning data from %s", path); - - string? contents = null; - try { - contents = Utils.read_file_contents (datafile); - } catch (Error e) { - critical ("Could not read %s: %s", e.message, path); - } - - if (contents == null) return false; - + protected override void add_scanning_data_from_string (string line) { // line looks like: // C freq sr fec mod - foreach (string line in contents.split("\n")) { - line = line.chug (); - if (line.has_prefix ("#")) continue; - - string[] cols = Regex.split_simple ("\\s+", line); - - int cols_length = 0; - while (cols[cols_length] != null) - cols_length++; + string[] cols = Regex.split_simple ("\\s+", line); + + int cols_length = 0; + while (cols[cols_length] != null) cols_length++; - - if (cols_length < 5) continue; - - uint freq = (uint)cols[1].to_int (); - string modulation = cols[4]; - uint symbol_rate = (uint)(cols[2].to_int () / 1000); - string code_rate = cols[3]; - - this.add_scanning_data (freq, modulation, symbol_rate, code_rate); - } + cols_length++; + + if (cols_length < 5) return; + + uint freq = (uint)cols[1].to_int (); + string modulation = cols[4]; + uint symbol_rate = (uint)(cols[2].to_int () / 1000); + string code_rate = cols[3]; - return true; + this.add_scanning_data (freq, modulation, symbol_rate, code_rate); } protected override void prepare () { @@ -138,7 +120,7 @@ } protected override Channel get_new_channel () { - return new CableChannel (); + return new CableChannel.without_schedule (); } protected override void add_values_from_structure_to_channel ( diff -Nru gnome-dvb-daemon-0.1.16/src/ChangeType.c gnome-dvb-daemon-0.1.21/src/ChangeType.c --- gnome-dvb-daemon-0.1.16/src/ChangeType.c 2009-10-01 10:38:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChangeType.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChangeType.c generated by valac, the Vala compiler +/* ChangeType.c generated by valac 0.9.7, the Vala compiler * generated from ChangeType.vala, do not modify */ /* @@ -34,18 +34,19 @@ -GType dvb_change_type_get_type (void); - +GType dvb_change_type_get_type (void) G_GNUC_CONST; GType dvb_change_type_get_type (void) { - static GType dvb_change_type_type_id = 0; - if (G_UNLIKELY (dvb_change_type_type_id == 0)) { + static volatile gsize dvb_change_type_type_id__volatile = 0; + if (g_once_init_enter (&dvb_change_type_type_id__volatile)) { static const GEnumValue values[] = {{DVB_CHANGE_TYPE_ADDED, "DVB_CHANGE_TYPE_ADDED", "added"}, {DVB_CHANGE_TYPE_DELETED, "DVB_CHANGE_TYPE_DELETED", "deleted"}, {DVB_CHANGE_TYPE_UPDATED, "DVB_CHANGE_TYPE_UPDATED", "updated"}, {0, NULL, NULL}}; + GType dvb_change_type_type_id; dvb_change_type_type_id = g_enum_register_static ("DVBChangeType", values); + g_once_init_leave (&dvb_change_type_type_id__volatile, dvb_change_type_type_id); } - return dvb_change_type_type_id; + return dvb_change_type_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Channel.c gnome-dvb-daemon-0.1.21/src/Channel.c --- gnome-dvb-daemon-0.1.16/src/Channel.c 2010-03-17 19:10:35.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Channel.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* Channel.c generated by valac, the Vala compiler +/* Channel.c generated by valac 0.9.7, the Vala compiler * generated from Channel.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -78,13 +78,14 @@ gboolean _Scrambled; DVBSchedule* schedule; guint sid; + gboolean has_schedule; }; static gpointer dvb_channel_parent_class = NULL; -GType dvb_channel_get_type (void); -GType dvb_schedule_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +GType dvb_schedule_get_type (void) G_GNUC_CONST; #define DVB_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL, DVBChannelPrivate)) enum { DVB_CHANNEL_DUMMY_PROPERTY, @@ -100,15 +101,17 @@ DVB_CHANNEL_SCHEDULE, DVB_CHANNEL_URL }; -GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); +DVBChannel* dvb_channel_construct (GType object_type); +DVBChannel* dvb_channel_construct_without_schedule (GType object_type); char* dvb_channel_get_audio_pids_string (DVBChannel* self); -guint dvb_channel_get_VideoPID (DVBChannel* self); +GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); gboolean dvb_channel_is_radio (DVBChannel* self); +guint dvb_channel_get_VideoPID (DVBChannel* self); +gboolean dvb_channel_is_valid (DVBChannel* self); +static gboolean dvb_channel_real_is_valid (DVBChannel* self); const char* dvb_channel_get_Name (DVBChannel* self); guint dvb_channel_get_Frequency (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -gboolean dvb_channel_is_valid (DVBChannel* self); -static gboolean dvb_channel_real_is_valid (DVBChannel* self); gboolean dvb_channel_on_same_transport_stream (DVBChannel* self, DVBChannel* channel); static gboolean dvb_channel_real_on_same_transport_stream (DVBChannel* self, DVBChannel* channel); gboolean dvb_channel_equals (DVBChannel* self, DVBChannel* channel); @@ -117,10 +120,9 @@ static void dvb_channel_real_setup_dvb_source (DVBChannel* self, GstElement* source); char* dvb_channel_to_string (DVBChannel* self); static char* dvb_channel_real_to_string (DVBChannel* self); -DVBChannel* dvb_channel_construct (GType object_type); +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_channel_set_Sid (DVBChannel* self, guint value); guint dvb_channel_get_GroupId (DVBChannel* self); void dvb_channel_set_GroupId (DVBChannel* self, guint value); void dvb_channel_set_Name (DVBChannel* self, const char* value); @@ -129,8 +131,8 @@ const char* dvb_channel_get_Network (DVBChannel* self); void dvb_channel_set_Network (DVBChannel* self, const char* value); guint* dvb_channel_get_LogicalChannelNumber (DVBChannel* self); -static guint* _uint_dup (guint* self); void dvb_channel_set_LogicalChannelNumber (DVBChannel* self, guint* value); +static guint* _uint_dup (guint* self); void dvb_channel_set_VideoPID (DVBChannel* self, guint value); void dvb_channel_set_AudioPIDs (DVBChannel* self, GeeList* value); void dvb_channel_set_Frequency (DVBChannel* self, guint value); @@ -138,6 +140,7 @@ void dvb_channel_set_Scrambled (DVBChannel* self, gboolean value); DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self); char* dvb_channel_get_URL (DVBChannel* self); +char* dvb_utils_remove_nonalphanums (const char* text); static GObject * dvb_channel_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_channel_finalize (GObject* obj); static void dvb_channel_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -145,8 +148,24 @@ +DVBChannel* dvb_channel_construct (GType object_type) { + DVBChannel * self; + self = (DVBChannel*) g_object_new (object_type, NULL); + self->priv->has_schedule = TRUE; + return self; +} + + +DVBChannel* dvb_channel_construct_without_schedule (GType object_type) { + DVBChannel * self; + self = (DVBChannel*) g_object_new (object_type, NULL); + self->priv->has_schedule = FALSE; + return self; +} + + char* dvb_channel_get_audio_pids_string (DVBChannel* self) { - char* result; + char* result = NULL; GString* apids; gint i; g_return_val_if_fail (self != NULL, NULL); @@ -181,7 +200,7 @@ gboolean dvb_channel_is_radio (DVBChannel* self) { - gboolean result; + gboolean result = FALSE; g_return_val_if_fail (self != NULL, FALSE); result = self->priv->_VideoPID == 0; return result; @@ -189,7 +208,7 @@ static gboolean dvb_channel_real_is_valid (DVBChannel* self) { - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; @@ -225,8 +244,15 @@ } +/** + * @returns: TRUE if both channels are part of the same + * transport stream (TS). + * + * Channels that are part of the same TS can be viewed/recorded + * at the same time with a single device. + */ static gboolean dvb_channel_real_on_same_transport_stream (DVBChannel* self, DVBChannel* channel) { - gboolean result; + gboolean result = FALSE; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (channel != NULL, FALSE); result = self->priv->_Frequency == channel->priv->_Frequency; @@ -239,8 +265,11 @@ } +/** + * @returns: TRUE of both channels are identical + */ static gboolean dvb_channel_real_equals (DVBChannel* self, DVBChannel* channel) { - gboolean result; + gboolean result = FALSE; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (channel != NULL, FALSE); result = self->priv->sid == dvb_channel_get_Sid (channel); @@ -253,6 +282,11 @@ } +/** + * @source: Either dvbbasebin or dvbsrc + * + * 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))); @@ -277,13 +311,6 @@ } -DVBChannel* dvb_channel_construct (GType object_type) { - DVBChannel * self; - self = g_object_newv (object_type, 0, NULL); - return self; -} - - guint dvb_channel_get_Sid (DVBChannel* self) { guint result; g_return_val_if_fail (self != NULL, 0U); @@ -293,10 +320,12 @@ void dvb_channel_set_Sid (DVBChannel* self, guint value) { - DVBSchedule* _tmp0_; g_return_if_fail (self != NULL); self->priv->sid = value; - self->priv->schedule = (_tmp0_ = dvb_schedule_new (self), _g_object_unref0 (self->priv->schedule), _tmp0_); + if (self->priv->has_schedule) { + DVBSchedule* _tmp0_; + self->priv->schedule = (_tmp0_ = dvb_schedule_new (self), _g_object_unref0 (self->priv->schedule), _tmp0_); + } g_object_notify ((GObject *) self, "Sid"); } @@ -467,8 +496,10 @@ char* dvb_channel_get_URL (DVBChannel* self) { char* result; + char* _tmp0_; + char* _tmp1_; g_return_val_if_fail (self != NULL, NULL); - result = g_strdup_printf ("rtsp://%s:8554/%u/%u", g_get_host_name (), self->priv->_GroupId, dvb_channel_get_Sid (self)); + result = (_tmp1_ = g_strdup_printf ("rtsp://%s:8554/%u/%u/%s", g_get_host_name (), self->priv->_GroupId, dvb_channel_get_Sid (self), _tmp0_ = dvb_utils_remove_nonalphanums (self->priv->_Name)), _g_free0 (_tmp0_), _tmp1_); return result; } @@ -533,12 +564,14 @@ GType dvb_channel_get_type (void) { - static GType dvb_channel_type_id = 0; - if (dvb_channel_type_id == 0) { + static volatile gsize dvb_channel_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBChannelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannel), 0, (GInstanceInitFunc) dvb_channel_instance_init, NULL }; + GType dvb_channel_type_id; dvb_channel_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannel", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&dvb_channel_type_id__volatile, dvb_channel_type_id); } - return dvb_channel_type_id; + return dvb_channel_type_id__volatile; } @@ -577,7 +610,7 @@ g_value_set_object (value, dvb_channel_get_Schedule (self)); break; case DVB_CHANNEL_URL: - g_value_set_string (value, dvb_channel_get_URL (self)); + g_value_take_string (value, dvb_channel_get_URL (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelFactory.c gnome-dvb-daemon-0.1.21/src/ChannelFactory.c --- gnome-dvb-daemon-0.1.16/src/ChannelFactory.c 2010-03-17 19:35:05.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelFactory.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelFactory.c generated by valac, the Vala compiler +/* ChannelFactory.c generated by valac 0.9.7, the Vala compiler * generated from ChannelFactory.vala, do not modify */ /* @@ -97,6 +97,7 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; +#define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) typedef struct _DVBPlayerThreadParamSpecChannelElements DVBPlayerThreadParamSpecChannelElements; #define DVB_TYPE_CHANNEL_FACTORY (dvb_channel_factory_get_type ()) @@ -187,16 +188,17 @@ static gpointer dvb_player_thread_parent_class = NULL; static gpointer dvb_channel_factory_parent_class = NULL; -GType dvb_channel_get_type (void); -GType dvb_player_thread_get_type (void); -GType dvb_device_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +GType dvb_player_thread_get_type (void) G_GNUC_CONST; +GType dvb_device_get_type (void) G_GNUC_CONST; static gpointer dvb_player_thread_channel_elements_ref (gpointer instance); static void dvb_player_thread_channel_elements_unref (gpointer instance); -static GParamSpec* dvb_player_thread_param_spec_channel_elements (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -static void dvb_player_thread_value_set_channel_elements (GValue* value, gpointer v_object); -static gpointer dvb_player_thread_value_get_channel_elements (const GValue* value); -static GType dvb_player_thread_channel_elements_get_type (void); -GType dvb_epg_scanner_get_type (void); +static GParamSpec* dvb_player_thread_param_spec_channel_elements (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void dvb_player_thread_value_set_channel_elements (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void dvb_player_thread_value_take_channel_elements (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer dvb_player_thread_value_get_channel_elements (const GValue* value) G_GNUC_UNUSED; +static GType dvb_player_thread_channel_elements_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +GType dvb_epg_scanner_get_type (void) G_GNUC_CONST; #define DVB_PLAYER_THREAD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_PLAYER_THREAD, DVBPlayerThreadPrivate)) enum { DVB_PLAYER_THREAD_DUMMY_PROPERTY, @@ -208,6 +210,7 @@ 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); 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); @@ -222,17 +225,17 @@ GeeHashSet* dvb_player_thread_get_active_channels (DVBPlayerThread* self); static DVBPlayerThreadChannelElements* dvb_player_thread_channel_elements_new (void); static DVBPlayerThreadChannelElements* dvb_player_thread_channel_elements_construct (GType object_type); -GstElement* dvb_player_thread_get_element (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink_element, gboolean forced, DVBForcedStopNotify notify_func, void* notify_func_target); static gint dvb_player_thread_find_element (void* av, void* bv); -static gint _dvb_player_thread_find_element_gcompare_func (void* a, void* b); GstElement* dvb_player_thread_get_sink_bin (DVBPlayerThread* self, guint sid, GstElement* sink); -void dvb_player_thread_destroy (DVBPlayerThread* self, gboolean forced); -static void dvb_player_thread_remove_sink_bin (DVBPlayerThread* self, guint channel_sid, GstElement* sink); +static gint _dvb_player_thread_find_element_gcompare_func (void* a, void* b); gboolean dvb_player_thread_remove_channel (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink); -GType dvb_channel_list_get_type (void); +static gboolean dvb_player_thread_set_playing_or_destroy (DVBPlayerThread* self); +static void dvb_player_thread_remove_sink_bin (DVBPlayerThread* self, guint channel_sid, GstElement* sink); +void dvb_player_thread_destroy (DVBPlayerThread* self, gboolean forced); +static void dvb_player_thread_real_destroy (DVBPlayerThread* self, gboolean forced); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_get_Channels (DVBDevice* self); DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); -static void dvb_player_thread_real_destroy (DVBPlayerThread* self, gboolean forced); void dvb_epg_scanner_on_eit_structure (DVBEPGScanner* self, const GstStructure* structure); static void dvb_player_thread_set_active_channels (DVBPlayerThread* self, GeeHashSet* value); static void dvb_player_thread_set_device (DVBPlayerThread* self, DVBDevice* value); @@ -245,8 +248,8 @@ static void dvb_player_thread_finalize (GObject* obj); static void dvb_player_thread_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_player_thread_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType dvb_channel_factory_get_type (void); -GType dvb_device_group_get_type (void); +GType dvb_channel_factory_get_type (void) G_GNUC_CONST; +GType dvb_device_group_get_type (void) G_GNUC_CONST; #define DVB_CHANNEL_FACTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_FACTORY, DVBChannelFactoryPrivate)) enum { DVB_CHANNEL_FACTORY_DUMMY_PROPERTY, @@ -255,17 +258,17 @@ DVBChannelFactory* dvb_channel_factory_new (DVBDeviceGroup* devgroup); DVBChannelFactory* dvb_channel_factory_construct (GType object_type, DVBDeviceGroup* devgroup); void dvb_channel_factory_destroy (DVBChannelFactory* self); +DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target); const char* dvb_channel_get_Name (DVBChannel* self); gboolean dvb_channel_on_same_transport_stream (DVBChannel* self, DVBChannel* channel); DVBDeviceGroup* dvb_channel_factory_get_device_group (DVBChannelFactory* self); -DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self); -void dvb_epg_scanner_stop (DVBEPGScanner* self); +void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self); DVBDevice* dvb_device_group_get_next_free_device (DVBDeviceGroup* self); DVBPlayerThread* dvb_channel_factory_create_player (DVBChannelFactory* self, DVBDevice* device); -DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target); -gboolean dvb_epg_scanner_start (DVBEPGScanner* self); gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); +void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self); static DVBPlayerThread* dvb_channel_factory_real_create_player (DVBChannelFactory* self, DVBDevice* device); +DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self); static void dvb_channel_factory_set_device_group (DVBChannelFactory* self, DVBDeviceGroup* value); static void dvb_channel_factory_finalize (GObject* obj); static void dvb_channel_factory_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); @@ -276,7 +279,12 @@ static int _vala_strcmp0 (const char * str1, const char * str2); +static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +/** + * @device: The device to use + * @epgscanner: #EPGScanner to forward EIT to + */ static gpointer _g_object_ref0 (gpointer self) { return self ? g_object_ref (self) : NULL; } @@ -303,7 +311,7 @@ GstElement* dvb_player_thread_get_pipeline (DVBPlayerThread* self) { - GstElement* result; + GstElement* result = NULL; g_return_val_if_fail (self != NULL, NULL); result = _gst_object_ref0 (self->priv->pipeline); return result; @@ -311,13 +319,18 @@ GstElement* dvb_player_thread_get_dvbbasebin (DVBPlayerThread* self) { - GstElement* result; + GstElement* result = NULL; g_return_val_if_fail (self != NULL, NULL); result = _gst_object_ref0 (self->priv->dvbbasebin); return result; } +/** + * @returns: GstBin containing queue and @sink_element + * + * Start watching @channel and link it with @sink_element + */ static void _dvb_player_thread_bus_watch_func_gst_bus_message (GstBus* _sender, GstMessage* message, gpointer self) { dvb_player_thread_bus_watch_func (self, _sender, message); } @@ -329,12 +342,13 @@ GstElement* dvb_player_thread_get_element (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink_element, gboolean forced, DVBForcedStopNotify notify_func, void* notify_func_target) { - GstElement* result; + GstElement* result = NULL; guint channel_sid; char* channel_sid_str; gboolean create_channel = FALSE; GstElement* bin; 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); @@ -342,153 +356,231 @@ channel_sid_str = g_strdup_printf ("%u", channel_sid); bin = NULL; tee = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - if (self->priv->pipeline == NULL) { - GstElement* _tmp0_; - GstBus* bus; - GstElement* _tmp1_; - GstElement* _tmp2_; - GstElement* _tmp3_; - g_debug ("ChannelFactory.vala:115: Creating new pipeline"); - self->priv->pipeline = (_tmp0_ = (GstElement*) ((GstPipeline*) gst_pipeline_new ("recording")), _gst_object_unref0 (self->priv->pipeline), _tmp0_); - bus = gst_element_get_bus (self->priv->pipeline); - gst_bus_add_signal_watch (bus); - g_signal_connect_object (bus, "message", (GCallback) _dvb_player_thread_bus_watch_func_gst_bus_message, self, 0); - self->priv->dvbbasebin = (_tmp1_ = gst_element_factory_make ("dvbbasebin", NULL), _gst_object_unref0 (self->priv->dvbbasebin), _tmp1_); - if (self->priv->dvbbasebin == NULL) { - g_critical ("ChannelFactory.vala:126: Could not create dvbbasebin element"); - result = NULL; - _gst_object_unref0 (bus); - _g_free0 (channel_sid_str); - _gst_object_unref0 (bin); - _gst_object_unref0 (tee); - _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); - g_object_set ((GObject*) self->priv->dvbbasebin, "adapter", dvb_device_get_Adapter (self->priv->_device), NULL); - g_object_set ((GObject*) self->priv->dvbbasebin, "frontend", dvb_device_get_Frontend (self->priv->_device), NULL); - gst_bin_add (GST_BIN (self->priv->pipeline), _gst_object_ref0 (self->priv->dvbbasebin)); - tee = (_tmp2_ = gst_element_factory_make ("tee", NULL), _gst_object_unref0 (tee), _tmp2_); - dvb_player_thread_add_element (self, _gst_object_ref0 (tee)); - bin = (_tmp3_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp3_); - if (!gst_element_link (tee, bin)) { - g_critical ("ChannelFactory.vala:145: Could not link tee and bin"); - result = NULL; - _gst_object_unref0 (bus); - _g_free0 (channel_sid_str); - _gst_object_unref0 (bin); - _gst_object_unref0 (tee); - _gst_object_unref0 (sink_element); - return result; - } - create_channel = TRUE; - _gst_object_unref0 (bus); - } else { - g_debug ("ChannelFactory.vala:153: Reusing existing pipeline"); - if (self->priv->dvbbasebin == NULL) { - g_critical ("ChannelFactory.vala:155: No dvbbasebin element"); - result = NULL; - _g_free0 (channel_sid_str); - _gst_object_unref0 (bin); - _gst_object_unref0 (tee); - _gst_object_unref0 (sink_element); - return result; - } - gst_element_set_state (self->priv->pipeline, GST_STATE_PAUSED); - if (!gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->_active_channels, channel)) { - GstElement* _tmp4_; - GstElement* _tmp5_; - char* programs; - char* new_programs; - tee = (_tmp4_ = gst_element_factory_make ("tee", NULL), _gst_object_unref0 (tee), _tmp4_); + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + if (self->priv->pipeline == NULL) { + GstElement* _tmp0_; + GstBus* bus; + GstElement* _tmp1_; + GstElement* _tmp2_; + GstElement* _tmp3_; + g_debug ("ChannelFactory.vala:115: Creating new pipeline"); + self->priv->pipeline = (_tmp0_ = (GstElement*) ((GstPipeline*) gst_pipeline_new ("recording")), _gst_object_unref0 (self->priv->pipeline), _tmp0_); + bus = gst_element_get_bus (self->priv->pipeline); + gst_bus_add_signal_watch (bus); + g_signal_connect_object (bus, "message", (GCallback) _dvb_player_thread_bus_watch_func_gst_bus_message, self, 0); + self->priv->dvbbasebin = (_tmp1_ = gst_element_factory_make ("dvbbasebin", NULL), _gst_object_unref0 (self->priv->dvbbasebin), _tmp1_); + 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); + g_object_set ((GObject*) self->priv->dvbbasebin, "adapter", dvb_device_get_Adapter (self->priv->_device), NULL); + g_object_set ((GObject*) self->priv->dvbbasebin, "frontend", dvb_device_get_Frontend (self->priv->_device), NULL); + gst_bin_add (GST_BIN (self->priv->pipeline), _gst_object_ref0 (self->priv->dvbbasebin)); + tee = (_tmp2_ = gst_element_factory_make ("tee", NULL), _gst_object_unref0 (tee), _tmp2_); dvb_player_thread_add_element (self, _gst_object_ref0 (tee)); - bin = (_tmp5_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp5_); + bin = (_tmp3_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp3_); if (!gst_element_link (tee, bin)) { - g_critical ("ChannelFactory.vala:169: Could not link tee and bin"); + g_critical ("ChannelFactory.vala:145: Could not link tee and bin"); result = NULL; - _g_free0 (channel_sid_str); - _gst_object_unref0 (bin); + _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; } - programs = NULL; - g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); - new_programs = g_strdup_printf ("%s:%s", programs, channel_sid_str); - 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 (programs); - _g_free0 (new_programs); + _gst_object_unref0 (bus); } else { - DVBPlayerThreadChannelElements* c_element; - c_element = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); - { - DVBPlayerThreadChannelElements* _tmp6_; - GstElement* _tmp7_; - GstElement* _tmp8_; - char* _tmp10_; - char* _tmp9_; - c_element = (_tmp6_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)), _dvb_player_thread_channel_elements_unref0 (c_element), _tmp6_); - tee = (_tmp7_ = _gst_object_ref0 (c_element->tee), _gst_object_unref0 (tee), _tmp7_); - bin = (_tmp8_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp8_); - g_debug ("ChannelFactory.vala:193: Linking %s with %s", _tmp9_ = gst_object_get_name ((GstObject*) tee), _tmp10_ = gst_object_get_name ((GstObject*) bin)); - _g_free0 (_tmp10_); - _g_free0 (_tmp9_); + 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); + if (!gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->_active_channels, channel)) { + GstElement* _tmp4_; + GstElement* _tmp5_; + char* programs; + char* new_programs; + tee = (_tmp4_ = gst_element_factory_make ("tee", NULL), _gst_object_unref0 (tee), _tmp4_); + dvb_player_thread_add_element (self, _gst_object_ref0 (tee)); + bin = (_tmp5_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp5_); if (!gst_element_link (tee, bin)) { - g_critical ("ChannelFactory.vala:195: Could not link tee and bin"); + g_critical ("ChannelFactory.vala:169: Could not link tee and bin"); result = NULL; - _dvb_player_thread_channel_elements_unref0 (c_element); - _g_free0 (channel_sid_str); - _gst_object_unref0 (bin); + { + 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); + programs = NULL; + g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); + new_programs = g_strdup_printf ("%s:%s", programs, channel_sid_str); + 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); + } else { + DVBPlayerThreadChannelElements* c_element; + c_element = NULL; + { + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + DVBPlayerThreadChannelElements* _tmp6_; + GstElement* _tmp7_; + GstElement* _tmp8_; + char* _tmp9_; + char* _tmp10_; + c_element = (_tmp6_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)), _dvb_player_thread_channel_elements_unref0 (c_element), _tmp6_); + tee = (_tmp7_ = _gst_object_ref0 (c_element->tee), _gst_object_unref0 (tee), _tmp7_); + bin = (_tmp8_ = dvb_player_thread_add_sink_bin (self, sink_element), _gst_object_unref0 (bin), _tmp8_); + g_debug ("ChannelFactory.vala:193: Linking %s with %s", _tmp9_ = gst_object_get_name ((GstObject*) tee), _tmp10_ = gst_object_get_name ((GstObject*) bin)); + _g_free0 (_tmp10_); + _g_free0 (_tmp9_); + if (!gst_element_link (tee, bin)) { + g_critical ("ChannelFactory.vala:195: 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); + } + _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); + } + 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); + } + _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); } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - create_channel = FALSE; - _dvb_player_thread_channel_elements_unref0 (c_element); } + if (create_channel) { + DVBPlayerThreadChannelElements* celems; + GeeArrayList* _tmp11_; + GstElement* _tmp12_; + DVBForcedStopNotify _tmp13_; + celems = dvb_player_thread_channel_elements_new (); + celems->sid = channel_sid; + celems->sinks = (_tmp11_ = gee_array_list_new (GST_TYPE_ELEMENT, (GBoxedCopyFunc) gst_object_ref, gst_object_unref, NULL), _g_object_unref0 (celems->sinks), _tmp11_); + gee_abstract_collection_add ((GeeAbstractCollection*) celems->sinks, bin); + celems->tee = (_tmp12_ = _gst_object_ref0 (tee), _gst_object_unref0 (celems->tee), _tmp12_); + celems->forced = forced; + celems->notify_func = (_tmp13_ = notify_func, ((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, _tmp13_); + { + 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; + } + } + gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->_active_channels, channel); + _dvb_player_thread_channel_elements_unref0 (celems); + } + result = _gst_object_ref0 (bin); + { + 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_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - if (create_channel) { - DVBPlayerThreadChannelElements* celems; - GeeArrayList* _tmp11_; - GstElement* _tmp12_; - DVBForcedStopNotify _tmp13_; - celems = dvb_player_thread_channel_elements_new (); - celems->sid = channel_sid; - celems->sinks = (_tmp11_ = gee_array_list_new (GST_TYPE_ELEMENT, (GBoxedCopyFunc) gst_object_ref, gst_object_unref, NULL), _g_object_unref0 (celems->sinks), _tmp11_); - gee_abstract_collection_add ((GeeAbstractCollection*) celems->sinks, bin); - celems->tee = (_tmp12_ = _gst_object_ref0 (tee), _gst_object_unref0 (celems->tee), _tmp12_); - celems->forced = forced; - celems->notify_func = (_tmp13_ = notify_func, ((celems->notify_func_target_destroy_notify == NULL) ? NULL : celems->notify_func_target_destroy_notify (celems->notify_func_target), 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, _tmp13_); - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + __finally14: { - gee_abstract_map_set ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid), 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: 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 (&self->priv->__lock_elements_map); - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->_active_channels, channel); - _dvb_player_thread_channel_elements_unref0 (celems); } - result = bin; - _g_free0 (channel_sid_str); _gst_object_unref0 (tee); + _gst_object_unref0 (bin); + _g_free0 (channel_sid_str); _gst_object_unref0 (sink_element); - return result; } static GstElement* dvb_player_thread_add_sink_bin (DVBPlayerThread* self, GstElement* sink_element) { - GstElement* result; + GstElement* result = NULL; GstElement* queue; GstElement* bin; GstPad* pad; @@ -500,8 +592,8 @@ bin = (GstElement*) ((GstBin*) gst_bin_new (NULL)); gst_bin_add_many (GST_BIN (bin), _gst_object_ref0 (queue), _gst_object_ref0 (sink_element), NULL); if (!gst_element_link (queue, sink_element)) { - char* _tmp1_; char* _tmp0_; + char* _tmp1_; g_critical ("ChannelFactory.vala:231: Could not link elements %s and %s", _tmp0_ = gst_object_get_name ((GstObject*) queue), _tmp1_ = gst_object_get_name ((GstObject*) sink_element)); _g_free0 (_tmp1_); _g_free0 (_tmp0_); @@ -512,327 +604,479 @@ gst_element_add_pad (bin, _gst_object_ref0 ((GstPad*) ghost)); dvb_player_thread_add_element (self, _gst_object_ref0 (bin)); result = bin; - _gst_object_unref0 (queue); - _gst_object_unref0 (pad); _gst_object_unref0 (ghost); + _gst_object_unref0 (pad); + _gst_object_unref0 (queue); return result; } static gint dvb_player_thread_find_element (void* av, void* bv) { - gint result; + gint result = 0; GstElement* a; GstElement* b; a = _gst_object_ref0 (GST_ELEMENT (av)); b = _gst_object_ref0 (GST_ELEMENT (bv)); if (a == b) { result = 0; - _gst_object_unref0 (a); _gst_object_unref0 (b); + _gst_object_unref0 (a); return result; } else { result = 1; - _gst_object_unref0 (a); _gst_object_unref0 (b); + _gst_object_unref0 (a); return result; } - _gst_object_unref0 (a); _gst_object_unref0 (b); + _gst_object_unref0 (a); } +/** + * @sid: Channel SID + * @sink: The sink element that the bin should contain + * @returns: GstBin containing queue and sink for the specified channel + */ static gint _dvb_player_thread_find_element_gcompare_func (void* a, void* b) { - return dvb_player_thread_find_element (a, b); + gint result; + result = dvb_player_thread_find_element (a, b); + return result; } GstElement* dvb_player_thread_get_sink_bin (DVBPlayerThread* self, guint sid, GstElement* sink) { - GstElement* result; + GstElement* result = NULL; GstElement* _result_; char* _tmp0_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (sink != NULL, NULL); _result_ = NULL; g_debug ("ChannelFactory.vala:261: Searching for sink %s (%p) of channel %u", _tmp0_ = gst_object_get_name ((GstObject*) sink), sink, sid); _g_free0 (_tmp0_); - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { - DVBPlayerThreadChannelElements* celems; - celems = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)); - if (celems != NULL) { - { - GeeIterator* _sink_bin_it; - _sink_bin_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) celems->sinks); - while (TRUE) { - GstElement* sink_bin; - GstIterator* it; - GstElement* element; - if (!gee_iterator_next (_sink_bin_it)) { - break; - } - sink_bin = (GstElement*) gee_iterator_get (_sink_bin_it); - it = gst_bin_iterate_elements (GST_BIN (sink_bin)); - element = _gst_object_ref0 (GST_ELEMENT (gst_iterator_find_custom (it, _dvb_player_thread_find_element_gcompare_func, sink))); - if (element != NULL) { - GstElement* _tmp1_; - _result_ = (_tmp1_ = _gst_object_ref0 (sink_bin), _gst_object_unref0 (_result_), _tmp1_); - _gst_object_unref0 (sink_bin); - _gst_iterator_free0 (it); + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + DVBPlayerThreadChannelElements* celems; + celems = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)); + if (celems != NULL) { + { + GeeIterator* _sink_bin_it; + _sink_bin_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) celems->sinks); + while (TRUE) { + GstElement* sink_bin; + GstIterator* it; + GstElement* element; + if (!gee_iterator_next (_sink_bin_it)) { + break; + } + sink_bin = (GstElement*) gee_iterator_get (_sink_bin_it); + it = gst_bin_iterate_elements (GST_BIN (sink_bin)); + element = (GstElement*) gst_iterator_find_custom (it, _dvb_player_thread_find_element_gcompare_func, sink); + if (element != NULL) { + GstElement* _tmp1_; + _result_ = (_tmp1_ = _gst_object_ref0 (sink_bin), _gst_object_unref0 (_result_), _tmp1_); + _gst_object_unref0 (element); + _gst_iterator_free0 (it); + _gst_object_unref0 (sink_bin); + break; + } _gst_object_unref0 (element); - break; + _gst_iterator_free0 (it); + _gst_object_unref0 (sink_bin); } - _gst_object_unref0 (sink_bin); - _gst_iterator_free0 (it); - _gst_object_unref0 (element); + _g_object_unref0 (_sink_bin_it); } - _g_object_unref0 (_sink_bin_it); + } else { + g_warning ("ChannelFactory.vala:274: Could not find any sinks of channel %u", sid); } - } else { - g_warning ("ChannelFactory.vala:274: Could not find any sinks of channel %u", sid); + _dvb_player_thread_channel_elements_unref0 (celems); + } + __finally17: + { + 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); + g_clear_error (&_inner_error_); + return NULL; } - _dvb_player_thread_channel_elements_unref0 (celems); } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + if (_result_ == NULL) { + g_debug ("ChannelFactory.vala:278: Found NO sink"); + } else { + g_debug ("ChannelFactory.vala:280: Found sink"); + } result = _result_; return result; } +/** + * Stop watching @channel + */ gboolean dvb_player_thread_remove_channel (DVBPlayerThread* self, DVBChannel* channel, GstElement* sink) { - gboolean result; + gboolean result = FALSE; guint channel_sid; DVBPlayerThreadChannelElements* celements; 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); channel_sid = dvb_channel_get_Sid (channel); if (!gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->_active_channels, channel)) { - g_critical ("ChannelFactory.vala:288: Could not find channel with SID %u", channel_sid); + g_critical ("ChannelFactory.vala:291: Could not find channel with SID %u", channel_sid); result = FALSE; return result; } celements = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { - DVBPlayerThreadChannelElements* _tmp0_; - celements = (_tmp0_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)), _dvb_player_thread_channel_elements_unref0 (celements), _tmp0_); - stop_channel = gee_collection_get_size ((GeeCollection*) celements->sinks) == 1; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + DVBPlayerThreadChannelElements* _tmp0_; + celements = (_tmp0_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)), _dvb_player_thread_channel_elements_unref0 (celements), _tmp0_); + stop_channel = gee_collection_get_size ((GeeCollection*) celements->sinks) == 1; + } + __finally18: + { + 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); + g_clear_error (&_inner_error_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - if (gee_collection_get_size ((GeeCollection*) self->priv->_active_channels) > 1) { - if (stop_channel) { - char* channel_sid_string; - char* programs; - char** _tmp2_; - gint programs_arr_size; - gint programs_arr_length1; - char** _tmp1_; - char** programs_arr; - GeeArrayList* new_programs_list; - char* _tmp4_; - GString* _tmp5_; - GString* new_programs; - GstStateChangeReturn ret; - channel_sid_string = g_strdup_printf ("%u", channel_sid); - programs = NULL; - g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); - programs_arr = (_tmp2_ = _tmp1_ = g_strsplit (programs, ":", 0), programs_arr_length1 = _vala_array_length (_tmp1_), programs_arr_size = programs_arr_length1, _tmp2_); - new_programs_list = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL); - { - gint i; - i = 0; + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + if (gee_collection_get_size ((GeeCollection*) self->priv->_active_channels) > 1) { + if (stop_channel) { + char* channel_sid_string; + char* programs; + gint programs_arr_length1; + gint _programs_arr_size_; + char** _tmp2_; + char** _tmp1_; + char** programs_arr; + GeeArrayList* new_programs_list; + char* _tmp4_; + GString* _tmp5_; + GString* new_programs; + channel_sid_string = g_strdup_printf ("%u", channel_sid); + programs = NULL; + g_object_get ((GObject*) self->priv->dvbbasebin, "program-numbers", &programs, NULL); + programs_arr = (_tmp2_ = _tmp1_ = g_strsplit (programs, ":", 0), programs_arr_length1 = _vala_array_length (_tmp1_), _programs_arr_size_ = programs_arr_length1, _tmp2_); + new_programs_list = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL); { - gboolean _tmp3_; - _tmp3_ = TRUE; - while (TRUE) { - if (!_tmp3_) { - i++; - } - _tmp3_ = FALSE; - if (!(i < programs_arr_length1)) { - break; + gint i; + i = 0; + { + gboolean _tmp3_; + _tmp3_ = TRUE; + while (TRUE) { + if (!_tmp3_) { + i++; + } + _tmp3_ = FALSE; + if (!(i < programs_arr_length1)) { + break; + } + if (_vala_strcmp0 (programs_arr[i], channel_sid_string) != 0) { + gee_abstract_collection_add ((GeeAbstractCollection*) new_programs_list, programs_arr[i]); + } } - if (_vala_strcmp0 (programs_arr[i], channel_sid_string) != 0) { - gee_abstract_collection_add ((GeeAbstractCollection*) new_programs_list, programs_arr[i]); + } + } + new_programs = (_tmp5_ = g_string_new (_tmp4_ = (char*) gee_abstract_list_get ((GeeAbstractList*) new_programs_list, 0)), _g_free0 (_tmp4_), _tmp5_); + { + gint i; + i = 1; + { + gboolean _tmp6_; + _tmp6_ = TRUE; + while (TRUE) { + char* _tmp7_; + char* _tmp8_; + if (!_tmp6_) { + i++; + } + _tmp6_ = FALSE; + if (!(i < gee_collection_get_size ((GeeCollection*) new_programs_list))) { + break; + } + g_string_append (new_programs, _tmp8_ = g_strconcat (":", _tmp7_ = (char*) gee_abstract_list_get ((GeeAbstractList*) new_programs_list, i), NULL)); + _g_free0 (_tmp8_); + _g_free0 (_tmp7_); } } } + 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); + if (!dvb_player_thread_set_playing_or_destroy (self)) { + 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); + { + 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); } - new_programs = (_tmp5_ = g_string_new (_tmp4_ = (char*) gee_abstract_list_get ((GeeAbstractList*) new_programs_list, 0)), _g_free0 (_tmp4_), _tmp5_); - { - gint i; - i = 1; + dvb_player_thread_remove_sink_bin (self, channel_sid, sink); + if (stop_channel) { + char* _tmp9_; + g_debug ("ChannelFactory.vala:345: Removing tee %s from pipeline", _tmp9_ = gst_object_get_name ((GstObject*) celements->tee)); + _g_free0 (_tmp9_); + gst_element_set_state (celements->tee, GST_STATE_NULL); + gst_bin_remove (GST_BIN (self->priv->pipeline), celements->tee); { - gboolean _tmp6_; - _tmp6_ = TRUE; - while (TRUE) { - char* _tmp8_; - char* _tmp7_; - if (!_tmp6_) { - i++; - } - _tmp6_ = FALSE; - if (!(i < gee_collection_get_size ((GeeCollection*) new_programs_list))) { - break; + 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); } - g_string_append (new_programs, _tmp8_ = g_strconcat (":", _tmp7_ = (char*) gee_abstract_list_get ((GeeAbstractList*) new_programs_list, i), NULL)); - _g_free0 (_tmp8_); - _g_free0 (_tmp7_); + _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; } } } - g_debug ("ChannelFactory.vala:327: 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); - ret = gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); - if (ret == GST_STATE_CHANGE_FAILURE) { - g_critical ("ChannelFactory.vala:336: Failed setting pipeline to playing"); + } else { + if (stop_channel) { dvb_player_thread_destroy (self, FALSE); - result = FALSE; - _g_free0 (channel_sid_string); - _g_free0 (programs); - programs_arr = (_vala_array_free (programs_arr, programs_arr_length1, (GDestroyNotify) g_free), NULL); - _g_object_unref0 (new_programs_list); - _g_string_free0 (new_programs); - _dvb_player_thread_channel_elements_unref0 (celements); - return result; - } - gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->_active_channels, channel); - _g_free0 (channel_sid_string); - _g_free0 (programs); - programs_arr = (_vala_array_free (programs_arr, programs_arr_length1, (GDestroyNotify) g_free), NULL); - _g_object_unref0 (new_programs_list); - _g_string_free0 (new_programs); - } - dvb_player_thread_remove_sink_bin (self, channel_sid, sink); - if (stop_channel) { - char* _tmp9_; - g_debug ("ChannelFactory.vala:347: Removing tee %s from pipeline", _tmp9_ = gst_object_get_name ((GstObject*) celements->tee)); - _g_free0 (_tmp9_); - 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_map_remove ((GeeMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid), NULL); + } else { + dvb_player_thread_remove_sink_bin (self, channel_sid, sink); + if (!dvb_player_thread_set_playing_or_destroy (self)) { + result = FALSE; + { + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } + _dvb_player_thread_channel_elements_unref0 (celements); + return result; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - } - } else { - if (stop_channel) { - dvb_player_thread_destroy (self, FALSE); - } else { - dvb_player_thread_remove_sink_bin (self, channel_sid, sink); } } + __finally19: + { + 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); + g_clear_error (&_inner_error_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); result = TRUE; _dvb_player_thread_channel_elements_unref0 (celements); return result; } +static gboolean dvb_player_thread_set_playing_or_destroy (DVBPlayerThread* self) { + gboolean result = FALSE; + GstStateChangeReturn ret; + g_return_val_if_fail (self != NULL, FALSE); + ret = gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); + if (ret == GST_STATE_CHANGE_FAILURE) { + g_critical ("ChannelFactory.vala:376: Failed setting pipeline to playing"); + dvb_player_thread_destroy (self, FALSE); + result = FALSE; + return result; + } + result = TRUE; + return result; +} + + static void dvb_player_thread_remove_sink_bin (DVBPlayerThread* self, guint channel_sid, GstElement* sink) { char* _tmp0_; GstElement* sink_bin; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (sink != NULL); - g_debug ("ChannelFactory.vala:373: Removing sink bin of sink %s (%p) of channel " \ + g_debug ("ChannelFactory.vala:384: Removing sink bin of sink %s (%p) of channel " \ "%u", _tmp0_ = gst_object_get_name ((GstObject*) sink), sink, channel_sid); _g_free0 (_tmp0_); sink_bin = dvb_player_thread_get_sink_bin (self, channel_sid, sink); if (sink_bin == NULL) { char* _tmp1_; - g_critical ("ChannelFactory.vala:379: Could not find sink bin for channel %u and si" \ + g_critical ("ChannelFactory.vala:390: Could not find sink bin for channel %u and si" \ "nk %s (%p)", channel_sid, _tmp1_ = gst_object_get_name ((GstObject*) sink), sink); _g_free0 (_tmp1_); _gst_object_unref0 (sink_bin); return; } - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { - DVBPlayerThreadChannelElements* celems; - char* _tmp2_; - celems = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)); - g_debug ("ChannelFactory.vala:387: Setting state of queue and sink %s (%p) to NU" \ + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + DVBPlayerThreadChannelElements* celems; + char* _tmp2_; + celems = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (channel_sid)); + g_debug ("ChannelFactory.vala:398: Setting state of queue and sink %s (%p) to NU" \ "LL", _tmp2_ = gst_object_get_name ((GstObject*) sink), sink); - _g_free0 (_tmp2_); - gst_element_unlink (celems->tee, sink_bin); - gst_element_set_state (sink_bin, GST_STATE_NULL); - if (!gee_abstract_collection_remove ((GeeAbstractCollection*) celems->sinks, sink_bin)) { - char* _tmp3_; - g_critical ("ChannelFactory.vala:393: Could not find sink bin %s (%p)", _tmp3_ = gst_object_get_name ((GstObject*) sink_bin), sink_bin); - _g_free0 (_tmp3_); + _g_free0 (_tmp2_); + gst_element_unlink (celems->tee, sink_bin); + gst_element_set_state (sink_bin, GST_STATE_NULL); + if (!gee_abstract_collection_remove ((GeeAbstractCollection*) celems->sinks, sink_bin)) { + char* _tmp3_; + g_critical ("ChannelFactory.vala:404: Could not find sink bin %s (%p)", _tmp3_ = gst_object_get_name ((GstObject*) sink_bin), sink_bin); + _g_free0 (_tmp3_); + } + _dvb_player_thread_channel_elements_unref0 (celems); + } + __finally21: + { + 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); + g_clear_error (&_inner_error_); + return; } - _dvb_player_thread_channel_elements_unref0 (celems); } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - g_debug ("ChannelFactory.vala:398: Removing queue and sink from pipeline"); + g_debug ("ChannelFactory.vala:409: Removing queue and sink from pipeline"); gst_bin_remove (GST_BIN (self->priv->pipeline), sink_bin); _gst_object_unref0 (sink_bin); } +/** + * Stop pipeline and clean up everything else + */ static void dvb_player_thread_real_destroy (DVBPlayerThread* self, gboolean forced) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); if (self->priv->destroyed) { return; } - 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); - { + g_static_rec_mutex_lock (&self->priv->__lock_destroyed); + { + self->priv->destroyed = TRUE; + if (forced) { { - GeeCollection* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _celems_it; - _celems_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - DVBPlayerThreadChannelElements* celems; - if (!gee_iterator_next (_celems_it)) { - break; + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + { + GeeCollection* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _celems_it; + _celems_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + DVBPlayerThreadChannelElements* celems; + if (!gee_iterator_next (_celems_it)) { + break; + } + celems = (DVBPlayerThreadChannelElements*) gee_iterator_get (_celems_it); + if (celems->notify_func != NULL) { + DVBChannel* channel; + channel = dvb_channel_list_get_channel (dvb_device_get_Channels (self->priv->_device), celems->sid); + celems->notify_func (channel, celems->notify_func_target); + _g_object_unref0 (channel); + } + _dvb_player_thread_channel_elements_unref0 (celems); + } + _g_object_unref0 (_celems_it); } - celems = (DVBPlayerThreadChannelElements*) gee_iterator_get (_celems_it); - if (celems->notify_func != NULL) { - DVBChannel* channel; - channel = dvb_channel_list_get_channel (dvb_device_get_Channels (self->priv->_device), celems->sid); - celems->notify_func (channel, celems->notify_func_target); - _g_object_unref0 (channel); + } + __finally23: + { + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + if (_inner_error_ != NULL) { + { + 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; } - _g_object_unref0 (_celems_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - } - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); - { - GstElement* _tmp2_; - if (self->priv->pipeline != NULL) { - GstBus* bus; - g_debug ("ChannelFactory.vala:423: Stopping pipeline"); - bus = gst_element_get_bus (self->priv->pipeline); - gst_bus_remove_signal_watch (bus); - gst_element_set_state (self->priv->pipeline, GST_STATE_NULL); - _gst_object_unref0 (bus); + { + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + GstElement* _tmp2_; + if (self->priv->pipeline != NULL) { + GstBus* bus; + g_debug ("ChannelFactory.vala:434: Stopping pipeline"); + bus = gst_element_get_bus (self->priv->pipeline); + gst_bus_remove_signal_watch (bus); + gst_element_set_state (self->priv->pipeline, GST_STATE_NULL); + _gst_object_unref0 (bus); + } + self->priv->pipeline = (_tmp2_ = NULL, _gst_object_unref0 (self->priv->pipeline), _tmp2_); + } + __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; + } } - self->priv->pipeline = (_tmp2_ = NULL, _gst_object_unref0 (self->priv->pipeline), _tmp2_); + { + 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; + } + } + gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->_active_channels); } - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + __finally22: { - gee_abstract_map_clear ((GeeAbstractMap*) self->priv->elements_map); + 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_); + return; } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->_active_channels); } - g_static_rec_mutex_unlock (&self->priv->__lock_destroyed); } @@ -842,19 +1086,19 @@ static gboolean dvb_player_thread_add_element (DVBPlayerThread* self, GstElement* elem) { - gboolean result; + gboolean result = FALSE; char* elem_name; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (elem != NULL, FALSE); elem_name = gst_object_get_name ((GstObject*) elem); if (!gst_bin_add (GST_BIN (self->priv->pipeline), _gst_object_ref0 (elem))) { - g_critical ("ChannelFactory.vala:440: Could not add element %s", elem_name); + g_critical ("ChannelFactory.vala:451: Could not add element %s", elem_name); result = FALSE; _g_free0 (elem_name); _gst_object_unref0 (elem); return result; } - g_debug ("ChannelFactory.vala:443: Element %s (%p) added to pipeline", elem_name, elem); + g_debug ("ChannelFactory.vala:454: Element %s (%p) added to pipeline", elem_name, elem); result = TRUE; _g_free0 (elem_name); _gst_object_unref0 (elem); @@ -862,78 +1106,106 @@ } +/** + * Link program_%d pad with tee + */ static void dvb_player_thread_on_dvbbasebin_pad_added (DVBPlayerThread* self, GstElement* elem, GstPad* pad) { char* pad_name; guint sid = 0U; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (elem != NULL); g_return_if_fail (pad != NULL); pad_name = gst_object_get_name ((GstObject*) pad); - g_debug ("ChannelFactory.vala:452: Pad %s added", pad_name); + g_debug ("ChannelFactory.vala:463: Pad %s added", pad_name); if (!g_str_has_prefix (pad_name, "program_")) { _g_free0 (pad_name); return; } sscanf (pad_name, "program_%u", &sid); - g_debug ("ChannelFactory.vala:460: SID is '%u'", sid); - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + g_debug ("ChannelFactory.vala:471: SID is '%u'", sid); { - if (gee_map_contains ((GeeMap*) self->priv->elements_map, GUINT_TO_POINTER (sid))) { - DVBPlayerThreadChannelElements* _tmp0_; - GstElement* _tmp1_; - GstElement* sink; - char* _tmp3_; - char* _tmp2_; - GstPad* sinkpad; - GstPadLinkReturn rc; - sink = (_tmp1_ = _gst_object_ref0 ((_tmp0_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)))->tee), _dvb_player_thread_channel_elements_unref0 (_tmp0_), _tmp1_); - if (sink == NULL) { - g_critical ("ChannelFactory.vala:466: Could not find sink for SID %u", sid); + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid))) { + DVBPlayerThreadChannelElements* _tmp0_; + GstElement* _tmp1_; + GstElement* sink; + char* _tmp2_; + char* _tmp3_; + GstPad* sinkpad; + GstPadLinkReturn rc; + sink = (_tmp1_ = _gst_object_ref0 ((_tmp0_ = (DVBPlayerThreadChannelElements*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->elements_map, GUINT_TO_POINTER (sid)))->tee), _dvb_player_thread_channel_elements_unref0 (_tmp0_), _tmp1_); + if (sink == NULL) { + g_critical ("ChannelFactory.vala:477: Could not find sink for SID %u", sid); + _gst_object_unref0 (sink); + { + g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); + } + _g_free0 (pad_name); + return; + } + g_debug ("ChannelFactory.vala:481: Linking elements %s and %s", _tmp2_ = gst_object_get_name ((GstObject*) elem), _tmp3_ = gst_object_get_name ((GstObject*) sink)); + _g_free0 (_tmp3_); + _g_free0 (_tmp2_); + sinkpad = gst_element_get_static_pad (sink, "sink"); + rc = gst_pad_link (pad, sinkpad); + if (rc != GST_PAD_LINK_OK) { + char* _tmp4_; + char* _tmp5_; + g_critical ("ChannelFactory.vala:486: Could not link pads %s and %s", _tmp4_ = gst_object_get_name ((GstObject*) pad), _tmp5_ = gst_object_get_name ((GstObject*) sinkpad)); + _g_free0 (_tmp5_); + _g_free0 (_tmp4_); + } else { + char* _tmp6_; + char* _tmp7_; + g_debug ("ChannelFactory.vala:489: Src pad %s linked with sink pad %s", _tmp6_ = gst_object_get_name ((GstObject*) pad), _tmp7_ = gst_object_get_name ((GstObject*) sinkpad)); + _g_free0 (_tmp7_); + _g_free0 (_tmp6_); + } + _gst_object_unref0 (sinkpad); _gst_object_unref0 (sink); - _g_free0 (pad_name); - return; - } - g_debug ("ChannelFactory.vala:470: Linking elements %s and %s", _tmp2_ = gst_object_get_name ((GstObject*) elem), _tmp3_ = gst_object_get_name ((GstObject*) sink)); - _g_free0 (_tmp3_); - _g_free0 (_tmp2_); - sinkpad = gst_element_get_static_pad (sink, "sink"); - rc = gst_pad_link (pad, sinkpad); - if (rc != GST_PAD_LINK_OK) { - char* _tmp5_; - char* _tmp4_; - g_critical ("ChannelFactory.vala:475: Could not link pads %s and %s", _tmp4_ = gst_object_get_name ((GstObject*) pad), _tmp5_ = gst_object_get_name ((GstObject*) sinkpad)); - _g_free0 (_tmp5_); - _g_free0 (_tmp4_); - } else { - char* _tmp7_; - char* _tmp6_; - g_debug ("ChannelFactory.vala:478: Src pad %s linked with sink pad %s", _tmp6_ = gst_object_get_name ((GstObject*) pad), _tmp7_ = gst_object_get_name ((GstObject*) sinkpad)); - _g_free0 (_tmp7_); - _g_free0 (_tmp6_); } - _gst_object_unref0 (sink); - _gst_object_unref0 (sinkpad); + } + __finally26: + { + 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); + g_clear_error (&_inner_error_); + return; } } - g_static_rec_mutex_unlock (&self->priv->__lock_elements_map); _g_free0 (pad_name); } +/** + * Forward EIT structure + */ +static gpointer _gst_structure_copy0 (gpointer self) { + return self ? gst_structure_copy (self) : NULL; +} + + static void dvb_player_thread_bus_watch_func (DVBPlayerThread* self, GstBus* bus, GstMessage* message) { + GstStructure* structure; g_return_if_fail (self != NULL); g_return_if_fail (bus != NULL); g_return_if_fail (message != NULL); + structure = _gst_structure_copy0 (gst_message_get_structure (message)); switch (message->type) { case GST_MESSAGE_ELEMENT: { char* structure_name; - structure_name = g_strdup (gst_structure_get_name (message->structure)); + structure_name = g_strdup (gst_structure_get_name (structure)); if (_vala_strcmp0 (structure_name, "eit") == 0) { if (self->priv->epgscanner != NULL) { - dvb_epg_scanner_on_eit_structure (self->priv->epgscanner, message->structure); + dvb_epg_scanner_on_eit_structure (self->priv->epgscanner, structure); } - g_signal_emit_by_name (self, "eit-structure", message->structure); + g_signal_emit_by_name (self, "eit-structure", structure); } _g_free0 (structure_name); break; @@ -941,14 +1213,14 @@ case GST_MESSAGE_WARNING: { char* _tmp0_; - g_warning ("ChannelFactory.vala:499: %s", _tmp0_ = gst_structure_to_string (message->structure)); + g_warning ("ChannelFactory.vala:511: %s", _tmp0_ = gst_structure_to_string (structure)); _g_free0 (_tmp0_); break; } case GST_MESSAGE_ERROR: { char* _tmp1_; - g_critical ("ChannelFactory.vala:502: %s", _tmp1_ = gst_structure_to_string (message->structure)); + g_critical ("ChannelFactory.vala:514: %s", _tmp1_ = gst_structure_to_string (structure)); _g_free0 (_tmp1_); break; } @@ -957,6 +1229,7 @@ break; } } + _gst_structure_free0 (structure); } @@ -995,32 +1268,43 @@ gboolean dvb_player_thread_get_forced (DVBPlayerThread* self) { gboolean result; gboolean val; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); val = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { + g_static_rec_mutex_lock (&self->priv->__lock_elements_map); { - GeeCollection* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _celem_it; - _celem_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - DVBPlayerThreadChannelElements* celem; - if (!gee_iterator_next (_celem_it)) { - break; - } - celem = (DVBPlayerThreadChannelElements*) gee_iterator_get (_celem_it); - if (celem->forced) { - val = TRUE; + { + GeeCollection* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _celem_it; + _celem_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values ((GeeMap*) self->priv->elements_map))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + DVBPlayerThreadChannelElements* celem; + if (!gee_iterator_next (_celem_it)) { + break; + } + celem = (DVBPlayerThreadChannelElements*) gee_iterator_get (_celem_it); + if (celem->forced) { + 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); + } + 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_static_rec_mutex_unlock (&self->priv->__lock_elements_map); result = val; return result; } @@ -1150,6 +1434,23 @@ } +static void dvb_player_thread_value_take_channel_elements (GValue* value, gpointer v_object) { + DVBPlayerThreadChannelElements* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_PLAYER_THREAD_TYPE_CHANNEL_ELEMENTS)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_PLAYER_THREAD_TYPE_CHANNEL_ELEMENTS)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_player_thread_channel_elements_unref (old); + } +} + + static void dvb_player_thread_channel_elements_class_init (DVBPlayerThreadChannelElementsClass * klass) { dvb_player_thread_channel_elements_parent_class = g_type_class_peek_parent (klass); DVB_PLAYER_THREAD_CHANNEL_ELEMENTS_CLASS (klass)->finalize = dvb_player_thread_channel_elements_finalize; @@ -1166,7 +1467,7 @@ 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); + (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; @@ -1174,14 +1475,16 @@ static GType dvb_player_thread_channel_elements_get_type (void) { - static GType dvb_player_thread_channel_elements_type_id = 0; - if (dvb_player_thread_channel_elements_type_id == 0) { + static volatile gsize dvb_player_thread_channel_elements_type_id__volatile = 0; + if (g_once_init_enter (&dvb_player_thread_channel_elements_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_player_thread_value_channel_elements_init, dvb_player_thread_value_channel_elements_free_value, dvb_player_thread_value_channel_elements_copy_value, dvb_player_thread_value_channel_elements_peek_pointer, "p", dvb_player_thread_value_channel_elements_collect_value, "p", dvb_player_thread_value_channel_elements_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBPlayerThreadChannelElementsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_player_thread_channel_elements_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBPlayerThreadChannelElements), 0, (GInstanceInitFunc) dvb_player_thread_channel_elements_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_player_thread_channel_elements_type_id; dvb_player_thread_channel_elements_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBPlayerThreadChannelElements", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_player_thread_channel_elements_type_id__volatile, dvb_player_thread_channel_elements_type_id); } - return dvb_player_thread_channel_elements_type_id; + return dvb_player_thread_channel_elements_type_id__volatile; } @@ -1214,7 +1517,10 @@ 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)); - g_signal_new ("eit_structure", DVB_TYPE_PLAYER_THREAD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE); + /** + * 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); } @@ -1242,13 +1548,24 @@ } +/** + * 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. + * + * The class is able to reuse channels that are already watched + * and forward EPG data to #EPGScanner. + */ GType dvb_player_thread_get_type (void) { - static GType dvb_player_thread_type_id = 0; - if (dvb_player_thread_type_id == 0) { + static volatile gsize dvb_player_thread_type_id__volatile = 0; + if (g_once_init_enter (&dvb_player_thread_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBPlayerThreadClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_player_thread_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBPlayerThread), 0, (GInstanceInitFunc) dvb_player_thread_instance_init, NULL }; + GType dvb_player_thread_type_id; dvb_player_thread_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBPlayerThread", &g_define_type_info, 0); + g_once_init_leave (&dvb_player_thread_type_id__volatile, dvb_player_thread_type_id); } - return dvb_player_thread_type_id; + return dvb_player_thread_type_id__volatile; } @@ -1304,32 +1621,57 @@ } +/** + * Stop all currently active players + */ void dvb_channel_factory_destroy (DVBChannelFactory* self) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_active_players); { + g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _active_player_it; - _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - while (TRUE) { - DVBPlayerThread* active_player; - if (!gee_iterator_next (_active_player_it)) { - break; - } - active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); - dvb_player_thread_destroy (active_player, FALSE); - _g_object_unref0 (active_player); + { + GeeIterator* _active_player_it; + _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); + while (TRUE) { + DVBPlayerThread* active_player; + if (!gee_iterator_next (_active_player_it)) { + break; + } + active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); + dvb_player_thread_destroy (active_player, FALSE); + _g_object_unref0 (active_player); + } + _g_object_unref0 (_active_player_it); } - _g_object_unref0 (_active_player_it); + gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->active_players); + } + __finally28: + { + 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_); + return; } - gee_abstract_collection_clear ((GeeAbstractCollection*) self->priv->active_players); } - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); } +/** + * @channel: channel to watch + * @sink_element: The element the src pad should be linked with + * @force: Whether to stop a player when there's currently no free device + * @notify_func: The given function is called when watching the channel + * is aborted because a recording on a different transport streams is + * about to start + * @returns: The #PlayerThread used to watch @channel + * + * Watch @channel and use @sink_element as sink element + */ static char* bool_to_string (gboolean self) { - char* result; + char* result = NULL; if (self) { result = g_strdup ("true"); return result; @@ -1341,67 +1683,77 @@ DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target) { - DVBPlayerThread* result; + DVBPlayerThread* result = NULL; gboolean create_new; DVBPlayerThread* player; DVBDevice* free_device; char* _tmp1_; GstElement* _tmp6_; + 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); - g_debug ("ChannelFactory.vala:551: Watching channel %s (%u)", dvb_channel_get_Name (channel), dvb_channel_get_Sid (channel)); + g_debug ("ChannelFactory.vala:563: Watching channel %s (%u)", dvb_channel_get_Name (channel), dvb_channel_get_Sid (channel)); create_new = TRUE; player = NULL; free_device = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_active_players); { + g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _active_player_it; - _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - while (TRUE) { - DVBPlayerThread* active_player; - if (!gee_iterator_next (_active_player_it)) { - break; - } - active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); - { - GeeIterator* _other_channel_it; - _other_channel_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) dvb_player_thread_get_active_channels (active_player)); - while (TRUE) { - DVBChannel* other_channel; - if (!gee_iterator_next (_other_channel_it)) { - break; - } - other_channel = (DVBChannel*) gee_iterator_get (_other_channel_it); - if (dvb_channel_on_same_transport_stream (channel, other_channel)) { - DVBPlayerThread* _tmp0_; - create_new = FALSE; - player = (_tmp0_ = _g_object_ref0 (active_player), _g_object_unref0 (player), _tmp0_); + { + GeeIterator* _active_player_it; + _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); + while (TRUE) { + DVBPlayerThread* active_player; + if (!gee_iterator_next (_active_player_it)) { + break; + } + active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); + { + GeeIterator* _other_channel_it; + _other_channel_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) dvb_player_thread_get_active_channels (active_player)); + while (TRUE) { + DVBChannel* other_channel; + if (!gee_iterator_next (_other_channel_it)) { + break; + } + other_channel = (DVBChannel*) gee_iterator_get (_other_channel_it); + if (dvb_channel_on_same_transport_stream (channel, other_channel)) { + DVBPlayerThread* _tmp0_; + create_new = FALSE; + player = (_tmp0_ = _g_object_ref0 (active_player), _g_object_unref0 (player), _tmp0_); + _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); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (free_device); + _g_object_unref0 (player); + _gst_object_unref0 (sink_element); + 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 (&self->priv->__lock_active_players); - g_debug ("ChannelFactory.vala:568: Creating new PlayerThread: %s", _tmp1_ = bool_to_string (create_new)); + g_debug ("ChannelFactory.vala:580: Creating new PlayerThread: %s", _tmp1_ = bool_to_string (create_new)); _g_free0 (_tmp1_); if (create_new) { - DVBEPGScanner* epgscanner; DVBDevice* _tmp2_; gboolean _tmp3_ = FALSE; DVBPlayerThread* _tmp5_; - epgscanner = _g_object_ref0 (dvb_device_group_get_epgscanner (self->priv->_device_group)); - if (epgscanner != NULL) { - dvb_epg_scanner_stop (epgscanner); - } + dvb_device_group_stop_epg_scanner (self->priv->_device_group); free_device = (_tmp2_ = dvb_device_group_get_next_free_device (self->priv->_device_group), _g_object_unref0 (free_device), _tmp2_); if (free_device == NULL) { _tmp3_ = force; @@ -1410,51 +1762,75 @@ } if (_tmp3_) { DVBDevice* _tmp4_; - g_static_rec_mutex_lock (&self->priv->__lock_active_players); { + g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _active_player_it; - _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - while (TRUE) { - DVBPlayerThread* active_player; - if (!gee_iterator_next (_active_player_it)) { - break; - } - active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); - if (!dvb_player_thread_get_forced (active_player)) { - dvb_player_thread_destroy (active_player, TRUE); + { + GeeIterator* _active_player_it; + _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); + while (TRUE) { + DVBPlayerThread* active_player; + if (!gee_iterator_next (_active_player_it)) { + break; + } + active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); + if (!dvb_player_thread_get_forced (active_player)) { + dvb_player_thread_destroy (active_player, TRUE); + _g_object_unref0 (active_player); + break; + } else { + g_critical ("ChannelFactory.vala:594: No active players that are not forced"); + } _g_object_unref0 (active_player); - break; - } else { - g_critical ("ChannelFactory.vala:583: 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); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (free_device); + _g_object_unref0 (player); + _gst_object_unref0 (sink_element); + 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 (&self->priv->__lock_active_players); free_device = (_tmp4_ = dvb_device_group_get_next_free_device (self->priv->_device_group), _g_object_unref0 (free_device), _tmp4_); } if (free_device == NULL) { - g_message ("ChannelFactory.vala:590: All devices are busy"); + g_message ("ChannelFactory.vala:601: All devices are busy"); result = NULL; - _g_object_unref0 (epgscanner); - _g_object_unref0 (player); _g_object_unref0 (free_device); + _g_object_unref0 (player); _gst_object_unref0 (sink_element); return result; } player = (_tmp5_ = dvb_channel_factory_create_player (self, free_device), _g_object_unref0 (player), _tmp5_); - _g_object_unref0 (epgscanner); } _tmp6_ = dvb_player_thread_get_element (player, channel, _gst_object_ref0 (sink_element), force, notify_func, notify_func_target); _gst_object_unref0 (_tmp6_); - g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->active_players, player); + g_static_rec_mutex_lock (&self->priv->__lock_active_players); + { + gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->active_players, player); + } + __finally31: + { + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (free_device); + _g_object_unref0 (player); + _gst_object_unref0 (sink_element); + 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 (&self->priv->__lock_active_players); result = player; _g_object_unref0 (free_device); _gst_object_unref0 (sink_element); @@ -1462,65 +1838,80 @@ } +/** + * @returns: TRUE on success + * + * Stop watching @channel + */ gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink) { - gboolean result; + gboolean result = FALSE; 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); - g_debug ("ChannelFactory.vala:611: Stopping channel %s (%u)", dvb_channel_get_Name (channel), dvb_channel_get_Sid (channel)); + g_debug ("ChannelFactory.vala:622: Stopping channel %s (%u)", dvb_channel_get_Name (channel), dvb_channel_get_Sid (channel)); success = FALSE; player = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - gboolean _tmp1_ = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_active_players); { - GeeIterator* _active_player_it; - _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); - while (TRUE) { - DVBPlayerThread* active_player; - if (!gee_iterator_next (_active_player_it)) { - break; - } - active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); - if (gee_abstract_collection_contains ((GeeAbstractCollection*) dvb_player_thread_get_active_channels (active_player), channel)) { - DVBPlayerThread* _tmp0_; - success = dvb_player_thread_remove_channel (active_player, channel, sink); - player = (_tmp0_ = _g_object_ref0 (active_player), _g_object_unref0 (player), _tmp0_); + gboolean _tmp1_ = FALSE; + { + GeeIterator* _active_player_it; + _active_player_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->active_players); + while (TRUE) { + DVBPlayerThread* active_player; + if (!gee_iterator_next (_active_player_it)) { + break; + } + active_player = (DVBPlayerThread*) gee_iterator_get (_active_player_it); + if (gee_abstract_collection_contains ((GeeAbstractCollection*) dvb_player_thread_get_active_channels (active_player), channel)) { + DVBPlayerThread* _tmp0_; + success = dvb_player_thread_remove_channel (active_player, channel, sink); + player = (_tmp0_ = _g_object_ref0 (active_player), _g_object_unref0 (player), _tmp0_); + _g_object_unref0 (active_player); + break; + } _g_object_unref0 (active_player); - break; } - _g_object_unref0 (active_player); + _g_object_unref0 (_active_player_it); + } + if (success) { + _tmp1_ = gee_collection_get_size ((GeeCollection*) dvb_player_thread_get_active_channels (player)) == 0; + } else { + _tmp1_ = FALSE; + } + if (_tmp1_) { + gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->active_players, player); + } + if (gee_collection_get_size ((GeeCollection*) self->priv->active_players) == 0) { + dvb_device_group_start_epg_scanner (self->priv->_device_group); } - _g_object_unref0 (_active_player_it); - } - if (success) { - _tmp1_ = gee_collection_get_size ((GeeCollection*) dvb_player_thread_get_active_channels (player)) == 0; - } else { - _tmp1_ = FALSE; } - if (_tmp1_) { - gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->active_players, player); + __finally32: + { + g_static_rec_mutex_unlock (&self->priv->__lock_active_players); } - if (gee_collection_get_size ((GeeCollection*) self->priv->active_players) == 0) { - DVBEPGScanner* epgscanner; - epgscanner = _g_object_ref0 (dvb_device_group_get_epgscanner (self->priv->_device_group)); - if (epgscanner != NULL) { - dvb_epg_scanner_start (epgscanner); - } - _g_object_unref0 (epgscanner); + 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); + g_clear_error (&_inner_error_); + return FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_active_players); result = success; _g_object_unref0 (player); return result; } +/** + * @returns: a new #PlayerThread instance for @device + */ static DVBPlayerThread* dvb_channel_factory_real_create_player (DVBChannelFactory* self, DVBDevice* device) { - DVBPlayerThread* result; + DVBPlayerThread* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (device != NULL, NULL); result = dvb_player_thread_new (device, dvb_device_group_get_epgscanner (self->priv->_device_group)); @@ -1574,13 +1965,18 @@ } +/** + * This class handles watching channels for a single #DeviceGroup + */ GType dvb_channel_factory_get_type (void) { - static GType dvb_channel_factory_type_id = 0; - if (dvb_channel_factory_type_id == 0) { + static volatile gsize dvb_channel_factory_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_factory_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBChannelFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelFactory), 0, (GInstanceInitFunc) dvb_channel_factory_instance_init, NULL }; + GType dvb_channel_factory_type_id; dvb_channel_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelFactory", &g_define_type_info, 0); + g_once_init_leave (&dvb_channel_factory_type_id__volatile, dvb_channel_factory_type_id); } - return dvb_channel_factory_type_id; + return dvb_channel_factory_type_id__volatile; } @@ -1654,4 +2050,23 @@ +static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, gpointer arg_1, gpointer data2); + register GMarshalFunc_VOID__BOXED callback; + register GCClosure * cc; + register gpointer data1, data2; + cc = (GCClosure *) closure; + g_return_if_fail (n_param_values == 2); + 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__BOXED) (marshal_data ? marshal_data : cc->callback); + callback (data1, g_value_get_boxed (param_values + 1), data2); +} + + diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelFactory.vala gnome-dvb-daemon-0.1.21/src/ChannelFactory.vala --- gnome-dvb-daemon-0.1.16/src/ChannelFactory.vala 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelFactory.vala 2010-08-09 13:34:06.000000000 +0000 @@ -119,14 +119,14 @@ Gst.Bus bus = this.pipeline.get_bus(); bus.add_signal_watch(); - bus.message += this.bus_watch_func; + bus.message.connect (this.bus_watch_func); this.dvbbasebin = ElementFactory.make ("dvbbasebin", null); if (this.dvbbasebin == null) { critical ("Could not create dvbbasebin element"); return null; } - this.dvbbasebin.pad_added += this.on_dvbbasebin_pad_added; + this.dvbbasebin.pad_added.connect (this.on_dvbbasebin_pad_added); channel.setup_dvb_source (this.dvbbasebin); @@ -201,24 +201,24 @@ create_channel = false; } } - } - if (create_channel) { - ChannelElements celems = new ChannelElements (); - celems.sid = channel_sid; - celems.sinks = new ArrayList (); - celems.sinks.add (bin); - celems.tee = tee; - celems.forced = forced; - celems.notify_func = notify_func; + if (create_channel) { + ChannelElements celems = new ChannelElements (); + celems.sid = channel_sid; + celems.sinks = new ArrayList (); + celems.sinks.add (bin); + celems.tee = tee; + celems.forced = forced; + celems.notify_func = notify_func; - lock (this.elements_map) { - this.elements_map.set (channel_sid, celems); + lock (this.elements_map) { + this.elements_map.set (channel_sid, celems); + } + this.active_channels.add (channel); } - this.active_channels.add (channel); + + return bin; } - - return bin; } private Gst.Element add_sink_bin (Gst.Element sink_element) { @@ -263,8 +263,8 @@ ChannelElements? celems = this.elements_map.get (sid); if (celems != null) { foreach (Gst.Element sink_bin in celems.sinks) { - Gst.Iterator it = ((Gst.Bin)sink_bin).iterate_elements (); - Gst.Element element = (Gst.Element) it.find_custom (find_element, sink); + Gst.Iterator it = ((Gst.Bin)sink_bin).iterate_elements (); + Gst.Element element = it.find_custom (find_element, sink); if (element != null) { result = sink_bin; break; @@ -274,7 +274,10 @@ warning ("Could not find any sinks of channel %u", sid); } } - + if (result == null) + debug ("Found NO sink"); + else + debug ("Found sink"); return result; } @@ -330,13 +333,8 @@ dvbbasebin.set ("program-numbers", new_programs.str); - Gst.StateChangeReturn ret = - this.pipeline.set_state (State.PLAYING); - if (ret == Gst.StateChangeReturn.FAILURE) { - critical ("Failed setting pipeline to playing"); - this.destroy (); + if (!this.set_playing_or_destroy ()) return false; - } this.active_channels.remove (channel); } @@ -349,7 +347,7 @@ celements.tee.set_state (State.NULL); ((Bin)this.pipeline).remove (celements.tee); lock (this.elements_map) { - this.elements_map.remove (channel_sid); + this.elements_map.unset (channel_sid); } } @@ -362,12 +360,25 @@ // we still have sinks left // (others are still watching this channel) this.remove_sink_bin (channel_sid, sink); + + if (!this.set_playing_or_destroy ()) + return false; } } } return true; } + + 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"); + 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", @@ -460,7 +471,7 @@ debug ("SID is '%u'", sid); // Check if we're interested in the pad lock (this.elements_map) { - if (this.elements_map.contains (sid)) { + 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); @@ -486,20 +497,21 @@ * Forward EIT structure */ private void bus_watch_func (Gst.Bus bus, Gst.Message message) { + Gst.Structure structure = message.get_structure (); switch (message.type) { case Gst.MessageType.ELEMENT: - string structure_name = message.structure.get_name(); + string structure_name = structure.get_name (); if (structure_name == "eit") { if (this.epgscanner != null) - this.epgscanner.on_eit_structure (message.structure); - this.eit_structure (message.structure); + this.epgscanner.on_eit_structure (structure); + this.eit_structure (structure); } break; case Gst.MessageType.WARNING: - warning ("%s", message.structure.to_string ()); + warning ("%s", structure.to_string ()); break; case Gst.MessageType.ERROR: - critical ("%s", message.structure.to_string ()); + critical ("%s", structure.to_string ()); break; default: break; @@ -568,8 +580,7 @@ debug ("Creating new PlayerThread: %s", create_new.to_string ()); if (create_new) { // Stop epgscanner before starting recording - EPGScanner? epgscanner = this.device_group.epgscanner; - if (epgscanner != null) epgscanner.stop (); + this.device_group.stop_epg_scanner (); free_device = this.device_group.get_next_free_device (); if (free_device == null && force) { @@ -626,8 +637,7 @@ if (this.active_players.size == 0) { // Start EPG scanner again - EPGScanner? epgscanner = this.device_group.epgscanner; - if (epgscanner != null) epgscanner.start (); + this.device_group.start_epg_scanner (); } } diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelGroup.c gnome-dvb-daemon-0.1.21/src/ChannelGroup.c --- gnome-dvb-daemon-0.1.16/src/ChannelGroup.c 2009-10-01 10:38:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelGroup.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelGroup.c generated by valac, the Vala compiler +/* ChannelGroup.c generated by valac 0.9.7, the Vala compiler * generated from ChannelGroup.vala, do not modify */ /* @@ -55,17 +55,17 @@ static gpointer dvb_channel_group_parent_class = NULL; -GType dvb_channel_group_get_type (void); +GType dvb_channel_group_get_type (void) G_GNUC_CONST; #define DVB_CHANNEL_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_GROUP, DVBChannelGroupPrivate)) enum { DVB_CHANNEL_GROUP_DUMMY_PROPERTY, DVB_CHANNEL_GROUP_ID, DVB_CHANNEL_GROUP_NAME }; -void dvb_channel_group_set_id (DVBChannelGroup* self, gint value); -void dvb_channel_group_set_name (DVBChannelGroup* self, const char* value); DVBChannelGroup* dvb_channel_group_new (gint id, const char* name); DVBChannelGroup* dvb_channel_group_construct (GType object_type, gint id, const char* name); +void dvb_channel_group_set_id (DVBChannelGroup* self, gint value); +void dvb_channel_group_set_name (DVBChannelGroup* self, const char* value); gint dvb_channel_group_get_id (DVBChannelGroup* self); const char* dvb_channel_group_get_name (DVBChannelGroup* self); static void dvb_channel_group_finalize (GObject* obj); @@ -145,12 +145,14 @@ GType dvb_channel_group_get_type (void) { - static GType dvb_channel_group_type_id = 0; - if (dvb_channel_group_type_id == 0) { + static volatile gsize dvb_channel_group_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_group_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBChannelGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelGroup), 0, (GInstanceInitFunc) dvb_channel_group_instance_init, NULL }; + GType dvb_channel_group_type_id; dvb_channel_group_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelGroup", &g_define_type_info, 0); + g_once_init_leave (&dvb_channel_group_type_id__volatile, dvb_channel_group_type_id); } - return dvb_channel_group_type_id; + return dvb_channel_group_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelList.c gnome-dvb-daemon-0.1.21/src/ChannelList.c --- gnome-dvb-daemon-0.1.16/src/ChannelList.c 2010-03-17 19:35:05.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelList.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ChannelList.c generated by valac, the Vala compiler +/* ChannelList.c generated by valac 0.9.7, the Vala compiler * generated from ChannelList.vala, do not modify */ /* @@ -66,15 +66,15 @@ #define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) -#define DVB_TYPE_CHANNEL_LIST_READER (dvb_channel_list_reader_get_type ()) -#define DVB_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReader)) -#define DVB_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReaderClass)) -#define DVB_IS_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_LIST_READER)) -#define DVB_IS_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_LIST_READER)) -#define DVB_CHANNEL_LIST_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReaderClass)) +#define DVB_IO_TYPE_CHANNEL_LIST_READER (dvb_io_channel_list_reader_get_type ()) +#define DVB_IO_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReader)) +#define DVB_IO_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReaderClass)) +#define DVB_IO_IS_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER)) +#define DVB_IO_IS_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_CHANNEL_LIST_READER)) +#define DVB_IO_CHANNEL_LIST_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReaderClass)) -typedef struct _DVBChannelListReader DVBChannelListReader; -typedef struct _DVBChannelListReaderClass DVBChannelListReaderClass; +typedef struct _DVBioChannelListReader DVBioChannelListReader; +typedef struct _DVBioChannelListReaderClass DVBioChannelListReaderClass; #define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -199,6 +199,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -216,14 +217,15 @@ static GeeIterableIface* dvb_channel_list_gee_iterable_parent_iface = NULL; static DVBIDBusChannelListIface* dvb_channel_list_dvb_id_bus_channel_list_parent_iface = NULL; -GType dvb_channel_info_get_type (void); +DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); -GType dvb_channel_list_get_type (void); -GType dvb_channel_get_type (void); +GType dvb_id_bus_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_channel_get_type (void) G_GNUC_CONST; #define DVB_CHANNEL_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_LIST, DVBChannelListPrivate)) enum { DVB_CHANNEL_LIST_DUMMY_PROPERTY, @@ -235,50 +237,52 @@ 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); -guint dvb_channel_get_Sid (DVBChannel* self); void dvb_channel_list_add (DVBChannelList* self, DVBChannel* channel); +guint dvb_channel_get_Sid (DVBChannel* self); void dvb_channel_list_remove (DVBChannelList* self, guint sid); gboolean dvb_channel_list_contains (DVBChannelList* self, guint sid); void dvb_channel_list_clear (DVBChannelList* self); static GeeIterator* dvb_channel_list_real_iterator (GeeIterable* base); -GType dvb_adapter_type_get_type (void); -DVBChannelListReader* dvb_channel_list_reader_new (GFile* file, DVBAdapterType type, guint group_id); -DVBChannelListReader* dvb_channel_list_reader_construct (GType object_type, GFile* file, DVBAdapterType type, guint group_id); -GType dvb_channel_list_reader_get_type (void); -DVBChannelList* dvb_channel_list_reader_read (DVBChannelListReader* self, GError** error); -DVBChannelList* dvb_channel_list_restore_from_file (GFile* channelsfile, DVBAdapterType type, guint group_id, GError** error); -gint dvb_channel_list_get_size (DVBChannelList* self); +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; +void dvb_channel_list_load (DVBChannelList* self, DVBAdapterType type, GError** error); +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); +GType dvb_io_channel_list_reader_get_type (void) G_GNUC_CONST; +void dvb_io_channel_list_reader_read_into (DVBioChannelListReader* self, GError** error); static guint* dvb_channel_list_real_GetChannels (DVBIDBusChannelList* base, int* result_length1, GError** error); -guint dvb_channel_get_VideoPID (DVBChannel* self); +gint dvb_channel_list_get_size (DVBChannelList* self); static guint* dvb_channel_list_real_GetRadioChannels (DVBIDBusChannelList* base, int* result_length1, GError** error); -gboolean dvb_channel_is_radio (DVBChannel* self); +guint dvb_channel_get_VideoPID (DVBChannel* self); static guint* dvb_channel_list_real_GetTVChannels (DVBIDBusChannelList* base, int* result_length1, GError** error); -const char* dvb_channel_get_Name (DVBChannel* self); +gboolean dvb_channel_is_radio (DVBChannel* self); static gboolean dvb_channel_list_real_GetChannelName (DVBIDBusChannelList* base, guint channel_id, char** channel_name, GError** error); -const char* dvb_channel_get_Network (DVBChannel* self); +const char* dvb_channel_get_Name (DVBChannel* self); static gboolean dvb_channel_list_real_GetChannelNetwork (DVBIDBusChannelList* base, guint channel_id, char** network, GError** error); +const char* dvb_channel_get_Network (DVBChannel* self); static gboolean dvb_channel_list_real_IsRadioChannel (DVBIDBusChannelList* base, guint channel_id, gboolean* radio, GError** error); -char* dvb_channel_get_URL (DVBChannel* self); static gboolean dvb_channel_list_real_GetChannelURL (DVBIDBusChannelList* base, guint channel_id, char** url, GError** error); -static void _vala_DVBChannelInfo_array_free (DVBChannelInfo* array, gint array_length); +char* dvb_channel_get_URL (DVBChannel* self); static DVBChannelInfo* dvb_channel_list_real_GetChannelInfos (DVBIDBusChannelList* base, int* result_length1, GError** error); -GType dvb_device_group_get_type (void); +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); +GType dvb_device_group_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_device_get_type (void); -GType dvb_channel_group_get_type (void); -GType dvb_database_config_store_get_type (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); 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); -static gboolean dvb_channel_list_real_GetChannelsOfGroup (DVBIDBusChannelList* base, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, 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_AddChannelToGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error); -gboolean dvb_database_config_store_remove_channel_from_group (DVBdatabaseConfigStore* self, DVBChannel* channel, gint 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); +gboolean dvb_database_config_store_remove_channel_from_group (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error); GFile* dvb_channel_list_get_channels_file (DVBChannelList* self); static void dvb_channel_list_set_channels_file (DVBChannelList* self, GFile* value); void dvb_channel_list_set_GroupId (DVBChannelList* self, guint value); static GObject * dvb_channel_list_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); @@ -286,8 +290,6 @@ static void dvb_channel_list_finalize (GObject* obj); static void dvb_channel_list_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_channel_list_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -306,71 +308,127 @@ DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid) { - DVBChannel* result; + DVBChannel* result = NULL; DVBChannel* val; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); val = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - if (gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (sid))) { - DVBChannel* _tmp0_; - val = (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)), _g_object_unref0 (val), _tmp0_); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid))) { + DVBChannel* _tmp0_; + val = (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)), _g_object_unref0 (val), _tmp0_); + } + } + __finally33: + { + 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); + g_clear_error (&_inner_error_); + return NULL; } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); result = val; return result; } void dvb_channel_list_add (DVBChannelList* self, DVBChannel* channel) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - gee_abstract_map_set ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (dvb_channel_get_Sid (channel)), channel); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + gee_abstract_map_set ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (dvb_channel_get_Sid (channel)), channel); + } + __finally34: + { + 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_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); } void dvb_channel_list_remove (DVBChannelList* self, guint sid) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - gee_map_remove ((GeeMap*) self->channels, GUINT_TO_POINTER (sid), NULL); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + gee_abstract_map_unset ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid), NULL); + } + __finally35: + { + 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_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); } gboolean dvb_channel_list_contains (DVBChannelList* self, guint sid) { - gboolean result; + gboolean result = FALSE; gboolean val = FALSE; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - val = gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (sid)); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + val = gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (sid)); + } + __finally36: + { + 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_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); result = val; return result; } void dvb_channel_list_clear (DVBChannelList* self) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - gee_abstract_map_clear ((GeeAbstractMap*) self->channels); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + gee_abstract_map_clear ((GeeAbstractMap*) self->channels); + } + __finally37: + { + 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_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); } static GeeIterator* dvb_channel_list_real_iterator (GeeIterable* base) { DVBChannelList * self; - GeeIterator* result; + GeeIterator* result = NULL; GeeCollection* _tmp0_; GeeIterator* _tmp1_; self = (DVBChannelList*) base; @@ -379,103 +437,140 @@ } -DVBChannelList* dvb_channel_list_restore_from_file (GFile* channelsfile, DVBAdapterType type, guint group_id, GError** error) { - DVBChannelList* result; - GError * _inner_error_; - DVBChannelListReader* reader; - DVBChannelList* _tmp0_; - g_return_val_if_fail (channelsfile != NULL, NULL); - _inner_error_ = NULL; - reader = dvb_channel_list_reader_new (channelsfile, type, group_id); - _tmp0_ = dvb_channel_list_reader_read (reader, &_inner_error_); +void dvb_channel_list_load (DVBChannelList* self, DVBAdapterType type, GError** error) { + DVBioChannelListReader* reader; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + reader = dvb_io_channel_list_reader_new (self, type); + dvb_io_channel_list_reader_read_into (reader, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (reader); - return NULL; + return; } - result = _tmp0_; _g_object_unref0 (reader); - return result; } +/** + * @returns: List of channel IDs aka SIDs + */ static guint* dvb_channel_list_real_GetChannels (DVBIDBusChannelList* base, int* result_length1, GError** error) { DVBChannelList * self; - guint* result; - guint* _tmp1_; - gint ids_size; + guint* result = NULL; gint ids_length1; + gint _ids_size_; + guint* _tmp1_; gint _tmp0_; guint* ids; gint i; guint* _tmp4_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - ids = (_tmp1_ = g_new0 (guint, _tmp0_ = dvb_channel_list_get_size (self)), ids_length1 = _tmp0_, ids_size = ids_length1, _tmp1_); + ids = (_tmp1_ = g_new0 (guint, _tmp0_ = dvb_channel_list_get_size (self)), ids_length1 = _tmp0_, _ids_size_ = ids_length1, _tmp1_); i = 0; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { + g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _id_it; - _id_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint id; - if (!gee_iterator_next (_id_it)) { - break; + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _id_it; + _id_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint id; + if (!gee_iterator_next (_id_it)) { + break; + } + id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); + ids[i] = id; + i++; } - id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); - ids[i] = id; - i++; + _g_object_unref0 (_id_it); + } + } + __finally38: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + ids = (g_free (ids), NULL); + return NULL; + } else { + ids = (g_free (ids), 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_object_unref0 (_id_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); result = (_tmp4_ = ids, *result_length1 = ids_length1, _tmp4_); return result; ids = (g_free (ids), NULL); } +/** + * @returns: List of channel IDs aka SIDs of radio channels + */ static guint* dvb_channel_list_real_GetRadioChannels (DVBIDBusChannelList* base, int* result_length1, GError** error) { DVBChannelList * self; - guint* result; + guint* result = NULL; GSList* radio_channels; - guint* _tmp3_; - gint ids_size; gint ids_length1; + gint _ids_size_; + guint* _tmp3_; gint _tmp2_; guint* ids; guint* _tmp5_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; radio_channels = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { + g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _id_it; - _id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint id; - DVBChannel* chan; - if (!gee_iterator_next (_id_it)) { - break; + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _id_it; + _id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint id; + DVBChannel* chan; + if (!gee_iterator_next (_id_it)) { + break; + } + id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); + chan = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); + if (dvb_channel_get_VideoPID (chan) == 0) { + radio_channels = g_slist_prepend (radio_channels, GUINT_TO_POINTER (id)); + } + _g_object_unref0 (chan); } - id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); - chan = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - if (dvb_channel_get_VideoPID (chan) == 0) { - radio_channels = g_slist_prepend (radio_channels, GUINT_TO_POINTER (id)); - } - _g_object_unref0 (chan); + _g_object_unref0 (_id_it); + } + } + __finally39: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_slist_free0 (radio_channels); + return NULL; + } else { + _g_slist_free0 (radio_channels); + 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_object_unref0 (_id_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); radio_channels = g_slist_reverse (radio_channels); - ids = (_tmp3_ = g_new0 (guint, _tmp2_ = g_slist_length (radio_channels)), ids_length1 = _tmp2_, ids_size = ids_length1, _tmp3_); + ids = (_tmp3_ = g_new0 (guint, _tmp2_ = g_slist_length (radio_channels)), ids_length1 = _tmp2_, _ids_size_ = ids_length1, _tmp3_); { gint i; i = 0; @@ -497,49 +592,70 @@ result = (_tmp5_ = ids, *result_length1 = ids_length1, _tmp5_); _g_slist_free0 (radio_channels); return result; - _g_slist_free0 (radio_channels); ids = (g_free (ids), NULL); + _g_slist_free0 (radio_channels); } +/** + * @returns: List of channel IDs aka SIDs of TV channels + */ static guint* dvb_channel_list_real_GetTVChannels (DVBIDBusChannelList* base, int* result_length1, GError** error) { DVBChannelList * self; - guint* result; + guint* result = NULL; GSList* video_channels; - guint* _tmp3_; - gint ids_size; gint ids_length1; + gint _ids_size_; + guint* _tmp3_; gint _tmp2_; guint* ids; guint* _tmp5_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; video_channels = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { + g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _id_it; - _id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint id; - DVBChannel* chan; - if (!gee_iterator_next (_id_it)) { - break; - } - id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); - chan = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - if (!dvb_channel_is_radio (chan)) { - video_channels = g_slist_prepend (video_channels, GUINT_TO_POINTER (id)); + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _id_it; + _id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint id; + DVBChannel* chan; + if (!gee_iterator_next (_id_it)) { + break; + } + id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); + chan = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); + if (!dvb_channel_is_radio (chan)) { + video_channels = g_slist_prepend (video_channels, GUINT_TO_POINTER (id)); + } + _g_object_unref0 (chan); } - _g_object_unref0 (chan); + _g_object_unref0 (_id_it); + } + } + __finally40: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_slist_free0 (video_channels); + return NULL; + } else { + _g_slist_free0 (video_channels); + 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_object_unref0 (_id_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); video_channels = g_slist_reverse (video_channels); - ids = (_tmp3_ = g_new0 (guint, _tmp2_ = g_slist_length (video_channels)), ids_length1 = _tmp2_, ids_size = ids_length1, _tmp3_); + ids = (_tmp3_ = g_new0 (guint, _tmp2_ = g_slist_length (video_channels)), ids_length1 = _tmp2_, _ids_size_ = ids_length1, _tmp3_); { gint i; i = 0; @@ -561,44 +677,68 @@ result = (_tmp5_ = ids, *result_length1 = ids_length1, _tmp5_); _g_slist_free0 (video_channels); return result; - _g_slist_free0 (video_channels); ids = (g_free (ids), NULL); + _g_slist_free0 (video_channels); } +/** + * @channel_id: ID of channel + * @channel_name: Name of channel if channel with id exists + * otherwise an empty string + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_GetChannelName (DVBIDBusChannelList* base, guint channel_id, char** channel_name, GError** error) { DVBChannelList * self; - gboolean result; + gboolean result = FALSE; gboolean ret; char* val; char* _tmp4_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; if (channel_name != NULL) { *channel_name = NULL; } ret = FALSE; val = g_strdup (""); - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - if (gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (channel_id))) { - DVBChannel* _tmp0_; - char* _tmp1_; - char* name; - const char* _tmp2_; - char* _tmp3_; - name = (_tmp1_ = g_strdup (dvb_channel_get_Name (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)))), _g_object_unref0 (_tmp0_), _tmp1_); - _tmp2_ = NULL; - if (name == NULL) { - _tmp2_ = ""; + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))) { + DVBChannel* _tmp0_; + char* _tmp1_; + char* name; + const char* _tmp2_; + char* _tmp3_; + name = (_tmp1_ = g_strdup (dvb_channel_get_Name (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)))), _g_object_unref0 (_tmp0_), _tmp1_); + _tmp2_ = NULL; + if (name == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = name; + } + val = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (val), _tmp3_); + ret = TRUE; + _g_free0 (name); + } + } + __finally41: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (val); + return FALSE; } else { - _tmp2_ = name; + _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); + g_clear_error (&_inner_error_); + return FALSE; } - val = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (val), _tmp3_); - ret = TRUE; - _g_free0 (name); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); *channel_name = (_tmp4_ = g_strdup (val), _g_free0 (*channel_name), _tmp4_); result = ret; _g_free0 (val); @@ -606,39 +746,64 @@ } +/** + * @channel_id: ID of channel + * @network: Name of network the channel belongs to + * if the channel with id exists, otherwise an empty + * string + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_GetChannelNetwork (DVBIDBusChannelList* base, guint channel_id, char** network, GError** error) { DVBChannelList * self; - gboolean result; + gboolean result = FALSE; char* val; gboolean ret; char* _tmp4_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; if (network != NULL) { *network = NULL; } val = g_strdup (""); ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - if (gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (channel_id))) { - DVBChannel* _tmp0_; - char* _tmp1_; - char* tmp; - const char* _tmp2_; - char* _tmp3_; - tmp = (_tmp1_ = g_strdup (dvb_channel_get_Network (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)))), _g_object_unref0 (_tmp0_), _tmp1_); - _tmp2_ = NULL; - if (tmp == NULL) { - _tmp2_ = ""; + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))) { + DVBChannel* _tmp0_; + char* _tmp1_; + char* tmp; + const char* _tmp2_; + char* _tmp3_; + tmp = (_tmp1_ = g_strdup (dvb_channel_get_Network (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)))), _g_object_unref0 (_tmp0_), _tmp1_); + _tmp2_ = NULL; + if (tmp == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = tmp; + } + val = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (val), _tmp3_); + ret = TRUE; + _g_free0 (tmp); + } + } + __finally42: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (val); + return FALSE; } else { - _tmp2_ = tmp; + _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); + g_clear_error (&_inner_error_); + return FALSE; } - val = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (val), _tmp3_); - ret = TRUE; - _g_free0 (tmp); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); *network = (_tmp4_ = g_strdup (val), _g_free0 (*network), _tmp4_); result = ret; _g_free0 (val); @@ -646,47 +811,91 @@ } +/** + * @channel_id: ID of channel + * @radio: Whether the channel is a radio channel or not + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_IsRadioChannel (DVBIDBusChannelList* base, guint channel_id, gboolean* radio, GError** error) { DVBChannelList * self; - gboolean result; + gboolean result = FALSE; gboolean val; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; val = FALSE; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - if (gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (channel_id))) { - DVBChannel* _tmp0_; - val = dvb_channel_is_radio (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))); - _g_object_unref0 (_tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))) { + DVBChannel* _tmp0_; + val = dvb_channel_is_radio (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } + } + __finally43: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); *radio = val; result = ret; return result; } +/** + * @channel_id: ID of channel + * @url: URL to watch the channel + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_GetChannelURL (DVBIDBusChannelList* base, guint channel_id, char** url, GError** error) { DVBChannelList * self; - gboolean result; + gboolean result = FALSE; DVBChannel* channel; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; if (url != NULL) { *url = NULL; } channel = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { - if (gee_map_contains ((GeeMap*) self->channels, GUINT_TO_POINTER (channel_id))) { - DVBChannel* _tmp0_; - channel = (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)), _g_object_unref0 (channel), _tmp0_); + g_static_rec_mutex_lock (&self->priv->__lock_channels); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id))) { + DVBChannel* _tmp0_; + channel = (_tmp0_ = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (channel_id)), _g_object_unref0 (channel), _tmp0_); + } + } + __finally44: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (channel); + return FALSE; + } else { + _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); + g_clear_error (&_inner_error_); + return FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); if (channel == NULL) { char* _tmp1_; *url = (_tmp1_ = g_strdup (""), _g_free0 (*url), _tmp1_); @@ -717,75 +926,90 @@ static DVBChannelInfo* dvb_channel_list_real_GetChannelInfos (DVBIDBusChannelList* base, int* result_length1, GError** error) { DVBChannelList * self; - DVBChannelInfo* result; - DVBChannelInfo* _tmp1_; - gint channels_size; + DVBChannelInfo* result = NULL; gint channels_length1; + gint _channels_size_; + DVBChannelInfo* _tmp1_; gint _tmp0_; DVBChannelInfo* channels; gint i; - DVBChannelInfo* _tmp8_; + DVBChannelInfo* _tmp7_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - channels = (_tmp1_ = g_new0 (DVBChannelInfo, _tmp0_ = gee_map_get_size ((GeeMap*) self->channels)), channels_length1 = _tmp0_, channels_size = channels_length1, _tmp1_); + channels = (_tmp1_ = g_new0 (DVBChannelInfo, _tmp0_ = gee_map_get_size ((GeeMap*) self->channels)), channels_length1 = _tmp0_, _channels_size_ = channels_length1, _tmp1_); i = 0; - g_static_rec_mutex_lock (&self->priv->__lock_channels); { + g_static_rec_mutex_lock (&self->priv->__lock_channels); { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _id_it; - _id_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint id; - DVBChannel* channel; - DVBChannelInfo _tmp4_ = {0}; - DVBChannelInfo chan_info; - char* _tmp5_; - DVBChannelInfo _tmp7_; - DVBChannelInfo _tmp6_ = {0}; - if (!gee_iterator_next (_id_it)) { - break; + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _id_it; + _id_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->channels))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint id; + DVBChannel* channel; + DVBChannelInfo chan_info = {0}; + char* _tmp4_; + DVBChannelInfo _tmp5_ = {0}; + DVBChannelInfo _tmp6_; + if (!gee_iterator_next (_id_it)) { + break; + } + id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); + channel = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); + memset (&chan_info, 0, sizeof (DVBChannelInfo)); + chan_info.id = id; + chan_info.name = (_tmp4_ = g_strdup (dvb_channel_get_Name (channel)), _g_free0 (chan_info.name), _tmp4_); + chan_info.is_radio = dvb_channel_is_radio (channel); + channels[i] = (_tmp6_ = (dvb_channel_info_copy (&chan_info, &_tmp5_), _tmp5_), dvb_channel_info_destroy (&channels[i]), _tmp6_); + i++; + dvb_channel_info_destroy (&chan_info); + _g_object_unref0 (channel); } - id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); - channel = (DVBChannel*) gee_abstract_map_get ((GeeAbstractMap*) self->channels, GUINT_TO_POINTER (id)); - chan_info = (memset (&_tmp4_, 0, sizeof (DVBChannelInfo)), _tmp4_); - chan_info.id = id; - chan_info.name = (_tmp5_ = g_strdup (dvb_channel_get_Name (channel)), _g_free0 (chan_info.name), _tmp5_); - chan_info.is_radio = dvb_channel_is_radio (channel); - channels[i] = (_tmp7_ = (dvb_channel_info_copy (&chan_info, &_tmp6_), _tmp6_), dvb_channel_info_destroy (&channels[i]), _tmp7_); - i++; - _g_object_unref0 (channel); - dvb_channel_info_destroy (&chan_info); + _g_object_unref0 (_id_it); + } + } + __finally45: + { + g_static_rec_mutex_unlock (&self->priv->__lock_channels); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + channels = (_vala_DVBChannelInfo_array_free (channels, channels_length1), NULL); + return NULL; + } else { + channels = (_vala_DVBChannelInfo_array_free (channels, channels_length1), 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_object_unref0 (_id_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_channels); - result = (_tmp8_ = channels, *result_length1 = channels_length1, _tmp8_); + result = (_tmp7_ = channels, *result_length1 = channels_length1, _tmp7_); return result; channels = (_vala_DVBChannelInfo_array_free (channels, channels_length1), NULL); } -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - +/** + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_GetChannelsOfGroup (DVBIDBusChannelList* base, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error) { DVBChannelList * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseConfigStore* config; GeeList* channels; - guint* _tmp3_; gint _tmp2_; + guint* _tmp3_; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; if (channel_ids != NULL) { *channel_ids = NULL; } - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); channels = NULL; { GeeList* _tmp0_; @@ -793,41 +1017,41 @@ _tmp0_ = dvb_database_config_store_get_channels_of_group (config, self->priv->_GroupId, channel_group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch11_dvb_database_sql_error; + goto __catch46_dvb_database_sql_error; } - _g_object_unref0 (config); _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 = (_tmp1_ = _tmp0_, _g_object_unref0 (channels), _tmp1_); } - goto __finally11; - __catch11_dvb_database_sql_error: + goto __finally46; + __catch46_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("ChannelList.vala:276: %s", e->message); + g_critical ("ChannelList.vala:275: %s", e->message); result = FALSE; _g_error_free0 (e); - _g_object_unref0 (config); _g_object_unref0 (channels); + _g_object_unref0 (config); return result; } } - __finally11: + __finally46: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (config); _g_object_unref0 (channels); + _g_object_unref0 (config); return FALSE; } else { - _g_object_unref0 (config); _g_object_unref0 (channels); + _g_object_unref0 (config); 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; @@ -853,27 +1077,31 @@ } } result = TRUE; - _g_object_unref0 (config); _g_object_unref0 (channels); + _g_object_unref0 (config); return result; } +/** + * @channel_id: ID of channel + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_AddChannelToGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error) { DVBChannelList * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseConfigStore* config; DVBChannel* chan; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); chan = dvb_channel_list_get_channel (self, channel_id); if (chan == NULL) { result = FALSE; - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return result; } { @@ -881,65 +1109,69 @@ _tmp0_ = dvb_database_config_store_add_channel_to_group (config, chan, channel_group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch12_dvb_database_sql_error; + goto __catch47_dvb_database_sql_error; } - _g_object_unref0 (config); _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 = _tmp0_; } - goto __finally12; - __catch12_dvb_database_sql_error: + goto __finally47; + __catch47_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("ChannelList.vala:305: %s", e->message); + g_critical ("ChannelList.vala:304: %s", e->message); ret = FALSE; _g_error_free0 (e); } } - __finally12: + __finally47: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return FALSE; } else { - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); 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 = ret; - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return result; } +/** + * @channel_id: ID of channel + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ static gboolean dvb_channel_list_real_RemoveChannelFromGroup (DVBIDBusChannelList* base, guint channel_id, gint channel_group_id, GError** error) { DVBChannelList * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseConfigStore* config; DVBChannel* chan; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBChannelList*) base; - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); chan = dvb_channel_list_get_channel (self, channel_id); if (chan == NULL) { result = FALSE; - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return result; } { @@ -947,46 +1179,46 @@ _tmp0_ = dvb_database_config_store_remove_channel_from_group (config, chan, channel_group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch13_dvb_database_sql_error; + goto __catch48_dvb_database_sql_error; } - _g_object_unref0 (config); _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 = _tmp0_; } - goto __finally13; - __catch13_dvb_database_sql_error: + goto __finally48; + __catch48_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("ChannelList.vala:328: %s", e->message); + g_critical ("ChannelList.vala:327: %s", e->message); ret = FALSE; _g_error_free0 (e); } } - __finally13: + __finally48: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return FALSE; } else { - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); 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 = ret; - _g_object_unref0 (config); _g_object_unref0 (chan); + _g_object_unref0 (config); return result; } @@ -999,6 +1231,11 @@ } +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + static void dvb_channel_list_set_channels_file (DVBChannelList* self, GFile* value) { GFile* _tmp0_; g_return_if_fail (self != NULL); @@ -1054,6 +1291,25 @@ } +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_) { } @@ -1167,16 +1423,18 @@ GType dvb_channel_list_get_type (void) { - static GType dvb_channel_list_type_id = 0; - if (dvb_channel_list_type_id == 0) { + static volatile gsize dvb_channel_list_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_list_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBChannelListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelList), 0, (GInstanceInitFunc) dvb_channel_list_instance_init, NULL }; static const GInterfaceInfo gee_iterable_info = { (GInterfaceInitFunc) dvb_channel_list_gee_iterable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; static const GInterfaceInfo dvb_id_bus_channel_list_info = { (GInterfaceInitFunc) dvb_channel_list_dvb_id_bus_channel_list_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_channel_list_type_id; dvb_channel_list_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelList", &g_define_type_info, 0); g_type_add_interface_static (dvb_channel_list_type_id, GEE_TYPE_ITERABLE, &gee_iterable_info); g_type_add_interface_static (dvb_channel_list_type_id, DVB_TYPE_ID_BUS_CHANNEL_LIST, &dvb_id_bus_channel_list_info); + g_once_init_leave (&dvb_channel_list_type_id__volatile, dvb_channel_list_type_id); } - return dvb_channel_list_type_id; + return dvb_channel_list_type_id__volatile; } @@ -1220,24 +1478,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelListReader.c gnome-dvb-daemon-0.1.21/src/ChannelListReader.c --- gnome-dvb-daemon-0.1.16/src/ChannelListReader.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelListReader.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,882 +0,0 @@ -/* ChannelListReader.c generated by valac, the Vala compiler - * generated from ChannelListReader.vala, do not modify */ - -/* - * Copyright (C) 2008,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 - - -#define DVB_TYPE_CHANNEL_LIST_READER (dvb_channel_list_reader_get_type ()) -#define DVB_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReader)) -#define DVB_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReaderClass)) -#define DVB_IS_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_LIST_READER)) -#define DVB_IS_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_LIST_READER)) -#define DVB_CHANNEL_LIST_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReaderClass)) - -typedef struct _DVBChannelListReader DVBChannelListReader; -typedef struct _DVBChannelListReaderClass DVBChannelListReaderClass; -typedef struct _DVBChannelListReaderPrivate DVBChannelListReaderPrivate; - -#define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) -#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_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 DVB_TYPE_TERRESTRIAL_CHANNEL (dvb_terrestrial_channel_get_type ()) -#define DVB_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannel)) -#define DVB_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) -#define DVB_IS_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL)) -#define DVB_IS_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL)) -#define DVB_TERRESTRIAL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) - -typedef struct _DVBTerrestrialChannel DVBTerrestrialChannel; -typedef struct _DVBTerrestrialChannelClass DVBTerrestrialChannelClass; - -#define DVB_TYPE_SATELLITE_CHANNEL (dvb_satellite_channel_get_type ()) -#define DVB_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannel)) -#define DVB_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) -#define DVB_IS_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SATELLITE_CHANNEL)) -#define DVB_IS_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SATELLITE_CHANNEL)) -#define DVB_SATELLITE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) - -typedef struct _DVBSatelliteChannel DVBSatelliteChannel; -typedef struct _DVBSatelliteChannelClass DVBSatelliteChannelClass; - -#define DVB_TYPE_CABLE_CHANNEL (dvb_cable_channel_get_type ()) -#define DVB_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannel)) -#define DVB_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) -#define DVB_IS_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CABLE_CHANNEL)) -#define DVB_IS_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CABLE_CHANNEL)) -#define DVB_CABLE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) - -typedef struct _DVBCableChannel DVBCableChannel; -typedef struct _DVBCableChannelClass DVBCableChannelClass; - -#define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) - -#define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) - -#define DVB_TYPE_DVB_SRC_CODE_RATE (dvb_dvb_src_code_rate_get_type ()) - -#define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) - -#define DVB_TYPE_DVB_SRC_TRANSMISSION_MODE (dvb_dvb_src_transmission_mode_get_type ()) - -#define DVB_TYPE_DVB_SRC_GUARD (dvb_dvb_src_guard_get_type ()) - -#define DVB_TYPE_DVB_SRC_HIERARCHY (dvb_dvb_src_hierarchy_get_type ()) - -struct _DVBChannelListReader { - GObject parent_instance; - DVBChannelListReaderPrivate * priv; -}; - -struct _DVBChannelListReaderClass { - GObjectClass parent_class; -}; - -typedef enum { - DVB_ADAPTER_TYPE_UNKNOWN, - DVB_ADAPTER_TYPE_DVB_T, - DVB_ADAPTER_TYPE_DVB_S, - DVB_ADAPTER_TYPE_DVB_C -} DVBAdapterType; - -struct _DVBChannelListReaderPrivate { - GFile* _ChannelFile; - DVBAdapterType _Type; - guint _GroupId; -}; - -typedef enum { - DVB_DVB_SRC_INVERSION_INVERSION_OFF, - DVB_DVB_SRC_INVERSION_INVERSION_ON, - DVB_DVB_SRC_INVERSION_INVERSION_AUTO -} DVBDvbSrcInversion; - -typedef enum { - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO -} DVBDvbSrcBandwidth; - -typedef enum { - DVB_DVB_SRC_CODE_RATE_FEC_NONE, - DVB_DVB_SRC_CODE_RATE_FEC_1_2, - DVB_DVB_SRC_CODE_RATE_FEC_2_3, - DVB_DVB_SRC_CODE_RATE_FEC_3_4, - DVB_DVB_SRC_CODE_RATE_FEC_4_5, - DVB_DVB_SRC_CODE_RATE_FEC_5_6, - DVB_DVB_SRC_CODE_RATE_FEC_6_7, - DVB_DVB_SRC_CODE_RATE_FEC_7_8, - DVB_DVB_SRC_CODE_RATE_FEC_8_9, - DVB_DVB_SRC_CODE_RATE_FEC_AUTO -} DVBDvbSrcCodeRate; - -typedef enum { - DVB_DVB_SRC_MODULATION_QPSK, - DVB_DVB_SRC_MODULATION_QAM_16, - DVB_DVB_SRC_MODULATION_QAM_32, - DVB_DVB_SRC_MODULATION_QAM_64, - DVB_DVB_SRC_MODULATION_QAM_128, - DVB_DVB_SRC_MODULATION_QAM_256, - DVB_DVB_SRC_MODULATION_QAM_AUTO -} DVBDvbSrcModulation; - -typedef enum { - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K, - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K, - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO -} DVBDvbSrcTransmissionMode; - -typedef enum { - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO -} DVBDvbSrcGuard; - -typedef enum { - DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_1, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_2, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_4, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO -} DVBDvbSrcHierarchy; - - -static gpointer dvb_channel_list_reader_parent_class = NULL; - -GType dvb_channel_list_reader_get_type (void); -GType dvb_adapter_type_get_type (void); -#define DVB_CHANNEL_LIST_READER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_LIST_READER, DVBChannelListReaderPrivate)) -enum { - DVB_CHANNEL_LIST_READER_DUMMY_PROPERTY, - DVB_CHANNEL_LIST_READER_CHANNEL_FILE, - DVB_CHANNEL_LIST_READER_TYPE, - DVB_CHANNEL_LIST_READER_GROUP_ID -}; -DVBChannelListReader* dvb_channel_list_reader_new (GFile* file, DVBAdapterType type, guint group_id); -DVBChannelListReader* dvb_channel_list_reader_construct (GType object_type, GFile* file, DVBAdapterType type, guint group_id); -char* dvb_utils_read_file_contents (GFile* file, GError** error); -GFile* dvb_channel_list_reader_get_ChannelFile (DVBChannelListReader* self); -DVBChannelList* dvb_channel_list_new (GFile* channels); -DVBChannelList* dvb_channel_list_construct (GType object_type, GFile* channels); -GType dvb_channel_list_get_type (void); -GType dvb_channel_get_type (void); -static DVBChannel* dvb_channel_list_reader_parse_line (DVBChannelListReader* self, const char* line); -void dvb_channel_list_add (DVBChannelList* self, DVBChannel* channel); -DVBChannelList* dvb_channel_list_reader_read (DVBChannelListReader* self, GError** error); -DVBAdapterType dvb_channel_list_reader_get_Type (DVBChannelListReader* self); -GType dvb_terrestrial_channel_get_type (void); -static DVBTerrestrialChannel* dvb_channel_list_reader_parse_terrestrial_channel (DVBChannelListReader* self, const char* line); -GType dvb_satellite_channel_get_type (void); -static DVBSatelliteChannel* dvb_channel_list_reader_parse_satellite_channel (DVBChannelListReader* self, const char* line); -GType dvb_cable_channel_get_type (void); -static DVBCableChannel* dvb_channel_list_reader_parse_cable_channel (DVBChannelListReader* self, const char* line); -gboolean dvb_channel_is_valid (DVBChannel* self); -char* dvb_channel_to_string (DVBChannel* self); -DVBTerrestrialChannel* dvb_terrestrial_channel_new (void); -DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type); -guint dvb_channel_list_reader_get_GroupId (DVBChannelListReader* self); -void dvb_channel_set_GroupId (DVBChannel* self, guint value); -void dvb_channel_set_Name (DVBChannel* self, const char* value); -void dvb_channel_set_Frequency (DVBChannel* self, guint value); -static gboolean dvb_channel_list_reader_get_value_with_prefix (GType enumtype, const char* name, const char* prefix, gint* val); -GType dvb_dvb_src_inversion_get_type (void); -void dvb_terrestrial_channel_set_Inversion (DVBTerrestrialChannel* self, DVBDvbSrcInversion value); -GType dvb_dvb_src_bandwidth_get_type (void); -void dvb_terrestrial_channel_set_Bandwidth (DVBTerrestrialChannel* self, DVBDvbSrcBandwidth value); -GType dvb_dvb_src_code_rate_get_type (void); -void dvb_terrestrial_channel_set_CodeRateHP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); -void dvb_terrestrial_channel_set_CodeRateLP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); -GType dvb_dvb_src_modulation_get_type (void); -void dvb_terrestrial_channel_set_Constellation (DVBTerrestrialChannel* self, DVBDvbSrcModulation value); -GType dvb_dvb_src_transmission_mode_get_type (void); -void dvb_terrestrial_channel_set_TransmissionMode (DVBTerrestrialChannel* self, DVBDvbSrcTransmissionMode value); -GType dvb_dvb_src_guard_get_type (void); -void dvb_terrestrial_channel_set_GuardInterval (DVBTerrestrialChannel* self, DVBDvbSrcGuard value); -GType dvb_dvb_src_hierarchy_get_type (void); -void dvb_terrestrial_channel_set_Hierarchy (DVBTerrestrialChannel* self, DVBDvbSrcHierarchy value); -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); -void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const char* 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); -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); -void dvb_cable_channel_set_Modulation (DVBCableChannel* self, DVBDvbSrcModulation value); -gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const char* name, gint* evalue); -static void dvb_channel_list_reader_set_ChannelFile (DVBChannelListReader* self, GFile* value); -static void dvb_channel_list_reader_set_Type (DVBChannelListReader* self, DVBAdapterType value); -static void dvb_channel_list_reader_set_GroupId (DVBChannelListReader* self, guint value); -static void dvb_channel_list_reader_finalize (GObject* obj); -static void dvb_channel_list_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void dvb_channel_list_reader_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 gint _vala_array_length (gpointer array); - - - -DVBChannelListReader* dvb_channel_list_reader_construct (GType object_type, GFile* file, DVBAdapterType type, guint group_id) { - DVBChannelListReader * self; - g_return_val_if_fail (file != NULL, NULL); - self = (DVBChannelListReader*) g_object_new (object_type, "ChannelFile", file, "Type", type, "GroupId", group_id, NULL); - return self; -} - - -DVBChannelListReader* dvb_channel_list_reader_new (GFile* file, DVBAdapterType type, guint group_id) { - return dvb_channel_list_reader_construct (DVB_TYPE_CHANNEL_LIST_READER, file, type, group_id); -} - - -DVBChannelList* dvb_channel_list_reader_read (DVBChannelListReader* self, GError** error) { - DVBChannelList* result; - GError * _inner_error_; - char* contents; - DVBChannelList* channels; - g_return_val_if_fail (self != NULL, NULL); - _inner_error_ = NULL; - contents = dvb_utils_read_file_contents (self->priv->_ChannelFile, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - return NULL; - } - if (contents == NULL) { - result = NULL; - _g_free0 (contents); - return result; - } - channels = dvb_channel_list_new (self->priv->_ChannelFile); - { - char** _tmp0_; - char** line_collection; - int line_collection_length1; - int line_it; - line_collection = _tmp0_ = g_strsplit (contents, "\n", 0); - line_collection_length1 = _vala_array_length (_tmp0_); - for (line_it = 0; line_it < _vala_array_length (_tmp0_); line_it = line_it + 1) { - char* line; - line = g_strdup (line_collection[line_it]); - { - if (strlen (line) > 0) { - DVBChannel* c; - c = dvb_channel_list_reader_parse_line (self, line); - if (c != NULL) { - dvb_channel_list_add (channels, c); - } else { - g_warning ("ChannelListReader.vala:46: Could not parse channel"); - } - _g_object_unref0 (c); - } - _g_free0 (line); - } - } - line_collection = (_vala_array_free (line_collection, line_collection_length1, (GDestroyNotify) g_free), NULL); - } - result = channels; - _g_free0 (contents); - return result; -} - - -static DVBChannel* dvb_channel_list_reader_parse_line (DVBChannelListReader* self, const char* line) { - DVBChannel* result; - DVBChannel* c; - gboolean _tmp3_ = FALSE; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (line != NULL, NULL); - c = NULL; - switch (self->priv->_Type) { - case DVB_ADAPTER_TYPE_DVB_T: - { - DVBChannel* _tmp0_; - c = (_tmp0_ = (DVBChannel*) dvb_channel_list_reader_parse_terrestrial_channel (self, line), _g_object_unref0 (c), _tmp0_); - break; - } - case DVB_ADAPTER_TYPE_DVB_S: - { - DVBChannel* _tmp1_; - c = (_tmp1_ = (DVBChannel*) dvb_channel_list_reader_parse_satellite_channel (self, line), _g_object_unref0 (c), _tmp1_); - break; - } - case DVB_ADAPTER_TYPE_DVB_C: - { - DVBChannel* _tmp2_; - c = (_tmp2_ = (DVBChannel*) dvb_channel_list_reader_parse_cable_channel (self, line), _g_object_unref0 (c), _tmp2_); - break; - } - default: - { - g_critical ("ChannelListReader.vala:69: Unknown adapter type"); - break; - } - } - if (c != NULL) { - _tmp3_ = dvb_channel_is_valid (c); - } else { - _tmp3_ = FALSE; - } - if (_tmp3_) { - result = c; - return result; - } else { - char* _tmp4_; - char* val; - _tmp4_ = NULL; - if (c == NULL) { - char* _tmp5_; - _tmp4_ = (_tmp5_ = g_strdup ("(null)"), _g_free0 (_tmp4_), _tmp5_); - } else { - char* _tmp6_; - _tmp4_ = (_tmp6_ = dvb_channel_to_string (c), _g_free0 (_tmp4_), _tmp6_); - } - val = g_strdup (_tmp4_); - g_warning ("ChannelListReader.vala:77: Channel is not valid: %s", val); - result = NULL; - _g_free0 (_tmp4_); - _g_free0 (val); - _g_object_unref0 (c); - return result; - } - _g_object_unref0 (c); -} - - -static DVBTerrestrialChannel* dvb_channel_list_reader_parse_terrestrial_channel (DVBChannelListReader* self, const char* line) { - DVBTerrestrialChannel* result; - DVBTerrestrialChannel* channel; - char** _tmp1_; - gint fields_size; - gint fields_length1; - char** _tmp0_; - char** fields; - gint i; - char* val; - gboolean failed; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (line != NULL, NULL); - channel = dvb_terrestrial_channel_new (); - dvb_channel_set_GroupId ((DVBChannel*) channel, self->priv->_GroupId); - fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), fields_size = fields_length1, _tmp1_); - i = 0; - val = NULL; - failed = FALSE; - while (TRUE) { - char* _tmp2_; - if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { - break; - } - if (i == 0) { - if (g_utf8_validate (val, -1, NULL)) { - dvb_channel_set_Name ((DVBChannel*) channel, val); - } else { - g_warning ("ChannelListReader.vala:103: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); - } - } else { - if (i == 1) { - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) atoi (val)); - } else { - if (i == 2) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &eval)) { - dvb_terrestrial_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 3) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, val, "DVB_DVB_SRC_BANDWIDTH_", &eval)) { - dvb_terrestrial_channel_set_Bandwidth (channel, (DVBDvbSrcBandwidth) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 4) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { - dvb_terrestrial_channel_set_CodeRateHP (channel, (DVBDvbSrcCodeRate) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 5) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { - dvb_terrestrial_channel_set_CodeRateLP (channel, (DVBDvbSrcCodeRate) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 6) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &eval)) { - dvb_terrestrial_channel_set_Constellation (channel, (DVBDvbSrcModulation) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 7) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, val, "DVB_DVB_SRC_TRANSMISSION_MODE_", &eval)) { - dvb_terrestrial_channel_set_TransmissionMode (channel, (DVBDvbSrcTransmissionMode) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 8) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_GUARD, val, "DVB_DVB_SRC_GUARD_", &eval)) { - dvb_terrestrial_channel_set_GuardInterval (channel, (DVBDvbSrcGuard) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 9) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, val, "DVB_DVB_SRC_HIERARCHY_", &eval)) { - dvb_terrestrial_channel_set_Hierarchy (channel, (DVBDvbSrcHierarchy) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 10) { - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); - } else { - if (i == 11) { - gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); - } else { - if (i == 12) { - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); - } - } - } - } - } - } - } - } - } - } - } - } - } - i++; - } - if (failed) { - result = NULL; - _g_object_unref0 (channel); - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); - return result; - } else { - result = channel; - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); - return result; - } - _g_object_unref0 (channel); - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); -} - - -static DVBSatelliteChannel* dvb_channel_list_reader_parse_satellite_channel (DVBChannelListReader* self, const char* line) { - DVBSatelliteChannel* result; - DVBSatelliteChannel* channel; - char** _tmp1_; - gint fields_size; - gint fields_length1; - char** _tmp0_; - char** fields; - gint i; - char* val; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (line != NULL, NULL); - channel = dvb_satellite_channel_new (); - dvb_channel_set_GroupId ((DVBChannel*) channel, self->priv->_GroupId); - fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), fields_size = fields_length1, _tmp1_); - i = 0; - val = NULL; - while (TRUE) { - char* _tmp2_; - if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { - break; - } - if (i == 0) { - if (g_utf8_validate (val, -1, NULL)) { - dvb_channel_set_Name ((DVBChannel*) channel, val); - } else { - g_warning ("ChannelListReader.vala:213: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); - } - } else { - if (i == 1) { - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) (atoi (val) * 1000)); - } else { - if (i == 2) { - dvb_satellite_channel_set_Polarization (channel, val); - } else { - if (i == 3) { - dvb_satellite_channel_set_DiseqcSource (channel, atoi (val)); - } else { - if (i == 4) { - dvb_satellite_channel_set_SymbolRate (channel, (guint) atoi (val)); - } else { - if (i == 5) { - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); - } else { - if (i == 6) { - gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); - } else { - if (i == 7) { - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); - } - } - } - } - } - } - } - } - i++; - } - result = channel; - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); - return result; -} - - -static DVBCableChannel* dvb_channel_list_reader_parse_cable_channel (DVBChannelListReader* self, const char* line) { - DVBCableChannel* result; - DVBCableChannel* channel; - char** _tmp1_; - gint fields_size; - gint fields_length1; - char** _tmp0_; - char** fields; - gint i; - char* val; - gboolean failed; - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (line != NULL, NULL); - channel = dvb_cable_channel_new (); - dvb_channel_set_GroupId ((DVBChannel*) channel, self->priv->_GroupId); - fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), fields_size = fields_length1, _tmp1_); - i = 0; - val = NULL; - failed = FALSE; - while (TRUE) { - char* _tmp2_; - if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { - break; - } - if (i == 0) { - if (g_utf8_validate (val, -1, NULL)) { - dvb_channel_set_Name ((DVBChannel*) channel, val); - } else { - g_warning ("ChannelListReader.vala:260: Bad UTF-8 encoded channel name"); - dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); - } - } else { - if (i == 1) { - dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) atoi (val)); - } else { - if (i == 2) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &eval)) { - dvb_cable_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 3) { - dvb_cable_channel_set_SymbolRate (channel, (guint) (atoi (val) / 1000)); - } else { - if (i == 4) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { - dvb_cable_channel_set_CodeRate (channel, (DVBDvbSrcCodeRate) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 5) { - gint eval = 0; - if (dvb_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &eval)) { - dvb_cable_channel_set_Modulation (channel, (DVBDvbSrcModulation) eval); - } else { - failed = TRUE; - break; - } - } else { - if (i == 6) { - dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); - } else { - if (i == 7) { - gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); - } else { - if (i == 8) { - dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); - } - } - } - } - } - } - } - } - } - i++; - } - if (failed) { - result = NULL; - _g_object_unref0 (channel); - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); - return result; - } else { - result = channel; - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); - return result; - } - _g_object_unref0 (channel); - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (val); -} - - -static gboolean dvb_channel_list_reader_get_value_with_prefix (GType enumtype, const char* name, const char* prefix, gint* val) { - gboolean result; - char* _tmp0_; - gboolean _tmp1_; - g_return_val_if_fail (name != NULL, FALSE); - g_return_val_if_fail (prefix != NULL, FALSE); - result = (_tmp1_ = dvb_utils_get_value_by_name_from_enum (enumtype, _tmp0_ = g_strconcat (prefix, name, NULL), val), _g_free0 (_tmp0_), _tmp1_); - return result; -} - - -GFile* dvb_channel_list_reader_get_ChannelFile (DVBChannelListReader* self) { - GFile* result; - g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_ChannelFile; - return result; -} - - -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -static void dvb_channel_list_reader_set_ChannelFile (DVBChannelListReader* self, GFile* value) { - GFile* _tmp0_; - g_return_if_fail (self != NULL); - self->priv->_ChannelFile = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_ChannelFile), _tmp0_); - g_object_notify ((GObject *) self, "ChannelFile"); -} - - -DVBAdapterType dvb_channel_list_reader_get_Type (DVBChannelListReader* self) { - DVBAdapterType result; - g_return_val_if_fail (self != NULL, 0); - result = self->priv->_Type; - return result; -} - - -static void dvb_channel_list_reader_set_Type (DVBChannelListReader* self, DVBAdapterType value) { - g_return_if_fail (self != NULL); - self->priv->_Type = value; - g_object_notify ((GObject *) self, "Type"); -} - - -guint dvb_channel_list_reader_get_GroupId (DVBChannelListReader* self) { - guint result; - g_return_val_if_fail (self != NULL, 0U); - result = self->priv->_GroupId; - return result; -} - - -static void dvb_channel_list_reader_set_GroupId (DVBChannelListReader* self, guint value) { - g_return_if_fail (self != NULL); - self->priv->_GroupId = value; - g_object_notify ((GObject *) self, "GroupId"); -} - - -static void dvb_channel_list_reader_class_init (DVBChannelListReaderClass * klass) { - dvb_channel_list_reader_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBChannelListReaderPrivate)); - G_OBJECT_CLASS (klass)->get_property = dvb_channel_list_reader_get_property; - G_OBJECT_CLASS (klass)->set_property = dvb_channel_list_reader_set_property; - G_OBJECT_CLASS (klass)->finalize = dvb_channel_list_reader_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_READER_CHANNEL_FILE, g_param_spec_object ("ChannelFile", "ChannelFile", "ChannelFile", 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_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)); - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_READER_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)); -} - - -static void dvb_channel_list_reader_instance_init (DVBChannelListReader * self) { - self->priv = DVB_CHANNEL_LIST_READER_GET_PRIVATE (self); -} - - -static void dvb_channel_list_reader_finalize (GObject* obj) { - DVBChannelListReader * self; - self = DVB_CHANNEL_LIST_READER (obj); - _g_object_unref0 (self->priv->_ChannelFile); - G_OBJECT_CLASS (dvb_channel_list_reader_parent_class)->finalize (obj); -} - - -GType dvb_channel_list_reader_get_type (void) { - static GType dvb_channel_list_reader_type_id = 0; - if (dvb_channel_list_reader_type_id == 0) { - static const GTypeInfo g_define_type_info = { sizeof (DVBChannelListReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_list_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelListReader), 0, (GInstanceInitFunc) dvb_channel_list_reader_instance_init, NULL }; - dvb_channel_list_reader_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelListReader", &g_define_type_info, 0); - } - return dvb_channel_list_reader_type_id; -} - - -static void dvb_channel_list_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBChannelListReader * self; - self = DVB_CHANNEL_LIST_READER (object); - switch (property_id) { - case DVB_CHANNEL_LIST_READER_CHANNEL_FILE: - g_value_set_object (value, dvb_channel_list_reader_get_ChannelFile (self)); - break; - case DVB_CHANNEL_LIST_READER_TYPE: - g_value_set_enum (value, dvb_channel_list_reader_get_Type (self)); - break; - case DVB_CHANNEL_LIST_READER_GROUP_ID: - g_value_set_uint (value, dvb_channel_list_reader_get_GroupId (self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static void dvb_channel_list_reader_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - DVBChannelListReader * self; - self = DVB_CHANNEL_LIST_READER (object); - switch (property_id) { - case DVB_CHANNEL_LIST_READER_CHANNEL_FILE: - dvb_channel_list_reader_set_ChannelFile (self, g_value_get_object (value)); - break; - case DVB_CHANNEL_LIST_READER_TYPE: - dvb_channel_list_reader_set_Type (self, g_value_get_enum (value)); - break; - case DVB_CHANNEL_LIST_READER_GROUP_ID: - dvb_channel_list_reader_set_GroupId (self, g_value_get_uint (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -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); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - - diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelListReader.vala gnome-dvb-daemon-0.1.21/src/ChannelListReader.vala --- gnome-dvb-daemon-0.1.16/src/ChannelListReader.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelListReader.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,315 +0,0 @@ -/* - * Copyright (C) 2008,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 . - */ - -using GLib; - -namespace DVB { - - public class ChannelListReader : GLib.Object { - - public File ChannelFile {get; construct;} - public AdapterType Type {get; construct;} - public uint GroupId {get; construct;} - - public ChannelListReader (File file, AdapterType type, uint group_id) { - base (ChannelFile: file, Type: type, GroupId: group_id); - } - - public ChannelList? read () throws Error { - string contents = Utils.read_file_contents (this.ChannelFile); - if (contents == null) return null; - - ChannelList channels = new ChannelList (this.ChannelFile); - - foreach (string line in contents.split("\n")) { - if (line.size () > 0) { - Channel c = this.parse_line (line); - if (c != null) - channels.add (c); - else - warning ("Could not parse channel"); - } - } - - return channels; - } - - private Channel? parse_line (string line) { - Channel? c = null; - switch (this.Type) { - case AdapterType.DVB_T: - c = parse_terrestrial_channel (line); - break; - - case AdapterType.DVB_S: - c = parse_satellite_channel (line); - break; - - case AdapterType.DVB_C: - c = parse_cable_channel (line); - break; - - default: - critical ("Unknown adapter type"); - break; - } - - if (c != null && c.is_valid ()) { - return c; - } else { - string val = (c == null) ? "(null)" : c.to_string (); - warning ("Channel is not valid: %s", val); - return null; - } - } - - /** - * @line: The line to parse - * @returns: #TerrestrialChannel representing that line - * - * A line looks like - * 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 (); - channel.GroupId = this.GroupId; - - string[] fields = line.split(":"); - - int i=0; - string val; - bool failed = false; - while ( (val = fields[i]) != null) { - if (i == 0) { - if (val.validate()) - channel.Name = val; - else { - warning ("Bad UTF-8 encoded channel name"); - channel.Name = "Bad encoding"; - } - } else if (i == 1) { - channel.Frequency = (uint)val.to_int (); - } else if (i == 2) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcInversion), val, - "DVB_DVB_SRC_INVERSION_", out eval)) { - channel.Inversion = (DvbSrcInversion) eval; - } else { - failed = true; - break; - } - } else if (i == 3) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcBandwidth), val, - "DVB_DVB_SRC_BANDWIDTH_", out eval)) { - channel.Bandwidth = (DvbSrcBandwidth) eval; - } else { - failed = true; - break; - } - } else if (i == 4) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, - "DVB_DVB_SRC_CODE_RATE_", out eval)) { - channel.CodeRateHP = (DvbSrcCodeRate) eval; - } else { - failed = true; - break; - } - } else if (i == 5) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, - "DVB_DVB_SRC_CODE_RATE_", out eval)) { - channel.CodeRateLP = (DvbSrcCodeRate) eval; - } else { - failed = true; - break; - } - } else if (i == 6) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcModulation), val, - "DVB_DVB_SRC_MODULATION_", out eval)) { - channel.Constellation = (DvbSrcModulation) eval; - } else { - failed = true; - break; - } - } else if (i == 7) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcTransmissionMode), - val, "DVB_DVB_SRC_TRANSMISSION_MODE_", out eval)) { - channel.TransmissionMode = (DvbSrcTransmissionMode) eval; - } else { - failed = true; - break; - } - } else if (i == 8) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcGuard), val, - "DVB_DVB_SRC_GUARD_", out eval)) { - channel.GuardInterval = (DvbSrcGuard) eval; - } else { - failed = true; - break; - } - } else if (i == 9) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcHierarchy), val, - "DVB_DVB_SRC_HIERARCHY_", out eval)) { - channel.Hierarchy = (DvbSrcHierarchy) eval; - } else { - failed = true; - break; - } - } else if (i == 10) { - channel.VideoPID = (uint)val.to_int (); - } else if (i == 11) { - channel.AudioPIDs.add ((uint)val.to_int ()); - } else if (i == 12) { - channel.Sid = (uint)val.to_int (); - } - - i++; - } - - if (failed) return null; - else return channel; - } - - /** - * - * A line looks like - * Das Erste:11836:h:0:27500:101:102:28106 - */ - private SatelliteChannel? parse_satellite_channel (string line) { - var channel = new SatelliteChannel (); - channel.GroupId = this.GroupId; - - string[] fields = line.split(":"); - - int i=0; - string val; - while ( (val = fields[i]) != null) { - if (i == 0) { - if (val.validate()) - channel.Name = val; - else { - warning ("Bad UTF-8 encoded channel name"); - channel.Name = "Bad encoding"; - } - } else if (i == 1) { - // frequency is stored in MHz - channel.Frequency = (uint)(val.to_int () * 1000); - } else if (i == 2) { - channel.Polarization = val; - } else if (i == 3) { - // Sat number - channel.DiseqcSource = val.to_int (); - } else if (i == 4) { - // symbol rate is stored in kBaud - channel.SymbolRate = (uint)val.to_int(); - } else if (i == 5) { - channel.VideoPID = (uint)val.to_int (); - } else if (i == 6) { - channel.AudioPIDs.add ((uint)val.to_int ()); - } else if (i == 7) { - channel.Sid = (uint)val.to_int (); - } - - i++; - } - - return channel; - } - - /** - * - * line looks like - * ProSieben:330000000:INVERSION_AUTO:6900000:FEC_NONE:QAM_64:255:256:898 - */ - private CableChannel? parse_cable_channel (string line) { - var channel = new CableChannel (); - channel.GroupId = this.GroupId; - - string[] fields = line.split(":"); - - int i=0; - string val; - bool failed = false; - while ( (val = fields[i]) != null) { - if (i == 0) { - if (val.validate()) - channel.Name = val; - else { - warning ("Bad UTF-8 encoded channel name"); - channel.Name = "Bad encoding"; - } - } else if (i == 1) { - channel.Frequency = (uint)val.to_int (); - } else if (i == 2) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcInversion), val, - "DVB_DVB_SRC_INVERSION_", out eval)) { - channel.Inversion = (DvbSrcInversion) eval; - } else { - failed = true; - break; - } - } else if (i == 3) { - channel.SymbolRate = (uint)(val.to_int () / 1000); - } else if (i == 4) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, - "DVB_DVB_SRC_CODE_RATE_", out eval)) { - channel.CodeRate = (DvbSrcCodeRate) eval; - } else { - failed = true; - break; - } - } else if (i == 5) { - int eval; - if (get_value_with_prefix (typeof(DvbSrcModulation), val, - "DVB_DVB_SRC_MODULATION_", out eval)) { - channel.Modulation = (DvbSrcModulation) eval; - } else { - failed = true; - break; - } - } else if (i == 6) { - channel.VideoPID = (uint)val.to_int (); - } else if (i == 7) { - channel.AudioPIDs.add ((uint)val.to_int ()); - } else if (i == 8) { - channel.Sid = (uint)val.to_int (); - } - - i++; - } - - if (failed) return null; - else return channel; - } - - private static bool get_value_with_prefix (GLib.Type enumtype, string name, - string prefix, out int val) { - return Utils.get_value_by_name_from_enum (enumtype, prefix + name, out val); - } - } - -} diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelList.vala gnome-dvb-daemon-0.1.21/src/ChannelList.vala --- gnome-dvb-daemon-0.1.16/src/ChannelList.vala 2010-03-17 19:06:52.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelList.vala 2010-08-09 13:24:01.000000000 +0000 @@ -48,7 +48,7 @@ public Channel? get_channel (uint sid) { Channel? val = null; lock (this.channels) { - if (this.channels.contains (sid)) + if (this.channels.has_key (sid)) val = this.channels.get (sid); } return val; @@ -62,14 +62,14 @@ public void remove (uint sid) { lock (this.channels) { - this.channels.remove (sid); + this.channels.unset (sid); } } public bool contains (uint sid) { bool val; lock (this.channels) { - val = this.channels.contains (sid); + val = this.channels.has_key (sid); } return val; } @@ -86,10 +86,9 @@ return this.channels.values.iterator(); } - public static ChannelList restore_from_file (File channelsfile, - AdapterType type, uint group_id) throws Error { - var reader = new DVB.ChannelListReader (channelsfile, type, group_id); - return reader.read (); + public void load (AdapterType type) throws Error { + var reader = new DVB.io.ChannelListReader (this, type); + reader.read_into (); } /** @@ -165,7 +164,7 @@ string val = ""; lock (this.channels) { - if (this.channels.contains (channel_id)) { + if (this.channels.has_key (channel_id)) { string name = this.channels.get (channel_id).Name; val = (name == null) ? "" : name; ret = true; @@ -188,7 +187,7 @@ string val = ""; bool ret = false; lock (this.channels) { - if (this.channels.contains (channel_id)) { + if (this.channels.has_key (channel_id)) { string tmp = this.channels.get (channel_id).Network; val = (tmp == null) ? "" : tmp; ret = true; @@ -209,7 +208,7 @@ bool val = false; bool ret = false; lock (this.channels) { - if (this.channels.contains (channel_id)) { + if (this.channels.has_key (channel_id)) { val = this.channels.get (channel_id).is_radio (); ret = true; } @@ -229,7 +228,7 @@ Channel channel = null; lock (this.channels) { - if (this.channels.contains (channel_id)) { + if (this.channels.has_key (channel_id)) { channel = this.channels.get (channel_id); } } diff -Nru gnome-dvb-daemon-0.1.16/src/ChannelListWriter.c gnome-dvb-daemon-0.1.21/src/ChannelListWriter.c --- gnome-dvb-daemon-0.1.16/src/ChannelListWriter.c 2010-03-17 19:10:35.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelListWriter.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,602 +0,0 @@ -/* ChannelListWriter.c generated by valac, the Vala compiler - * generated from ChannelListWriter.vala, do not modify */ - -/* - * Copyright (C) 2008,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 - - -#define DVB_TYPE_CHANNEL_LIST_WRITER (dvb_channel_list_writer_get_type ()) -#define DVB_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriter)) -#define DVB_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriterClass)) -#define DVB_IS_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_LIST_WRITER)) -#define DVB_IS_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_LIST_WRITER)) -#define DVB_CHANNEL_LIST_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriterClass)) - -typedef struct _DVBChannelListWriter DVBChannelListWriter; -typedef struct _DVBChannelListWriterClass DVBChannelListWriterClass; -typedef struct _DVBChannelListWriterPrivate DVBChannelListWriterPrivate; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#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 _g_free0(var) (var = (g_free (var), NULL)) - -#define DVB_TYPE_TERRESTRIAL_CHANNEL (dvb_terrestrial_channel_get_type ()) -#define DVB_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannel)) -#define DVB_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) -#define DVB_IS_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL)) -#define DVB_IS_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL)) -#define DVB_TERRESTRIAL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) - -typedef struct _DVBTerrestrialChannel DVBTerrestrialChannel; -typedef struct _DVBTerrestrialChannelClass DVBTerrestrialChannelClass; - -#define DVB_TYPE_SATELLITE_CHANNEL (dvb_satellite_channel_get_type ()) -#define DVB_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannel)) -#define DVB_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) -#define DVB_IS_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SATELLITE_CHANNEL)) -#define DVB_IS_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SATELLITE_CHANNEL)) -#define DVB_SATELLITE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) - -typedef struct _DVBSatelliteChannel DVBSatelliteChannel; -typedef struct _DVBSatelliteChannelClass DVBSatelliteChannelClass; - -#define DVB_TYPE_CABLE_CHANNEL (dvb_cable_channel_get_type ()) -#define DVB_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannel)) -#define DVB_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) -#define DVB_IS_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CABLE_CHANNEL)) -#define DVB_IS_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CABLE_CHANNEL)) -#define DVB_CABLE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) - -typedef struct _DVBCableChannel DVBCableChannel; -typedef struct _DVBCableChannelClass DVBCableChannelClass; - -#define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) - -#define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) - -#define DVB_TYPE_DVB_SRC_CODE_RATE (dvb_dvb_src_code_rate_get_type ()) - -#define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) - -#define DVB_TYPE_DVB_SRC_TRANSMISSION_MODE (dvb_dvb_src_transmission_mode_get_type ()) - -#define DVB_TYPE_DVB_SRC_GUARD (dvb_dvb_src_guard_get_type ()) - -#define DVB_TYPE_DVB_SRC_HIERARCHY (dvb_dvb_src_hierarchy_get_type ()) - -struct _DVBChannelListWriter { - GObject parent_instance; - DVBChannelListWriterPrivate * priv; -}; - -struct _DVBChannelListWriterClass { - GObjectClass parent_class; -}; - -struct _DVBChannelListWriterPrivate { - GFile* _file; - GOutputStream* stream; -}; - -typedef enum { - DVB_DVB_SRC_INVERSION_INVERSION_OFF, - DVB_DVB_SRC_INVERSION_INVERSION_ON, - DVB_DVB_SRC_INVERSION_INVERSION_AUTO -} DVBDvbSrcInversion; - -typedef enum { - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ, - DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO -} DVBDvbSrcBandwidth; - -typedef enum { - DVB_DVB_SRC_CODE_RATE_FEC_NONE, - DVB_DVB_SRC_CODE_RATE_FEC_1_2, - DVB_DVB_SRC_CODE_RATE_FEC_2_3, - DVB_DVB_SRC_CODE_RATE_FEC_3_4, - DVB_DVB_SRC_CODE_RATE_FEC_4_5, - DVB_DVB_SRC_CODE_RATE_FEC_5_6, - DVB_DVB_SRC_CODE_RATE_FEC_6_7, - DVB_DVB_SRC_CODE_RATE_FEC_7_8, - DVB_DVB_SRC_CODE_RATE_FEC_8_9, - DVB_DVB_SRC_CODE_RATE_FEC_AUTO -} DVBDvbSrcCodeRate; - -typedef enum { - DVB_DVB_SRC_MODULATION_QPSK, - DVB_DVB_SRC_MODULATION_QAM_16, - DVB_DVB_SRC_MODULATION_QAM_32, - DVB_DVB_SRC_MODULATION_QAM_64, - DVB_DVB_SRC_MODULATION_QAM_128, - DVB_DVB_SRC_MODULATION_QAM_256, - DVB_DVB_SRC_MODULATION_QAM_AUTO -} DVBDvbSrcModulation; - -typedef enum { - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K, - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K, - DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO -} DVBDvbSrcTransmissionMode; - -typedef enum { - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4, - DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO -} DVBDvbSrcGuard; - -typedef enum { - DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_1, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_2, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_4, - DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO -} DVBDvbSrcHierarchy; - - -static gpointer dvb_channel_list_writer_parent_class = NULL; - -GType dvb_channel_list_writer_get_type (void); -#define DVB_CHANNEL_LIST_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriterPrivate)) -enum { - DVB_CHANNEL_LIST_WRITER_DUMMY_PROPERTY, - DVB_CHANNEL_LIST_WRITER_FILE -}; -GFile* dvb_channel_list_writer_get_file (DVBChannelListWriter* self); -static void dvb_channel_list_writer_open_stream (DVBChannelListWriter* self, GError** error); -DVBChannelListWriter* dvb_channel_list_writer_new (GFile* file); -DVBChannelListWriter* dvb_channel_list_writer_construct (GType object_type, GFile* file); -GType dvb_channel_get_type (void); -const char* dvb_channel_get_Name (DVBChannel* self); -GType dvb_terrestrial_channel_get_type (void); -static void dvb_channel_list_writer_write_terrestrial_channel (DVBChannelListWriter* self, DVBTerrestrialChannel* channel, GError** error); -GType dvb_satellite_channel_get_type (void); -static void dvb_channel_list_writer_write_satellite_channel (DVBChannelListWriter* self, DVBSatelliteChannel* channel, GError** error); -GType dvb_cable_channel_get_type (void); -static void dvb_channel_list_writer_write_cable_channel (DVBChannelListWriter* self, DVBCableChannel* channel, GError** error); -GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); -guint dvb_channel_get_VideoPID (DVBChannel* self); -guint dvb_channel_get_Sid (DVBChannel* self); -void dvb_channel_list_writer_write (DVBChannelListWriter* self, DVBChannel* channel, GError** error); -gboolean dvb_channel_list_writer_close (DVBChannelListWriter* self, GError** error); -guint dvb_channel_get_Frequency (DVBChannel* self); -static char* dvb_channel_list_writer_get_name_without_prefix (GType enumtype, gint val, const char* prefix); -GType dvb_dvb_src_inversion_get_type (void); -DVBDvbSrcInversion dvb_terrestrial_channel_get_Inversion (DVBTerrestrialChannel* self); -GType dvb_dvb_src_bandwidth_get_type (void); -DVBDvbSrcBandwidth dvb_terrestrial_channel_get_Bandwidth (DVBTerrestrialChannel* self); -GType dvb_dvb_src_code_rate_get_type (void); -DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateHP (DVBTerrestrialChannel* self); -DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateLP (DVBTerrestrialChannel* self); -GType dvb_dvb_src_modulation_get_type (void); -DVBDvbSrcModulation dvb_terrestrial_channel_get_Constellation (DVBTerrestrialChannel* self); -GType dvb_dvb_src_transmission_mode_get_type (void); -DVBDvbSrcTransmissionMode dvb_terrestrial_channel_get_TransmissionMode (DVBTerrestrialChannel* self); -GType dvb_dvb_src_guard_get_type (void); -DVBDvbSrcGuard dvb_terrestrial_channel_get_GuardInterval (DVBTerrestrialChannel* self); -GType dvb_dvb_src_hierarchy_get_type (void); -DVBDvbSrcHierarchy dvb_terrestrial_channel_get_Hierarchy (DVBTerrestrialChannel* self); -const char* dvb_satellite_channel_get_Polarization (DVBSatelliteChannel* self); -gint dvb_satellite_channel_get_DiseqcSource (DVBSatelliteChannel* self); -guint dvb_satellite_channel_get_SymbolRate (DVBSatelliteChannel* self); -DVBDvbSrcInversion dvb_cable_channel_get_Inversion (DVBCableChannel* self); -guint dvb_cable_channel_get_SymbolRate (DVBCableChannel* self); -DVBDvbSrcCodeRate dvb_cable_channel_get_CodeRate (DVBCableChannel* self); -DVBDvbSrcModulation dvb_cable_channel_get_Modulation (DVBCableChannel* self); -const char* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val); -static void dvb_channel_list_writer_set_file (DVBChannelListWriter* self, GFile* value); -static void dvb_channel_list_writer_finalize (GObject* obj); -static void dvb_channel_list_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void dvb_channel_list_writer_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 void dvb_channel_list_writer_open_stream (DVBChannelListWriter* self, GError** error) { - GError * _inner_error_; - GFileOutputStream* fostream; - GOutputStream* _tmp4_; - g_return_if_fail (self != NULL); - _inner_error_ = NULL; - fostream = NULL; - if (g_file_query_exists (self->priv->_file, NULL)) { - GFileOutputStream* _tmp0_; - GFileOutputStream* _tmp1_; - _tmp0_ = g_file_replace (self->priv->_file, NULL, TRUE, 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (fostream); - return; - } - fostream = (_tmp1_ = _tmp0_, _g_object_unref0 (fostream), _tmp1_); - } else { - GFileOutputStream* _tmp2_; - GFileOutputStream* _tmp3_; - _tmp2_ = g_file_create (self->priv->_file, 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (fostream); - return; - } - fostream = (_tmp3_ = _tmp2_, _g_object_unref0 (fostream), _tmp3_); - } - self->priv->stream = (_tmp4_ = (GOutputStream*) ((GBufferedOutputStream*) g_buffered_output_stream_new ((GOutputStream*) fostream)), _g_object_unref0 (self->priv->stream), _tmp4_); - _g_object_unref0 (fostream); -} - - -DVBChannelListWriter* dvb_channel_list_writer_construct (GType object_type, GFile* file) { - DVBChannelListWriter * self; - g_return_val_if_fail (file != NULL, NULL); - self = (DVBChannelListWriter*) g_object_new (object_type, "file", file, NULL); - return self; -} - - -DVBChannelListWriter* dvb_channel_list_writer_new (GFile* file) { - return dvb_channel_list_writer_construct (DVB_TYPE_CHANNEL_LIST_WRITER, file); -} - - -void dvb_channel_list_writer_write (DVBChannelListWriter* self, DVBChannel* channel, GError** error) { - GError * _inner_error_; - char* buffer; - char* _tmp0_; - guint apid = 0U; - char* _tmp1_; - g_return_if_fail (self != NULL); - g_return_if_fail (channel != NULL); - _inner_error_ = NULL; - if (self->priv->stream == NULL) { - dvb_channel_list_writer_open_stream (self, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - return; - } - } - if (self->priv->stream == NULL) { - return; - } - buffer = NULL; - buffer = (_tmp0_ = g_strdup_printf ("%s:", dvb_channel_get_Name (channel)), _g_free0 (buffer), _tmp0_); - g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), 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_channel_list_writer_write_terrestrial_channel (self, DVB_TERRESTRIAL_CHANNEL (channel), &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (buffer); - return; - } - } else { - if (DVB_IS_SATELLITE_CHANNEL (channel)) { - dvb_channel_list_writer_write_satellite_channel (self, DVB_SATELLITE_CHANNEL (channel), &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (buffer); - return; - } - } else { - if (DVB_IS_CABLE_CHANNEL (channel)) { - dvb_channel_list_writer_write_cable_channel (self, DVB_CABLE_CHANNEL (channel), &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (buffer); - return; - } - } else { - g_warning ("ChannelListWriter.vala:76: Unknown channel type"); - } - } - } - if (gee_collection_get_size ((GeeCollection*) dvb_channel_get_AudioPIDs (channel)) == 0) { - apid = (guint) 0; - } else { - apid = GPOINTER_TO_UINT (gee_list_get (dvb_channel_get_AudioPIDs (channel), 0)); - } - buffer = (_tmp1_ = g_strdup_printf (":%u:%u:%u\n", dvb_channel_get_VideoPID (channel), apid, dvb_channel_get_Sid (channel)), _g_free0 (buffer), _tmp1_); - g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (buffer); - return; - } - _g_free0 (buffer); -} - - -gboolean dvb_channel_list_writer_close (DVBChannelListWriter* self, GError** error) { - gboolean result; - GError * _inner_error_; - gboolean _tmp0_; - g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; - if (self->priv->stream == NULL) { - result = TRUE; - return result; - } - _tmp0_ = g_output_stream_close (self->priv->stream, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - return FALSE; - } - result = _tmp0_; - return result; -} - - -static void dvb_channel_list_writer_write_terrestrial_channel (DVBChannelListWriter* self, DVBTerrestrialChannel* channel, GError** error) { - GError * _inner_error_; - char** _tmp0_; - gint elements_size; - gint elements_length1; - char** elements; - char* _tmp1_; - char* _tmp2_; - char* _tmp3_; - char* _tmp4_; - char* _tmp5_; - char* _tmp6_; - char* _tmp7_; - char* _tmp8_; - char* _tmp9_; - char* buffer; - g_return_if_fail (self != NULL); - g_return_if_fail (channel != NULL); - _inner_error_ = NULL; - elements = (_tmp0_ = g_new0 (char*, 9 + 1), elements_length1 = 9, elements_size = elements_length1, _tmp0_); - elements[0] = (_tmp1_ = g_strdup_printf ("%u", dvb_channel_get_Frequency ((DVBChannel*) channel)), _g_free0 (elements[0]), _tmp1_); - elements[1] = (_tmp2_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) dvb_terrestrial_channel_get_Inversion (channel), "DVB_DVB_SRC_INVERSION_"), _g_free0 (elements[1]), _tmp2_); - elements[2] = (_tmp3_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) dvb_terrestrial_channel_get_Bandwidth (channel), "DVB_DVB_SRC_BANDWIDTH_"), _g_free0 (elements[2]), _tmp3_); - elements[3] = (_tmp4_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_terrestrial_channel_get_CodeRateHP (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[3]), _tmp4_); - elements[4] = (_tmp5_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_terrestrial_channel_get_CodeRateLP (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[4]), _tmp5_); - elements[5] = (_tmp6_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) dvb_terrestrial_channel_get_Constellation (channel), "DVB_DVB_SRC_MODULATION_"), _g_free0 (elements[5]), _tmp6_); - elements[6] = (_tmp7_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) dvb_terrestrial_channel_get_TransmissionMode (channel), "DVB_DVB_SRC_TRANSMISSION_MODE_"), _g_free0 (elements[6]), _tmp7_); - elements[7] = (_tmp8_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_GUARD, (gint) dvb_terrestrial_channel_get_GuardInterval (channel), "DVB_DVB_SRC_GUARD_"), _g_free0 (elements[7]), _tmp8_); - elements[8] = (_tmp9_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) dvb_terrestrial_channel_get_Hierarchy (channel), "DVB_DVB_SRC_HIERARCHY_"), _g_free0 (elements[8]), _tmp9_); - buffer = g_strjoinv (":", elements); - g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (buffer); - return; - } - elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (buffer); -} - - -static void dvb_channel_list_writer_write_satellite_channel (DVBChannelListWriter* self, DVBSatelliteChannel* channel, GError** error) { - GError * _inner_error_; - char* buffer; - g_return_if_fail (self != NULL); - g_return_if_fail (channel != NULL); - _inner_error_ = NULL; - buffer = g_strdup_printf ("%u:%s:%d:%u", dvb_channel_get_Frequency ((DVBChannel*) channel) / 1000, dvb_satellite_channel_get_Polarization (channel), dvb_satellite_channel_get_DiseqcSource (channel), dvb_satellite_channel_get_SymbolRate (channel)); - g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (buffer); - return; - } - _g_free0 (buffer); -} - - -static void dvb_channel_list_writer_write_cable_channel (DVBChannelListWriter* self, DVBCableChannel* channel, GError** error) { - GError * _inner_error_; - char** _tmp0_; - gint elements_size; - gint elements_length1; - char** elements; - char* _tmp1_; - char* _tmp2_; - char* _tmp3_; - char* _tmp4_; - char* _tmp5_; - char* buffer; - g_return_if_fail (self != NULL); - g_return_if_fail (channel != NULL); - _inner_error_ = NULL; - elements = (_tmp0_ = g_new0 (char*, 5 + 1), elements_length1 = 5, elements_size = elements_length1, _tmp0_); - elements[0] = (_tmp1_ = g_strdup_printf ("%u", dvb_channel_get_Frequency ((DVBChannel*) channel)), _g_free0 (elements[0]), _tmp1_); - elements[1] = (_tmp2_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) dvb_cable_channel_get_Inversion (channel), "DVB_DVB_SRC_INVERSION_"), _g_free0 (elements[1]), _tmp2_); - elements[2] = (_tmp3_ = g_strdup_printf ("%u", dvb_cable_channel_get_SymbolRate (channel) * 1000), _g_free0 (elements[2]), _tmp3_); - elements[3] = (_tmp4_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_cable_channel_get_CodeRate (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[3]), _tmp4_); - elements[4] = (_tmp5_ = dvb_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) dvb_cable_channel_get_Modulation (channel), "DVB_DVB_SRC_MODULATION_"), _g_free0 (elements[4]), _tmp5_); - buffer = g_strjoinv (":", elements); - g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (buffer); - return; - } - elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (buffer); -} - - -static char* string_substring (const char* self, glong offset, glong len) { - char* result; - glong string_length; - const char* start; - g_return_val_if_fail (self != NULL, NULL); - string_length = g_utf8_strlen (self, -1); - 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); - start = g_utf8_offset_to_pointer (self, offset); - result = g_strndup (start, ((gchar*) g_utf8_offset_to_pointer (start, len)) - ((gchar*) start)); - return result; -} - - -static char* dvb_channel_list_writer_get_name_without_prefix (GType enumtype, gint val, const char* prefix) { - char* result; - char* name; - g_return_val_if_fail (prefix != NULL, NULL); - name = g_strdup (dvb_utils_get_name_by_value_from_enum (enumtype, val)); - if (name == NULL) { - result = NULL; - _g_free0 (name); - return result; - } else { - result = string_substring (name, g_utf8_strlen (prefix, -1), g_utf8_strlen (name, -1) - g_utf8_strlen (prefix, -1)); - _g_free0 (name); - return result; - } - _g_free0 (name); -} - - -GFile* dvb_channel_list_writer_get_file (DVBChannelListWriter* self) { - GFile* result; - g_return_val_if_fail (self != NULL, NULL); - result = self->priv->_file; - return result; -} - - -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - -static void dvb_channel_list_writer_set_file (DVBChannelListWriter* self, GFile* value) { - GFile* _tmp0_; - g_return_if_fail (self != NULL); - self->priv->_file = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_file), _tmp0_); - g_object_notify ((GObject *) self, "file"); -} - - -static void dvb_channel_list_writer_class_init (DVBChannelListWriterClass * klass) { - dvb_channel_list_writer_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBChannelListWriterPrivate)); - G_OBJECT_CLASS (klass)->get_property = dvb_channel_list_writer_get_property; - G_OBJECT_CLASS (klass)->set_property = dvb_channel_list_writer_set_property; - G_OBJECT_CLASS (klass)->finalize = dvb_channel_list_writer_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_LIST_WRITER_FILE, g_param_spec_object ("file", "file", "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)); -} - - -static void dvb_channel_list_writer_instance_init (DVBChannelListWriter * self) { - self->priv = DVB_CHANNEL_LIST_WRITER_GET_PRIVATE (self); -} - - -static void dvb_channel_list_writer_finalize (GObject* obj) { - DVBChannelListWriter * self; - self = DVB_CHANNEL_LIST_WRITER (obj); - _g_object_unref0 (self->priv->_file); - _g_object_unref0 (self->priv->stream); - G_OBJECT_CLASS (dvb_channel_list_writer_parent_class)->finalize (obj); -} - - -GType dvb_channel_list_writer_get_type (void) { - static GType dvb_channel_list_writer_type_id = 0; - if (dvb_channel_list_writer_type_id == 0) { - static const GTypeInfo g_define_type_info = { sizeof (DVBChannelListWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_list_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelListWriter), 0, (GInstanceInitFunc) dvb_channel_list_writer_instance_init, NULL }; - dvb_channel_list_writer_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelListWriter", &g_define_type_info, 0); - } - return dvb_channel_list_writer_type_id; -} - - -static void dvb_channel_list_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBChannelListWriter * self; - self = DVB_CHANNEL_LIST_WRITER (object); - switch (property_id) { - case DVB_CHANNEL_LIST_WRITER_FILE: - g_value_set_object (value, dvb_channel_list_writer_get_file (self)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static void dvb_channel_list_writer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - DVBChannelListWriter * self; - self = DVB_CHANNEL_LIST_WRITER (object); - switch (property_id) { - case DVB_CHANNEL_LIST_WRITER_FILE: - dvb_channel_list_writer_set_file (self, g_value_get_object (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -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.16/src/ChannelListWriter.vala gnome-dvb-daemon-0.1.21/src/ChannelListWriter.vala --- gnome-dvb-daemon-0.1.16/src/ChannelListWriter.vala 2010-03-17 19:06:52.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ChannelListWriter.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright (C) 2008,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 . - */ - -using GLib; - -namespace DVB { - - /** - * Example: - * try { - * var writer = new DVB.ChannelListWriter (File.new_for_path ("/path/to/channels.conf")); - * foreach (DVB.Channel c in reader.Channels) { - * writer.write (c); - * } - * writer.close (); - * } catch (IOError e) { - * error (e.message); - * } - */ - public class ChannelListWriter : GLib.Object { - - public File file {get; construct;} - - private OutputStream stream; - - private void open_stream () throws Error { - FileOutputStream fostream = null; - - if (file.query_exists (null)) { - fostream = this.file.replace (null, true, 0, null); - } else { - fostream = this.file.create (0, null); - } - - this.stream = new BufferedOutputStream (fostream); - } - - public ChannelListWriter (File file) { - base (file: file); - } - - public void write (Channel channel) throws Error { - if (this.stream == null) this.open_stream (); - if (this.stream == null) return; - - string buffer; - - // Write channel name - buffer = "%s:".printf (channel.Name); - this.stream.write_all (buffer, buffer.size(), null, null); - - // Write special data - if (channel is TerrestrialChannel) { - this.write_terrestrial_channel ((TerrestrialChannel)channel); - } else if (channel is SatelliteChannel) { - this.write_satellite_channel ((SatelliteChannel)channel); - } else if (channel is CableChannel) { - this.write_cable_channel ((CableChannel)channel); - } else { - warning ("Unknown channel type"); - } - - uint apid; - if (channel.AudioPIDs.size == 0) - apid = 0; - else - apid = channel.AudioPIDs.get (0); - - // Write common data - buffer = ":%u:%u:%u\n".printf (channel.VideoPID, - apid, channel.Sid); - this.stream.write_all (buffer, buffer.size(), null, null); - } - - public bool close () throws Error { - if (this.stream == null) return true; - return this.stream.close (null); - } - - private void write_terrestrial_channel (TerrestrialChannel channel) throws Error { - string[] elements = new string[9]; - - elements[0] = "%u".printf (channel.Frequency); - - elements[1] = get_name_without_prefix (typeof(DvbSrcInversion), - channel.Inversion, - "DVB_DVB_SRC_INVERSION_"); - - elements[2] = get_name_without_prefix (typeof(DvbSrcBandwidth), - channel.Bandwidth, - "DVB_DVB_SRC_BANDWIDTH_"); - - elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate), - channel.CodeRateHP, - "DVB_DVB_SRC_CODE_RATE_"); - - elements[4] = get_name_without_prefix (typeof(DvbSrcCodeRate), - channel.CodeRateLP, - "DVB_DVB_SRC_CODE_RATE_"); - - elements[5] = get_name_without_prefix (typeof(DvbSrcModulation), - channel.Constellation, - "DVB_DVB_SRC_MODULATION_"); - - elements[6] = get_name_without_prefix (typeof(DvbSrcTransmissionMode), - channel.TransmissionMode, - "DVB_DVB_SRC_TRANSMISSION_MODE_"); - - elements[7] = get_name_without_prefix (typeof(DvbSrcGuard), - channel.GuardInterval, - "DVB_DVB_SRC_GUARD_"); - - elements[8] = get_name_without_prefix (typeof(DvbSrcHierarchy), - channel.Hierarchy, - "DVB_DVB_SRC_HIERARCHY_"); - - string buffer = string.joinv (":", elements); - this.stream.write_all (buffer, buffer.size(), null, null); - } - - private void write_satellite_channel (SatelliteChannel channel) throws Error { - string buffer = "%u:%s:%d:%u".printf (channel.Frequency / 1000, - channel.Polarization, - channel.DiseqcSource, - channel.SymbolRate); - this.stream.write_all (buffer, buffer.size(), null, null); - } - - private void write_cable_channel (CableChannel channel) throws Error { - string[] elements = new string [5]; - - elements[0] = "%u".printf (channel.Frequency); - - elements[1] = get_name_without_prefix (typeof(DvbSrcInversion), - channel.Inversion, - "DVB_DVB_SRC_INVERSION_"); - - elements[2] = "%u".printf (channel.SymbolRate * 1000); - - elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate), - channel.CodeRate, - "DVB_DVB_SRC_CODE_RATE_"); - - elements[4] = get_name_without_prefix (typeof(DvbSrcModulation), - channel.Modulation, - "DVB_DVB_SRC_MODULATION_"); - - string buffer = string.joinv (":", elements); - this.stream.write_all (buffer, buffer.size(), null, null); - } - - private static string? get_name_without_prefix (GLib.Type enumtype, - int val, string prefix) { - string? name = Utils.get_name_by_value_from_enum (enumtype, - val); - if (name == null) return null; - else return name.substring (prefix.len (), - name.len () - prefix.len ()); - } - - } - -} diff -Nru gnome-dvb-daemon-0.1.16/src/Channel.vala gnome-dvb-daemon-0.1.21/src/Channel.vala --- gnome-dvb-daemon-0.1.16/src/Channel.vala 2010-03-17 19:06:52.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Channel.vala 2010-08-17 13:26:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -27,7 +27,8 @@ get { return this.sid; } set { this.sid = value; - this.schedule = new DVB.Schedule (this); + if (this.has_schedule) + this.schedule = new DVB.Schedule (this); } } public uint GroupId {get; set;} @@ -44,17 +45,27 @@ } public string URL { owned get { - return "rtsp://%s:8554/%u/%u".printf ( - Environment.get_host_name(), this.GroupId, this.Sid); + return "rtsp://%s:8554/%u/%u/%s".printf ( + Environment.get_host_name(), this.GroupId, this.Sid, + Utils.remove_nonalphanums (this.Name)); } } private DVB.Schedule schedule; private uint sid; + private bool has_schedule; construct { this.AudioPIDs = new Gee.ArrayList (); } + + public Channel () { + this.has_schedule = true; + } + + public Channel.without_schedule () { + this.has_schedule = false; + } public string get_audio_pids_string () { StringBuilder apids = new StringBuilder (); diff -Nru gnome-dvb-daemon-0.1.16/src/Constants.c gnome-dvb-daemon-0.1.21/src/Constants.c --- gnome-dvb-daemon-0.1.16/src/Constants.c 2010-02-23 13:10:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Constants.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Constants.c generated by valac, the Vala compiler +/* Constants.c generated by valac 0.9.7, the Vala compiler * generated from Constants.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.16/src/database/ConfigStore.c gnome-dvb-daemon-0.1.21/src/database/ConfigStore.c --- gnome-dvb-daemon-0.1.16/src/database/ConfigStore.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/ConfigStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ConfigStore.c generated by valac, the Vala compiler +/* ConfigStore.c generated by valac 0.9.7, the Vala compiler * generated from ConfigStore.vala, do not modify */ /* @@ -112,6 +112,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -122,18 +123,19 @@ -GType dvb_device_group_get_type (void); +GType dvb_device_group_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_device_get_type (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (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; GeeList* dvb_database_config_store_get_all_device_groups (DVBdatabaseConfigStore* self, GError** error); gboolean dvb_database_config_store_add_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* dev_group, GError** error); gboolean dvb_database_config_store_remove_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); gboolean dvb_database_config_store_add_device_to_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean dvb_database_config_store_remove_device_from_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean dvb_database_config_store_update_from_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); +gboolean dvb_database_config_store_get_parent_group (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean dvb_database_config_store_add_channel_group (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean dvb_database_config_store_remove_channel_group (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* dvb_database_config_store_get_channel_groups (DVBdatabaseConfigStore* self, GError** error); @@ -173,6 +175,11 @@ } +gboolean dvb_database_config_store_get_parent_group (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error) { + 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 char* name, gint* channel_group_id, GError** error) { return DVB_DATABASE_CONFIG_STORE_GET_INTERFACE (self)->add_channel_group (self, name, channel_group_id, error); } @@ -212,13 +219,15 @@ GType dvb_database_config_store_get_type (void) { - static GType dvb_database_config_store_type_id = 0; - if (dvb_database_config_store_type_id == 0) { + static volatile gsize dvb_database_config_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_config_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabaseConfigStoreIface), (GBaseInitFunc) dvb_database_config_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_database_config_store_type_id; dvb_database_config_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBdatabaseConfigStore", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_database_config_store_type_id, G_TYPE_OBJECT); + g_once_init_leave (&dvb_database_config_store_type_id__volatile, dvb_database_config_store_type_id); } - return dvb_database_config_store_type_id; + return dvb_database_config_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/database/ConfigStore.vala gnome-dvb-daemon-0.1.21/src/database/ConfigStore.vala --- gnome-dvb-daemon-0.1.16/src/database/ConfigStore.vala 2009-10-15 10:03:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/ConfigStore.vala 2010-05-10 17:06:39.000000000 +0000 @@ -30,6 +30,8 @@ public abstract bool remove_device_from_group (Device dev, DeviceGroup devgroup) throws SqlError; public abstract bool update_from_group (DeviceGroup devgroup) throws SqlError; + public abstract bool get_parent_group (uint adapter, uint frontend, out uint group_id) throws SqlError; + public abstract bool add_channel_group (string name, out int channel_group_id) throws SqlError; public abstract bool remove_channel_group (int group_id) throws SqlError; public abstract Gee.List get_channel_groups () throws SqlError; diff -Nru gnome-dvb-daemon-0.1.16/src/database/EPGStore.c gnome-dvb-daemon-0.1.21/src/database/EPGStore.c --- gnome-dvb-daemon-0.1.16/src/database/EPGStore.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/EPGStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* EPGStore.c generated by valac, the Vala compiler +/* EPGStore.c generated by valac 0.9.7, the Vala compiler * generated from EPGStore.vala, do not modify */ /* @@ -77,6 +77,7 @@ gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -88,13 +89,15 @@ 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); +GType dvb_event_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_database_epg_store_get_type (void); +GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; gboolean dvb_database_epg_store_add_or_update_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* dvb_database_epg_store_get_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean dvb_database_epg_store_remove_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); +gboolean dvb_database_epg_store_remove_events_older_than (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean dvb_database_epg_store_contains_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* dvb_database_epg_store_get_events (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean dvb_database_epg_store_remove_events_of_group (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -116,6 +119,11 @@ } +gboolean dvb_database_epg_store_remove_events_older_than (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { + 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) { return DVB_DATABASE_EPG_STORE_GET_INTERFACE (self)->contains_event (self, event, channel_sid, group_id, error); } @@ -140,13 +148,15 @@ GType dvb_database_epg_store_get_type (void) { - static GType dvb_database_epg_store_type_id = 0; - if (dvb_database_epg_store_type_id == 0) { + static volatile gsize dvb_database_epg_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_epg_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabaseEPGStoreIface), (GBaseInitFunc) dvb_database_epg_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_database_epg_store_type_id; dvb_database_epg_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBdatabaseEPGStore", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_database_epg_store_type_id, G_TYPE_OBJECT); + g_once_init_leave (&dvb_database_epg_store_type_id__volatile, dvb_database_epg_store_type_id); } - return dvb_database_epg_store_type_id; + return dvb_database_epg_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/database/EPGStore.vala gnome-dvb-daemon-0.1.21/src/database/EPGStore.vala --- gnome-dvb-daemon-0.1.16/src/database/EPGStore.vala 2009-09-24 14:00:40.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/EPGStore.vala 2010-05-20 21:09:57.000000000 +0000 @@ -26,6 +26,7 @@ public abstract bool add_or_update_event (Event event, uint channel_sid, uint group_id) throws SqlError; public abstract Event? get_event (uint event_id, uint channel_sid, uint group_id) throws SqlError; public abstract bool remove_event (uint event_id, uint channel_sid, uint group_id) throws SqlError; + public abstract bool remove_events_older_than (Event event, uint channel_sid, uint group_id) throws SqlError; public abstract bool contains_event (Event event, uint channel_sid, uint group_id) throws SqlError; public abstract Gee.List get_events (uint channel_sid, uint group_id) throws SqlError; public abstract bool remove_events_of_group (uint group_id) throws SqlError; diff -Nru gnome-dvb-daemon-0.1.16/src/database/SqlError.c gnome-dvb-daemon-0.1.21/src/database/SqlError.c --- gnome-dvb-daemon-0.1.16/src/database/SqlError.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/SqlError.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqlError.c generated by valac, the Vala compiler +/* SqlError.c generated by valac 0.9.7, the Vala compiler * generated from SqlError.vala, do not modify */ /* diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteConfigTimersStore.c gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteConfigTimersStore.c --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteConfigTimersStore.c 2010-03-17 19:35:05.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteConfigTimersStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteConfigTimersStore.c generated by valac, the Vala compiler +/* SqliteConfigTimersStore.c generated by valac 0.9.7, the Vala compiler * generated from SqliteConfigTimersStore.vala, do not modify */ /* @@ -118,8 +118,7 @@ typedef struct _DVBdatabasesqliteSqliteConfigTimersStorePrivate DVBdatabasesqliteSqliteConfigTimersStorePrivate; #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 DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) #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)) @@ -130,7 +129,8 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) #define _g_free0(var) (var = (g_free (var), NULL)) typedef enum { @@ -183,6 +183,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -216,6 +217,7 @@ sqlite3_stmt* delete_device_statement; sqlite3_stmt* delete_group_devices_statement; sqlite3_stmt* insert_device_statement; + sqlite3_stmt* select_group_of_device_statement; sqlite3_stmt* select_timers_statement; sqlite3_stmt* delete_timer_statement; sqlite3_stmt* delete_group_timers_statement; @@ -232,6 +234,10 @@ }; typedef enum { + DVB_DEVICE_ERROR_UNKNOWN_TYPE +} DVBDeviceError; +#define DVB_DEVICE_ERROR dvb_device_error_quark () +typedef enum { DVB_ADAPTER_TYPE_UNKNOWN, DVB_ADAPTER_TYPE_DVB_T, DVB_ADAPTER_TYPE_DVB_S, @@ -243,16 +249,16 @@ 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; -GType dvb_database_sqlite_sqlite_database_get_type (void); +GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_device_group_get_type (void); -GType dvb_device_get_type (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (void); -GType dvb_timer_get_type (void); -GType dvb_database_timers_store_get_type (void); -GType dvb_database_sqlite_sqlite_config_timers_store_get_type (void); +GType dvb_device_group_get_type (void) G_GNUC_CONST; +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; +GType dvb_timer_get_type (void) G_GNUC_CONST; +GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; +GType dvb_database_sqlite_sqlite_config_timers_store_get_type (void) G_GNUC_CONST; #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_DATABASE_SQLITE_TYPE_SQLITE_CONFIG_TIMERS_STORE, DVBdatabasesqliteSqliteConfigTimersStorePrivate)) enum { DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DUMMY_PROPERTY @@ -294,17 +300,18 @@ #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_DEVICES "SELECT * FROM devices WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP "DELETE FROM device_groups WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_GROUP "INSERT INTO device_groups VALUES (?, ?, ?, ?, ?)" -#define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP "SELECT COUNT(*) FROM device_groups WHERE group_id=?" +#define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP "SELECT 1 FROM device_groups WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_UPDATE_GROUP "UPDATE device_groups SET adapter_type=?, channels_file=?, recordings_d" \ "ir=?, name=? WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_DEVICE "DELETE FROM devices WHERE adapter=? AND frontend=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_DEVICES "DELETE FROM devices WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_DEVICE "INSERT INTO devices VALUES (?, ?, ?)" +#define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_GROUP_OF_DEVICE "SELECT group_id FROM devices WHERE adapter=? AND frontend=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_TIMERS "SELECT * FROM timers WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_TIMER "DELETE FROM timers WHERE timer_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_TIMERS "DELETE FROM timers WHERE group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_TIMER "INSERT INTO timers VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" -#define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER "SELECT COUNT(*) FROM timers WHERE timer_id=?" +#define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER "SELECT 1 FROM timers WHERE timer_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_CHANNEL_GROUP "INSERT INTO channel_groups (name) VALUES (?)" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_CHANNEL_GROUP "DELETE FROM channel_groups WHERE channel_group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_ALL_CHANNEL_GROUP "DELETE FROM channels WHERE channel_group_id=?" @@ -312,46 +319,48 @@ #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_ADD_CHANNEL_GROUP "INSERT INTO channels VALUES (?, ?, ?)" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_CHANNEL_GROUP "DELETE FROM channels WHERE sid=? AND group_id=? AND channel_group_id=?" #define DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNELS "SELECT sid FROM channels WHERE group_id=? AND channel_group_id=?" -DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version); 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_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error); +DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version); static void dvb_database_sqlite_sqlite_config_timers_store_real_create (DVBdatabasesqliteSqliteDatabase* base, GError** error); +void dvb_database_sqlite_sqlite_database_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error); static void dvb_database_sqlite_sqlite_config_timers_store_real_upgrade (DVBdatabasesqliteSqliteDatabase* base, gint old_version, gint new_version, GError** error); static void dvb_database_sqlite_sqlite_config_timers_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base); +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 char* errmsg, GError** error); -DVBDevice* dvb_device_new (guint adapter, guint frontend, gboolean get_type_and_name); -DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend, gboolean get_type_and_name); -GType dvb_adapter_type_get_type (void); -GType dvb_channel_list_get_type (void); -DVBChannelList* dvb_channel_list_restore_from_file (GFile* channelsfile, DVBAdapterType type, guint group_id, GError** error); -void dvb_device_set_Channels (DVBDevice* self, DVBChannelList* value); -void dvb_device_set_RecordingsDirectory (DVBDevice* self, GFile* value); +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_with_type (guint adapter, guint frontend); 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); void dvb_device_group_set_Name (DVBDeviceGroup* self, const char* value); gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device); -static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups (DVBdatabaseConfigStore* base, GError** error); +static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* dev_group, GError** error); gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_group (DVBdatabasesqliteSqliteConfigTimersStore* self, guint group_id, GError** error); guint dvb_device_group_get_Id (DVBDeviceGroup* self); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); GFile* dvb_channel_list_get_channels_file (DVBChannelList* self); GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self); +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; DVBAdapterType dvb_device_group_get_Type (DVBDeviceGroup* self); const char* dvb_device_group_get_Name (DVBDeviceGroup* self); +void dvb_database_sqlite_sqlite_database_begin_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error); gboolean dvb_database_config_store_add_device_to_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); -static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* dev_group, GError** error); +void dvb_database_sqlite_sqlite_database_end_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* devgroup, GError** error); +static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_get_parent_group (DVBdatabaseConfigStore* base, guint adapter, guint frontend, guint* group_id, GError** error); +static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group (DVBdatabaseConfigStore* base, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); guint dvb_device_get_Adapter (DVBDevice* self); guint dvb_device_get_Frontend (DVBDevice* self); -static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group (DVBdatabaseConfigStore* base, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_from_group (DVBdatabaseConfigStore* base, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); +static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_timers_of_device_group (DVBdatabaseTimersStore* base, DVBDeviceGroup* dev, GError** error); DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); DVBTimer* dvb_timer_new (guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); DVBTimer* dvb_timer_construct (GType object_type, guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); void dvb_timer_set_EventID (DVBTimer* self, guint value); -static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_all_timers_of_device_group (DVBdatabaseTimersStore* base, DVBDeviceGroup* dev, GError** error); +static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_timer_to_device_group (DVBdatabaseTimersStore* base, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_timer (DVBdatabasesqliteSqliteConfigTimersStore* self, guint timer_id, GError** error); guint32 dvb_timer_get_Id (DVBTimer* self); guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1); @@ -359,18 +368,17 @@ guint dvb_channel_get_Sid (DVBChannel* self); guint dvb_timer_get_Duration (DVBTimer* self); guint dvb_timer_get_EventID (DVBTimer* self); -static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_timer_to_device_group (DVBdatabaseTimersStore* base, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_timer_from_device_group (DVBdatabaseTimersStore* base, guint timer_id, DVBDeviceGroup* dev, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_all_timers_from_device_group (DVBdatabaseTimersStore* base, guint group_id, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_update_from_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* devgroup, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_group (DVBdatabaseConfigStore* base, const char* name, gint* channel_group_id, GError** error); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_group (DVBdatabaseConfigStore* base, gint group_id, GError** error); +static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups (DVBdatabaseConfigStore* base, GError** error); DVBChannelGroup* dvb_channel_group_new (gint id, const char* name); DVBChannelGroup* dvb_channel_group_construct (GType object_type, gint id, const char* name); -static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups (DVBdatabaseConfigStore* base, GError** error); static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channels_of_group (DVBdatabaseConfigStore* base, guint dev_group_id, gint channel_group_id, GError** error); -guint dvb_channel_get_GroupId (DVBChannel* self); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_to_group (DVBdatabaseConfigStore* base, DVBChannel* channel, gint group_id, GError** error); +guint dvb_channel_get_GroupId (DVBChannel* self); static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_from_group (DVBdatabaseConfigStore* base, DVBChannel* channel, gint group_id, GError** error); static void dvb_database_sqlite_sqlite_config_timers_store_finalize (GObject* obj); @@ -385,9 +393,9 @@ config_cache = g_file_get_child (config_dir, "gnome-dvb-daemon"); dbfile = g_file_get_child (config_cache, "configtimers.sqlite3"); self = (DVBdatabasesqliteSqliteConfigTimersStore*) dvb_database_sqlite_sqlite_database_construct (object_type, dbfile, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_VERSION); - _g_object_unref0 (config_dir); - _g_object_unref0 (config_cache); _g_object_unref0 (dbfile); + _g_object_unref0 (config_cache); + _g_object_unref0 (config_dir); return self; } @@ -399,9 +407,8 @@ static void dvb_database_sqlite_sqlite_config_timers_store_real_create (DVBdatabasesqliteSqliteDatabase* base, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - GError * _inner_error_; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _inner_error_ = NULL; dvb_database_sqlite_sqlite_database_exec_sql ((DVBdatabasesqliteSqliteDatabase*) self, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CREATE_DEVICE_GROUPS, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -468,141 +475,104 @@ static void dvb_database_sqlite_sqlite_config_timers_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base) { DVBdatabasesqliteSqliteConfigTimersStore * self; - sqlite3_stmt* _tmp2_; - gint _tmp1_; sqlite3_stmt* _tmp0_ = NULL; + sqlite3_stmt* _tmp1_; + sqlite3_stmt* _tmp2_ = NULL; + sqlite3_stmt* _tmp3_; + sqlite3_stmt* _tmp4_ = NULL; sqlite3_stmt* _tmp5_; - gint _tmp4_; - sqlite3_stmt* _tmp3_ = NULL; - sqlite3_stmt* _tmp8_; - gint _tmp7_; sqlite3_stmt* _tmp6_ = NULL; + sqlite3_stmt* _tmp7_; + sqlite3_stmt* _tmp8_ = NULL; + sqlite3_stmt* _tmp9_; + sqlite3_stmt* _tmp10_ = NULL; sqlite3_stmt* _tmp11_; - gint _tmp10_; - sqlite3_stmt* _tmp9_ = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp13_; sqlite3_stmt* _tmp12_ = NULL; + sqlite3_stmt* _tmp13_; + sqlite3_stmt* _tmp14_ = NULL; + sqlite3_stmt* _tmp15_; + sqlite3_stmt* _tmp16_ = NULL; sqlite3_stmt* _tmp17_; - gint _tmp16_; - sqlite3_stmt* _tmp15_ = NULL; - sqlite3_stmt* _tmp20_; - gint _tmp19_; sqlite3_stmt* _tmp18_ = NULL; + sqlite3_stmt* _tmp19_; + sqlite3_stmt* _tmp20_ = NULL; + sqlite3_stmt* _tmp21_; + sqlite3_stmt* _tmp22_ = NULL; sqlite3_stmt* _tmp23_; - gint _tmp22_; - sqlite3_stmt* _tmp21_ = NULL; - sqlite3_stmt* _tmp26_; - gint _tmp25_; sqlite3_stmt* _tmp24_ = NULL; + sqlite3_stmt* _tmp25_; + sqlite3_stmt* _tmp26_ = NULL; + sqlite3_stmt* _tmp27_; + sqlite3_stmt* _tmp28_ = NULL; sqlite3_stmt* _tmp29_; - gint _tmp28_; - sqlite3_stmt* _tmp27_ = NULL; - sqlite3_stmt* _tmp32_; - gint _tmp31_; sqlite3_stmt* _tmp30_ = NULL; + sqlite3_stmt* _tmp31_; + sqlite3_stmt* _tmp32_ = NULL; + sqlite3_stmt* _tmp33_; + sqlite3_stmt* _tmp34_ = NULL; sqlite3_stmt* _tmp35_; - gint _tmp34_; - sqlite3_stmt* _tmp33_ = NULL; - sqlite3_stmt* _tmp38_; - gint _tmp37_; sqlite3_stmt* _tmp36_ = NULL; + sqlite3_stmt* _tmp37_; + sqlite3_stmt* _tmp38_ = NULL; + sqlite3_stmt* _tmp39_; + sqlite3_stmt* _tmp40_ = NULL; sqlite3_stmt* _tmp41_; - gint _tmp40_; - sqlite3_stmt* _tmp39_ = NULL; - sqlite3_stmt* _tmp44_; - gint _tmp43_; - sqlite3_stmt* _tmp42_ = NULL; - sqlite3_stmt* _tmp47_; - gint _tmp46_; - sqlite3_stmt* _tmp45_ = NULL; - sqlite3_stmt* _tmp50_; - gint _tmp49_; - sqlite3_stmt* _tmp48_ = NULL; - sqlite3_stmt* _tmp53_; - gint _tmp52_; - sqlite3_stmt* _tmp51_ = NULL; - sqlite3_stmt* _tmp56_; - gint _tmp55_; - sqlite3_stmt* _tmp54_ = NULL; - sqlite3_stmt* _tmp59_; - gint _tmp58_; - sqlite3_stmt* _tmp57_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _tmp1_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_DEVICES, -1, &_tmp0_, NULL); - self->priv->select_devices_statement = (_tmp2_ = _tmp0_, _sqlite3_finalize0 (self->priv->select_devices_statement), _tmp2_); - _tmp1_; - _tmp4_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP, -1, &_tmp3_, NULL); - self->priv->delete_group_statement = (_tmp5_ = _tmp3_, _sqlite3_finalize0 (self->priv->delete_group_statement), _tmp5_); - _tmp4_; - _tmp7_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_GROUP, -1, &_tmp6_, NULL); - self->priv->insert_group_statement = (_tmp8_ = _tmp6_, _sqlite3_finalize0 (self->priv->insert_group_statement), _tmp8_); - _tmp7_; - _tmp10_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_UPDATE_GROUP, -1, &_tmp9_, NULL); - self->priv->update_group_statement = (_tmp11_ = _tmp9_, _sqlite3_finalize0 (self->priv->update_group_statement), _tmp11_); - _tmp10_; - _tmp13_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_DEVICE, -1, &_tmp12_, NULL); - self->priv->delete_device_statement = (_tmp14_ = _tmp12_, _sqlite3_finalize0 (self->priv->delete_device_statement), _tmp14_); - _tmp13_; - _tmp16_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_DEVICES, -1, &_tmp15_, NULL); - self->priv->delete_group_devices_statement = (_tmp17_ = _tmp15_, _sqlite3_finalize0 (self->priv->delete_group_devices_statement), _tmp17_); - _tmp16_; - _tmp19_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_DEVICE, -1, &_tmp18_, NULL); - self->priv->insert_device_statement = (_tmp20_ = _tmp18_, _sqlite3_finalize0 (self->priv->insert_device_statement), _tmp20_); - _tmp19_; - _tmp22_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_TIMERS, -1, &_tmp21_, NULL); - self->priv->select_timers_statement = (_tmp23_ = _tmp21_, _sqlite3_finalize0 (self->priv->select_timers_statement), _tmp23_); - _tmp22_; - _tmp25_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_TIMER, -1, &_tmp24_, NULL); - self->priv->delete_timer_statement = (_tmp26_ = _tmp24_, _sqlite3_finalize0 (self->priv->delete_timer_statement), _tmp26_); - _tmp25_; - _tmp28_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_TIMERS, -1, &_tmp27_, NULL); - self->priv->delete_group_timers_statement = (_tmp29_ = _tmp27_, _sqlite3_finalize0 (self->priv->delete_group_timers_statement), _tmp29_); - _tmp28_; - _tmp31_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_TIMER, -1, &_tmp30_, NULL); - self->priv->insert_timer_statement = (_tmp32_ = _tmp30_, _sqlite3_finalize0 (self->priv->insert_timer_statement), _tmp32_); - _tmp31_; - _tmp34_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP, -1, &_tmp33_, NULL); - self->priv->contains_group_statement = (_tmp35_ = _tmp33_, _sqlite3_finalize0 (self->priv->contains_group_statement), _tmp35_); - _tmp34_; - _tmp37_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER, -1, &_tmp36_, NULL); - self->priv->contains_timer_statement = (_tmp38_ = _tmp36_, _sqlite3_finalize0 (self->priv->contains_timer_statement), _tmp38_); - _tmp37_; - _tmp40_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_CHANNEL_GROUP, -1, &_tmp39_, NULL); - self->priv->insert_channel_group_statement = (_tmp41_ = _tmp39_, _sqlite3_finalize0 (self->priv->insert_channel_group_statement), _tmp41_); - _tmp40_; - _tmp43_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_CHANNEL_GROUP, -1, &_tmp42_, NULL); - self->priv->delete_channel_group_statement = (_tmp44_ = _tmp42_, _sqlite3_finalize0 (self->priv->delete_channel_group_statement), _tmp44_); - _tmp43_; - _tmp46_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_ALL_CHANNEL_GROUP, -1, &_tmp45_, NULL); - self->priv->remove_all_channel_group_statement = (_tmp47_ = _tmp45_, _sqlite3_finalize0 (self->priv->remove_all_channel_group_statement), _tmp47_); - _tmp46_; - _tmp49_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNEL_GROUPS, -1, &_tmp48_, NULL); - self->priv->select_channel_groups_statement = (_tmp50_ = _tmp48_, _sqlite3_finalize0 (self->priv->select_channel_groups_statement), _tmp50_); - _tmp49_; - _tmp52_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_ADD_CHANNEL_GROUP, -1, &_tmp51_, NULL); - self->priv->add_channel_group_statement = (_tmp53_ = _tmp51_, _sqlite3_finalize0 (self->priv->add_channel_group_statement), _tmp53_); - _tmp52_; - _tmp55_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_CHANNEL_GROUP, -1, &_tmp54_, NULL); - self->priv->remove_channel_group_statement = (_tmp56_ = _tmp54_, _sqlite3_finalize0 (self->priv->remove_channel_group_statement), _tmp56_); - _tmp55_; - _tmp58_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNELS, -1, &_tmp57_, NULL); - self->priv->select_channels_statement = (_tmp59_ = _tmp57_, _sqlite3_finalize0 (self->priv->select_channels_statement), _tmp59_); - _tmp58_; + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_DEVICES, -1, &_tmp0_, NULL); + self->priv->select_devices_statement = (_tmp1_ = _tmp0_, _sqlite3_finalize0 (self->priv->select_devices_statement), _tmp1_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP, -1, &_tmp2_, NULL); + self->priv->delete_group_statement = (_tmp3_ = _tmp2_, _sqlite3_finalize0 (self->priv->delete_group_statement), _tmp3_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_GROUP, -1, &_tmp4_, NULL); + self->priv->insert_group_statement = (_tmp5_ = _tmp4_, _sqlite3_finalize0 (self->priv->insert_group_statement), _tmp5_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_UPDATE_GROUP, -1, &_tmp6_, NULL); + self->priv->update_group_statement = (_tmp7_ = _tmp6_, _sqlite3_finalize0 (self->priv->update_group_statement), _tmp7_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_DEVICE, -1, &_tmp8_, NULL); + self->priv->delete_device_statement = (_tmp9_ = _tmp8_, _sqlite3_finalize0 (self->priv->delete_device_statement), _tmp9_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_DEVICES, -1, &_tmp10_, NULL); + self->priv->delete_group_devices_statement = (_tmp11_ = _tmp10_, _sqlite3_finalize0 (self->priv->delete_group_devices_statement), _tmp11_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_DEVICE, -1, &_tmp12_, NULL); + self->priv->insert_device_statement = (_tmp13_ = _tmp12_, _sqlite3_finalize0 (self->priv->insert_device_statement), _tmp13_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_GROUP_OF_DEVICE, -1, &_tmp14_, NULL); + self->priv->select_group_of_device_statement = (_tmp15_ = _tmp14_, _sqlite3_finalize0 (self->priv->select_group_of_device_statement), _tmp15_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_TIMERS, -1, &_tmp16_, NULL); + self->priv->select_timers_statement = (_tmp17_ = _tmp16_, _sqlite3_finalize0 (self->priv->select_timers_statement), _tmp17_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_TIMER, -1, &_tmp18_, NULL); + self->priv->delete_timer_statement = (_tmp19_ = _tmp18_, _sqlite3_finalize0 (self->priv->delete_timer_statement), _tmp19_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_GROUP_TIMERS, -1, &_tmp20_, NULL); + self->priv->delete_group_timers_statement = (_tmp21_ = _tmp20_, _sqlite3_finalize0 (self->priv->delete_group_timers_statement), _tmp21_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_TIMER, -1, &_tmp22_, NULL); + self->priv->insert_timer_statement = (_tmp23_ = _tmp22_, _sqlite3_finalize0 (self->priv->insert_timer_statement), _tmp23_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_GROUP, -1, &_tmp24_, NULL); + self->priv->contains_group_statement = (_tmp25_ = _tmp24_, _sqlite3_finalize0 (self->priv->contains_group_statement), _tmp25_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_CONTAINS_TIMER, -1, &_tmp26_, NULL); + self->priv->contains_timer_statement = (_tmp27_ = _tmp26_, _sqlite3_finalize0 (self->priv->contains_timer_statement), _tmp27_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_INSERT_CHANNEL_GROUP, -1, &_tmp28_, NULL); + self->priv->insert_channel_group_statement = (_tmp29_ = _tmp28_, _sqlite3_finalize0 (self->priv->insert_channel_group_statement), _tmp29_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_DELETE_CHANNEL_GROUP, -1, &_tmp30_, NULL); + self->priv->delete_channel_group_statement = (_tmp31_ = _tmp30_, _sqlite3_finalize0 (self->priv->delete_channel_group_statement), _tmp31_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_ALL_CHANNEL_GROUP, -1, &_tmp32_, NULL); + self->priv->remove_all_channel_group_statement = (_tmp33_ = _tmp32_, _sqlite3_finalize0 (self->priv->remove_all_channel_group_statement), _tmp33_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNEL_GROUPS, -1, &_tmp34_, NULL); + self->priv->select_channel_groups_statement = (_tmp35_ = _tmp34_, _sqlite3_finalize0 (self->priv->select_channel_groups_statement), _tmp35_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_ADD_CHANNEL_GROUP, -1, &_tmp36_, NULL); + self->priv->add_channel_group_statement = (_tmp37_ = _tmp36_, _sqlite3_finalize0 (self->priv->add_channel_group_statement), _tmp37_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_REMOVE_CHANNEL_GROUP, -1, &_tmp38_, NULL); + self->priv->remove_channel_group_statement = (_tmp39_ = _tmp38_, _sqlite3_finalize0 (self->priv->remove_channel_group_statement), _tmp39_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_CHANNELS, -1, &_tmp40_, NULL); + self->priv->select_channels_statement = (_tmp41_ = _tmp40_, _sqlite3_finalize0 (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; - GError * _inner_error_; + GeeList* result = NULL; GeeList* groups; sqlite3_stmt* statement; - sqlite3_stmt* _tmp2_; - gint _tmp1_; sqlite3_stmt* _tmp0_ = NULL; + gint _tmp1_; + sqlite3_stmt* _tmp2_; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _inner_error_ = NULL; groups = (GeeList*) gee_array_list_new (DVB_TYPE_DEVICE_GROUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); statement = NULL; if ((_tmp1_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_CONFIG_TIMERS_STORE_SELECT_ALL_GROUPS, -1, &_tmp0_, NULL), statement = (_tmp2_ = _tmp0_, _sqlite3_finalize0 (statement), _tmp2_), _tmp1_) != SQLITE_OK) { @@ -610,12 +580,12 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (groups); _sqlite3_finalize0 (statement); + _g_object_unref0 (groups); return NULL; } else { - _g_object_unref0 (groups); _sqlite3_finalize0 (statement); + _g_object_unref0 (groups); 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; @@ -627,12 +597,9 @@ } while (TRUE) { gint group_id; - GeeList* devs; - gint group_type; - DVBAdapterType type = 0; GFile* channels_file; - DVBChannelList* channels; GFile* rec_dir; + GeeList* devs; DVBDevice* ref_dev; DVBDeviceGroup* group; if (!(sqlite3_step (statement) == SQLITE_ROW)) { @@ -645,12 +612,12 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (groups); _sqlite3_finalize0 (statement); + _g_object_unref0 (groups); return NULL; } else { - _g_object_unref0 (groups); _sqlite3_finalize0 (statement); + _g_object_unref0 (groups); 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; @@ -658,103 +625,92 @@ } continue; } + channels_file = g_file_new_for_path (sqlite3_column_text (statement, 2)); + rec_dir = g_file_new_for_path (sqlite3_column_text (statement, 3)); devs = (GeeList*) gee_array_list_new (DVB_TYPE_DEVICE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); + ref_dev = NULL; while (TRUE) { guint adapter; guint frontend; - DVBDevice* _tmp3_; if (!(sqlite3_step (self->priv->select_devices_statement) == SQLITE_ROW)) { break; } adapter = (guint) sqlite3_column_int (self->priv->select_devices_statement, 1); frontend = (guint) sqlite3_column_int (self->priv->select_devices_statement, 2); - gee_collection_add ((GeeCollection*) devs, _tmp3_ = dvb_device_new (adapter, frontend, TRUE)); - _g_object_unref0 (_tmp3_); + if (ref_dev == NULL) { + { + DVBDevice* _tmp3_; + DVBDevice* _tmp4_; + _tmp3_ = dvb_device_new_full (adapter, frontend, channels_file, rec_dir, (guint) group_id, &_inner_error_); + 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; + } + ref_dev = (_tmp4_ = _tmp3_, _g_object_unref0 (ref_dev), _tmp4_); + } + goto __finally8; + __catch8_dvb_device_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("SqliteConfigTimersStore.vala:266: Could not create device: %s", e->message); + _g_error_free0 (e); + } + } + __finally8: + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_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); + return NULL; + } else { + _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: 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; + } + } + } else { + DVBDevice* _tmp5_; + gee_collection_add ((GeeCollection*) devs, _tmp5_ = dvb_device_new_with_type (adapter, frontend)); + _g_object_unref0 (_tmp5_); + } } - if (gee_collection_get_size ((GeeCollection*) devs) == 0) { - g_debug ("SqliteConfigTimersStore.vala:254: Group %d has no devices", group_id); + if (ref_dev == NULL) { + g_debug ("SqliteConfigTimersStore.vala:275: Group %d has no devices", group_id); + _g_object_unref0 (ref_dev); _g_object_unref0 (devs); + _g_object_unref0 (rec_dir); + _g_object_unref0 (channels_file); continue; } - group_type = sqlite3_column_int (statement, 1); - switch (group_type) { - case 1: - { - type = DVB_ADAPTER_TYPE_DVB_T; - break; - } - case 2: - { - type = DVB_ADAPTER_TYPE_DVB_S; - break; - } - case 3: - { - type = DVB_ADAPTER_TYPE_DVB_C; - break; - } - default: - { - g_debug ("SqliteConfigTimersStore.vala:266: Group %d has unknown type %d", group_id, group_type); - continue; - } - } - channels_file = g_file_new_for_path (sqlite3_column_text (statement, 2)); - channels = NULL; - { - DVBChannelList* _tmp4_; - DVBChannelList* _tmp5_; - _tmp4_ = dvb_channel_list_restore_from_file (channels_file, type, (guint) group_id, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch10_g_error; - } - channels = (_tmp5_ = _tmp4_, _g_object_unref0 (channels), _tmp5_); - } - goto __finally10; - __catch10_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_warning ("SqliteConfigTimersStore.vala:279: Could not read channels: %s", e->message); - _g_error_free0 (e); - _g_object_unref0 (devs); - _g_object_unref0 (channels_file); - _g_object_unref0 (channels); - continue; - } - } - __finally10: - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (devs); - _g_object_unref0 (channels_file); - _g_object_unref0 (channels); - _g_object_unref0 (groups); - _sqlite3_finalize0 (statement); - return NULL; - } else { - _g_object_unref0 (devs); - _g_object_unref0 (channels_file); - _g_object_unref0 (channels); - _g_object_unref0 (groups); - _sqlite3_finalize0 (statement); - 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; - } - } - rec_dir = g_file_new_for_path (sqlite3_column_text (statement, 3)); - ref_dev = (DVBDevice*) gee_list_get (devs, 0); - dvb_device_set_Channels (ref_dev, channels); - dvb_device_set_RecordingsDirectory (ref_dev, rec_dir); group = dvb_device_group_new ((guint) group_id, ref_dev, !main_get_disable_epg_scanner ()); dvb_device_group_set_Name (group, sqlite3_column_text (statement, 4)); { gint i; - i = 1; + i = 0; { gboolean _tmp6_; _tmp6_ = TRUE; @@ -773,12 +729,11 @@ } } gee_collection_add ((GeeCollection*) groups, group); + _g_object_unref0 (group); + _g_object_unref0 (ref_dev); _g_object_unref0 (devs); - _g_object_unref0 (channels_file); - _g_object_unref0 (channels); _g_object_unref0 (rec_dir); - _g_object_unref0 (ref_dev); - _g_object_unref0 (group); + _g_object_unref0 (channels_file); } result = groups; _sqlite3_finalize0 (statement); @@ -788,8 +743,7 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* dev_group, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_; char* channels; char* recdir; @@ -797,9 +751,9 @@ gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; gboolean _tmp4_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev_group != NULL, FALSE); - _inner_error_ = NULL; _tmp0_ = dvb_database_sqlite_sqlite_config_timers_store_contains_group (self, dvb_device_group_get_Id (dev_group), &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -843,41 +797,56 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return FALSE; } else { - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); 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; - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return result; } + dvb_database_sqlite_sqlite_database_begin_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (recdir); + _g_free0 (channels); + return FALSE; + } else { + _g_free0 (recdir); + _g_free0 (channels); + 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 (sqlite3_step (self->priv->insert_group_statement) != SQLITE_DONE) { 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) { g_propagate_error (error, _inner_error_); - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return FALSE; } else { - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); 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; - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return result; } { @@ -895,14 +864,14 @@ g_propagate_error (error, _inner_error_); _g_object_unref0 (dev); _g_object_unref0 (_dev_it); - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return FALSE; } else { _g_object_unref0 (dev); _g_object_unref0 (_dev_it); - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); 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; @@ -912,20 +881,34 @@ } _g_object_unref0 (_dev_it); } + dvb_database_sqlite_sqlite_database_end_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (recdir); + _g_free0 (channels); + return FALSE; + } else { + _g_free0 (recdir); + _g_free0 (channels); + 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; - _g_free0 (channels); _g_free0 (recdir); + _g_free0 (channels); return result; } static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* devgroup, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (devgroup != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_group_statement); if (sqlite3_bind_int (self->priv->delete_group_statement, 1, (gint) dvb_device_group_get_Id (devgroup)) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -942,7 +925,8 @@ result = FALSE; return result; } - if (sqlite3_step (self->priv->delete_group_statement) != SQLITE_DONE) { + sqlite3_reset (self->priv->delete_group_devices_statement); + if (sqlite3_bind_int (self->priv->delete_group_devices_statement, 1, (gint) dvb_device_group_get_Id (devgroup)) != 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) { @@ -957,8 +941,18 @@ result = FALSE; return result; } - sqlite3_reset (self->priv->delete_group_devices_statement); - if (sqlite3_bind_int (self->priv->delete_group_devices_statement, 1, (gint) dvb_device_group_get_Id (devgroup)) != SQLITE_OK) { + dvb_database_sqlite_sqlite_database_begin_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } + if (sqlite3_step (self->priv->delete_group_statement) != SQLITE_DONE) { 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) { @@ -988,17 +982,68 @@ result = FALSE; return result; } + dvb_database_sqlite_sqlite_database_end_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } result = TRUE; return result; } +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; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean ret; + GError * _inner_error_ = NULL; + self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; + sqlite3_reset (self->priv->select_group_of_device_statement); + if (sqlite3_bind_int (self->priv->select_group_of_device_statement, 1, (gint) adapter) != SQLITE_OK) { + _tmp0_ = TRUE; + } else { + _tmp0_ = sqlite3_bind_int (self->priv->select_group_of_device_statement, 2, (gint) frontend) != SQLITE_OK; + } + if (_tmp0_) { + 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) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } + result = FALSE; + return result; + } + ret = FALSE; + while (TRUE) { + if (!(sqlite3_step (self->priv->select_group_of_device_statement) == SQLITE_ROW)) { + break; + } + *group_id = (guint) sqlite3_column_int (self->priv->select_group_of_device_statement, 0); + ret = TRUE; + } + result = ret; + return result; +} + + gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_group (DVBdatabasesqliteSqliteConfigTimersStore* self, guint group_id, GError** error) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gint c; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->contains_group_statement); if (sqlite3_bind_int (self->priv->contains_group_statement, 1, (gint) group_id) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -1029,14 +1074,13 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group (DVBdatabaseConfigStore* base, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->insert_device_statement); if (sqlite3_bind_int (self->priv->insert_device_statement, 1, (gint) dvb_device_group_get_Id (devgroup)) != SQLITE_OK) { _tmp1_ = TRUE; @@ -1085,13 +1129,12 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_from_group (DVBdatabaseConfigStore* base, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_device_statement); if (sqlite3_bind_int (self->priv->delete_device_statement, 1, (gint) dvb_device_get_Adapter (dev)) != SQLITE_OK) { _tmp0_ = TRUE; @@ -1135,12 +1178,11 @@ 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; - GError * _inner_error_; + GeeList* result = NULL; GeeList* timers; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, NULL); - _inner_error_ = NULL; timers = (GeeList*) gee_array_list_new (DVB_TYPE_TIMER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL); sqlite3_reset (self->priv->select_timers_statement); if (sqlite3_bind_int (self->priv->select_timers_statement, 1, (gint) dvb_device_group_get_Id (dev)) != SQLITE_OK) { @@ -1188,8 +1230,8 @@ timer = dvb_timer_new ((guint32) tid, channel, year, month, day, hour, minute, duration); dvb_timer_set_EventID (timer, event_id); gee_collection_add ((GeeCollection*) timers, timer); - _g_object_unref0 (channel); _g_object_unref0 (timer); + _g_object_unref0 (channel); } result = timers; return result; @@ -1198,12 +1240,11 @@ 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; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_; - guint* _tmp2_; - gint start_size; gint start_length1; + gint _start_size_; + guint* _tmp2_; gint _tmp1_; guint* start; gboolean _tmp3_ = FALSE; @@ -1215,10 +1256,10 @@ gboolean _tmp9_ = FALSE; gboolean _tmp10_ = FALSE; gboolean _tmp11_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (timer != NULL, FALSE); g_return_val_if_fail (dev != NULL, FALSE); - _inner_error_ = NULL; _tmp0_ = dvb_database_sqlite_sqlite_config_timers_store_contains_timer (self, (guint) dvb_timer_get_Id (timer), &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -1235,7 +1276,7 @@ return result; } sqlite3_reset (self->priv->insert_timer_statement); - start = (_tmp2_ = dvb_timer_get_start_time (timer, &_tmp1_), start_length1 = _tmp1_, start_size = start_length1, _tmp2_); + start = (_tmp2_ = dvb_timer_get_start_time (timer, &_tmp1_), start_length1 = _tmp1_, _start_size_ = start_length1, _tmp2_); if (sqlite3_bind_int (self->priv->insert_timer_statement, 1, (gint) dvb_timer_get_Id (timer)) != SQLITE_OK) { _tmp11_ = TRUE; } else { @@ -1325,11 +1366,10 @@ 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; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (dev != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_timer_statement); if (sqlite3_bind_int (self->priv->delete_timer_statement, 1, (gint) timer_id) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -1368,10 +1408,9 @@ 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; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_group_timers_statement); if (sqlite3_bind_int (self->priv->delete_group_timers_statement, 1, (gint) group_id) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -1409,11 +1448,10 @@ gboolean dvb_database_sqlite_sqlite_config_timers_store_contains_timer (DVBdatabasesqliteSqliteConfigTimersStore* self, guint timer_id, GError** error) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gint c; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->contains_timer_statement); if (sqlite3_bind_int (self->priv->contains_timer_statement, 1, (gint) timer_id) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -1444,15 +1482,14 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_update_from_group (DVBdatabaseConfigStore* base, DVBDeviceGroup* devgroup, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (devgroup != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->update_group_statement); if (sqlite3_bind_int (self->priv->update_group_statement, 1, (gint) dvb_device_group_get_Type (devgroup)) != SQLITE_OK) { _tmp3_ = TRUE; @@ -1511,11 +1548,10 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_group (DVBdatabaseConfigStore* base, const char* name, gint* channel_group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (name != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->insert_channel_group_statement); if (sqlite3_bind_text (self->priv->insert_channel_group_statement, 1, g_strdup (name), -1, g_free) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -1555,10 +1591,9 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_group (DVBdatabaseConfigStore* base, gint group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_channel_group_statement); sqlite3_reset (self->priv->remove_all_channel_group_statement); if (sqlite3_bind_int (self->priv->delete_channel_group_statement, 1, group_id) != SQLITE_OK) { @@ -1591,6 +1626,17 @@ result = FALSE; return result; } + dvb_database_sqlite_sqlite_database_begin_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } if (sqlite3_step (self->priv->delete_channel_group_statement) != SQLITE_DONE) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); if (_inner_error_ != NULL) { @@ -1621,6 +1667,17 @@ result = FALSE; return result; } + dvb_database_sqlite_sqlite_database_end_transaction ((DVBdatabasesqliteSqliteDatabase*) self, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } result = TRUE; return result; } @@ -1628,7 +1685,7 @@ static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channel_groups (DVBdatabaseConfigStore* base, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - GeeList* result; + GeeList* result = NULL; GeeArrayList* groups; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; sqlite3_reset (self->priv->select_channel_groups_statement); @@ -1644,8 +1701,8 @@ group_name = g_strdup (sqlite3_column_text (self->priv->select_channel_groups_statement, 1)); group = dvb_channel_group_new (group_id, group_name); gee_abstract_collection_add ((GeeAbstractCollection*) groups, group); - _g_free0 (group_name); _g_object_unref0 (group); + _g_free0 (group_name); } result = (GeeList*) groups; return result; @@ -1654,12 +1711,11 @@ static GeeList* dvb_database_sqlite_sqlite_config_timers_store_real_get_channels_of_group (DVBdatabaseConfigStore* base, guint dev_group_id, gint channel_group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - GeeList* result; - GError * _inner_error_; + GeeList* result = NULL; gboolean _tmp0_ = FALSE; GeeArrayList* channels; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->select_channels_statement); if (sqlite3_bind_int (self->priv->select_channels_statement, 1, (gint) dev_group_id) != SQLITE_OK) { _tmp0_ = TRUE; @@ -1693,13 +1749,12 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_add_channel_to_group (DVBdatabaseConfigStore* base, DVBChannel* channel, gint group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (channel != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->add_channel_group_statement); if (sqlite3_bind_int (self->priv->add_channel_group_statement, 1, (gint) dvb_channel_get_Sid (channel)) != SQLITE_OK) { _tmp1_ = TRUE; @@ -1748,13 +1803,12 @@ static gboolean dvb_database_sqlite_sqlite_config_timers_store_real_remove_channel_from_group (DVBdatabaseConfigStore* base, DVBChannel* channel, gint group_id, GError** error) { DVBdatabasesqliteSqliteConfigTimersStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteConfigTimersStore*) base; g_return_val_if_fail (channel != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->remove_channel_group_statement); if (sqlite3_bind_int (self->priv->remove_channel_group_statement, 1, (gint) dvb_channel_get_Sid (channel)) != SQLITE_OK) { _tmp1_ = TRUE; @@ -1816,6 +1870,7 @@ iface->get_all_device_groups = dvb_database_sqlite_sqlite_config_timers_store_real_get_all_device_groups; iface->add_device_group = dvb_database_sqlite_sqlite_config_timers_store_real_add_device_group; iface->remove_device_group = dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_group; + iface->get_parent_group = dvb_database_sqlite_sqlite_config_timers_store_real_get_parent_group; iface->add_device_to_group = dvb_database_sqlite_sqlite_config_timers_store_real_add_device_to_group; iface->remove_device_from_group = dvb_database_sqlite_sqlite_config_timers_store_real_remove_device_from_group; iface->update_from_group = dvb_database_sqlite_sqlite_config_timers_store_real_update_from_group; @@ -1852,6 +1907,7 @@ _sqlite3_finalize0 (self->priv->delete_device_statement); _sqlite3_finalize0 (self->priv->delete_group_devices_statement); _sqlite3_finalize0 (self->priv->insert_device_statement); + _sqlite3_finalize0 (self->priv->select_group_of_device_statement); _sqlite3_finalize0 (self->priv->select_timers_statement); _sqlite3_finalize0 (self->priv->delete_timer_statement); _sqlite3_finalize0 (self->priv->delete_group_timers_statement); @@ -1870,16 +1926,18 @@ GType dvb_database_sqlite_sqlite_config_timers_store_get_type (void) { - static GType dvb_database_sqlite_sqlite_config_timers_store_type_id = 0; - if (dvb_database_sqlite_sqlite_config_timers_store_type_id == 0) { + static volatile gsize dvb_database_sqlite_sqlite_config_timers_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_sqlite_sqlite_config_timers_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabasesqliteSqliteConfigTimersStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_database_sqlite_sqlite_config_timers_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBdatabasesqliteSqliteConfigTimersStore), 0, (GInstanceInitFunc) dvb_database_sqlite_sqlite_config_timers_store_instance_init, NULL }; static const GInterfaceInfo dvb_database_config_store_info = { (GInterfaceInitFunc) dvb_database_sqlite_sqlite_config_timers_store_dvb_database_config_store_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; static const GInterfaceInfo dvb_database_timers_store_info = { (GInterfaceInitFunc) dvb_database_sqlite_sqlite_config_timers_store_dvb_database_timers_store_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_database_sqlite_sqlite_config_timers_store_type_id; dvb_database_sqlite_sqlite_config_timers_store_type_id = g_type_register_static (DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE, "DVBdatabasesqliteSqliteConfigTimersStore", &g_define_type_info, 0); g_type_add_interface_static (dvb_database_sqlite_sqlite_config_timers_store_type_id, DVB_DATABASE_TYPE_CONFIG_STORE, &dvb_database_config_store_info); g_type_add_interface_static (dvb_database_sqlite_sqlite_config_timers_store_type_id, DVB_DATABASE_TYPE_TIMERS_STORE, &dvb_database_timers_store_info); + g_once_init_leave (&dvb_database_sqlite_sqlite_config_timers_store_type_id__volatile, dvb_database_sqlite_sqlite_config_timers_store_type_id); } - return dvb_database_sqlite_sqlite_config_timers_store_type_id; + return dvb_database_sqlite_sqlite_config_timers_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteConfigTimersStore.vala gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteConfigTimersStore.vala --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteConfigTimersStore.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteConfigTimersStore.vala 2010-05-13 11:19:58.000000000 +0000 @@ -82,7 +82,7 @@ "INSERT INTO device_groups VALUES (?, ?, ?, ?, ?)"; private static const string CONTAINS_GROUP = - "SELECT COUNT(*) FROM device_groups WHERE group_id=?"; + "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=?"; @@ -95,6 +95,9 @@ 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=?"; @@ -109,7 +112,7 @@ "INSERT INTO timers VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; private static const string CONTAINS_TIMER = - "SELECT COUNT(*) FROM timers WHERE timer_id=?"; + "SELECT 1 FROM timers WHERE timer_id=?"; private static const string INSERT_CHANNEL_GROUP = "INSERT INTO channel_groups (name) VALUES (?)"; @@ -139,6 +142,7 @@ private Statement delete_device_statement; private Statement delete_group_devices_statement; private Statement insert_device_statement; + private Statement select_group_of_device_statement; private Statement select_timers_statement; private Statement delete_timer_statement; private Statement delete_group_timers_statement; @@ -191,6 +195,8 @@ out this.delete_group_devices_statement); this.db.prepare (INSERT_DEVICE, -1, out this.insert_device_statement); + this.db.prepare (SELECT_GROUP_OF_DEVICE, -1, + out this.select_group_of_device_statement); this.db.prepare (SELECT_TIMERS, -1, out this.select_timers_statement); this.db.prepare (DELETE_TIMER, -1, @@ -230,70 +236,52 @@ while (statement.step () == Sqlite.ROW) { int group_id = statement.column_int (0); - + this.select_devices_statement.reset (); if (this.select_devices_statement.bind_int (1, group_id) != Sqlite.OK) { this.throw_last_error (); continue; } - + + File channels_file = File.new_for_path ( + statement.column_text (2)); + + File rec_dir = File.new_for_path ( + statement.column_text (3)); + // Get devices of group Gee.List devs = new ArrayList (); + Device ref_dev = null; while (this.select_devices_statement.step () == Sqlite.ROW) { uint adapter = (uint)this.select_devices_statement.column_int (1); uint frontend = (uint)this.select_devices_statement.column_int (2); - - // Create new device - devs.add (new Device (adapter, frontend)); + + if (ref_dev == null) { + try { + ref_dev = Device.new_full (adapter, frontend, + channels_file, rec_dir, group_id); + } catch (DeviceError e) { + critical ("Could not create device: %s", e.message); + } + } else { + devs.add (Device.new_with_type (adapter, frontend)); + } } - + // No devices for this group - if (devs.size == 0) { + if (ref_dev == null) { debug ("Group %d has no devices", group_id); continue; } - - // Get adapter type - int group_type = statement.column_int (1); - AdapterType type; - switch (group_type) { - case 1: type = AdapterType.DVB_T; break; - case 2: type = AdapterType.DVB_S; break; - case 3: type = AdapterType.DVB_C; break; - default: - debug ("Group %d has unknown type %d", - group_id, group_type); - continue; - } - - // Get channel list - File channels_file = File.new_for_path ( - statement.column_text (2)); - ChannelList channels; - try { - channels = ChannelList.restore_from_file ( - channels_file, type, group_id); - } catch (Error e) { - warning ("Could not read channels: %s", e.message); - continue; - } - - File rec_dir = File.new_for_path ( - statement.column_text (3)); - - // Set reference device - Device ref_dev = devs.get (0); - ref_dev.Channels = channels; - ref_dev.RecordingsDirectory = rec_dir; - + // Create device group DeviceGroup group = new DeviceGroup ((uint)group_id, ref_dev, !Main.get_disable_epg_scanner()); group.Name = statement.column_text (4); - for (int i=1; idb != NULL) { return; } @@ -160,11 +165,11 @@ { dvb_utils_mkdirs (dbfile_dir, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch3_g_error; + goto __catch0_g_error; } } - goto __finally3; - __catch3_g_error: + goto __finally0; + __catch0_g_error: { GError * e; e = _inner_error_; @@ -172,21 +177,21 @@ { g_critical ("SqliteDatabase.vala:51: Could not create directory: %s", e->message); _g_error_free0 (e); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); return; } } - __finally3: + __finally0: if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); return; } else { - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); 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; @@ -198,12 +203,12 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); return; } else { - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); 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; @@ -217,12 +222,12 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); return; } else { - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); 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; @@ -235,12 +240,12 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); return; } else { - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); 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; @@ -249,41 +254,78 @@ } } dvb_database_sqlite_sqlite_database_set_version (self, self->priv->new_version); + dvb_database_sqlite_sqlite_database_set_journal_mode (self); dvb_database_sqlite_sqlite_database_on_open (self); - _g_object_unref0 (dbfile); _g_object_unref0 (dbfile_dir); + _g_object_unref0 (dbfile); } +/** + * Set database version + */ void dvb_database_sqlite_sqlite_database_set_version (DVBdatabasesqliteSqliteDatabase* self, gint version) { - GError * _inner_error_; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _inner_error_ = NULL; { char* _tmp0_; dvb_database_sqlite_sqlite_database_exec_sql (self, _tmp0_ = g_strdup_printf ("PRAGMA user_version = %d", version), &_inner_error_); _g_free0 (_tmp0_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch4_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; + } + } + goto __finally1; + __catch1_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("SqliteDatabase.vala:82: %s", e->message); + _g_error_free0 (e); + } + } + __finally1: + 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_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; } 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 __finally4; - __catch4_dvb_database_sql_error: + goto __finally2; + __catch2_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("SqliteDatabase.vala:81: %s", e->message); + g_critical ("SqliteDatabase.vala:90: %s", e->message); _g_error_free0 (e); } } - __finally4: + __finally2: 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_); @@ -292,19 +334,21 @@ } +/** + * Get database version + */ gint dvb_database_sqlite_sqlite_database_get_version (DVBdatabasesqliteSqliteDatabase* self) { - gint result; - GError * _inner_error_; + gint result = 0; gint version; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); - _inner_error_ = NULL; version = 0; { gint _tmp0_; _tmp0_ = dvb_database_sqlite_sqlite_database_simple_query_int (self, "PRAGMA user_version", &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch5_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_); @@ -312,18 +356,18 @@ } version = _tmp0_; } - goto __finally5; - __catch5_dvb_database_sql_error: + goto __finally3; + __catch3_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("SqliteDatabase.vala:93: %s", e->message); + g_critical ("SqliteDatabase.vala:102: %s", e->message); _g_error_free0 (e); } } - __finally5: + __finally3: 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,20 +379,17 @@ gint dvb_database_sqlite_sqlite_database_simple_query_int (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error) { - gint result; - GError * _inner_error_; + gint result = 0; sqlite3_stmt* st; - sqlite3_stmt* _tmp2_; - gint _tmp1_; sqlite3_stmt* _tmp0_ = NULL; + sqlite3_stmt* _tmp1_; gint ret; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (sql != NULL, 0); - _inner_error_ = NULL; st = NULL; - _tmp1_ = sqlite3_prepare (self->db, sql, -1, &_tmp0_, NULL); - st = (_tmp2_ = _tmp0_, _sqlite3_finalize0 (st), _tmp2_); - _tmp1_; + sqlite3_prepare (self->db, sql, -1, &_tmp0_, NULL); + st = (_tmp1_ = _tmp0_, _sqlite3_finalize0 (st), _tmp1_); ret = 0; if (sqlite3_step (st) == SQLITE_ROW) { ret = sqlite3_column_int (st, 0); @@ -373,18 +414,38 @@ } +static gint _sqlite3_exec (sqlite3* self, const char* sql, sqlite3_callback sqlite3_callback, void* sqlite3_callback_target, char** errmsg) { + gint result = 0; + const char* sqlite_errmsg; + gint ec; + g_return_val_if_fail (self != NULL, 0); + g_return_val_if_fail (sql != NULL, 0); + if (errmsg != NULL) { + *errmsg = NULL; + } + sqlite_errmsg = NULL; + ec = sqlite3_exec (self, sql, sqlite3_callback, sqlite3_callback_target, (char**) (&sqlite_errmsg)); + if ((errmsg) != NULL) { + char* _tmp0_; + *errmsg = (_tmp0_ = g_strdup (sqlite_errmsg), _g_free0 (*errmsg), _tmp0_); + } + sqlite3_free ((void*) sqlite_errmsg); + result = ec; + return result; +} + + void dvb_database_sqlite_sqlite_database_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error) { - GError * _inner_error_; char* errmsg; - char* _tmp2_; - gint _tmp1_; char* _tmp0_ = NULL; + gint _tmp1_; + char* _tmp2_; gint val; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (sql != NULL); - _inner_error_ = NULL; errmsg = NULL; - val = (_tmp1_ = sqlite3_exec (self->db, sql, NULL, NULL, &_tmp0_), errmsg = (_tmp2_ = _tmp0_, _g_free0 (errmsg), _tmp2_), _tmp1_); + val = (_tmp1_ = _sqlite3_exec (self->db, sql, NULL, NULL, &_tmp0_), errmsg = (_tmp2_ = _tmp0_, _g_free0 (errmsg), _tmp2_), _tmp1_); if (val != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error (self, NULL, &_inner_error_); if (_inner_error_ != NULL) { @@ -404,12 +465,45 @@ } +void dvb_database_sqlite_sqlite_database_begin_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + dvb_database_sqlite_sqlite_database_exec_sql (self, "BEGIN;", &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return; + } 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; + } + } +} + + +void dvb_database_sqlite_sqlite_database_end_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + dvb_database_sqlite_sqlite_database_exec_sql (self, "END;", &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + g_propagate_error (error, _inner_error_); + return; + } 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; + } + } +} + + void dvb_database_sqlite_sqlite_database_throw_last_error (DVBdatabasesqliteSqliteDatabase* self, const char* errmsg, GError** error) { - GError * _inner_error_; gint code; char* msg; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _inner_error_ = NULL; code = sqlite3_errcode (self->db); msg = NULL; if (errmsg == NULL) { @@ -845,6 +939,10 @@ } +/** + * Called when the database is created for the first time. + * 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))); @@ -857,6 +955,9 @@ } +/** + * 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))); @@ -869,6 +970,9 @@ } +/** + * 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))); @@ -925,12 +1029,14 @@ GType dvb_database_sqlite_sqlite_database_get_type (void) { - static GType dvb_database_sqlite_sqlite_database_type_id = 0; - if (dvb_database_sqlite_sqlite_database_type_id == 0) { + static volatile gsize dvb_database_sqlite_sqlite_database_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_sqlite_sqlite_database_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabasesqliteSqliteDatabaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_database_sqlite_sqlite_database_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBdatabasesqliteSqliteDatabase), 0, (GInstanceInitFunc) dvb_database_sqlite_sqlite_database_instance_init, NULL }; + GType dvb_database_sqlite_sqlite_database_type_id; dvb_database_sqlite_sqlite_database_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBdatabasesqliteSqliteDatabase", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&dvb_database_sqlite_sqlite_database_type_id__volatile, dvb_database_sqlite_sqlite_database_type_id); } - return dvb_database_sqlite_sqlite_database_type_id; + return dvb_database_sqlite_sqlite_database_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteDatabase.vala gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteDatabase.vala --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteDatabase.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteDatabase.vala 2010-05-07 17:35:42.000000000 +0000 @@ -67,6 +67,7 @@ this.upgrade (version, this.new_version); } this.set_version (this.new_version); + this.set_journal_mode (); this.on_open (); } @@ -82,6 +83,14 @@ } } + public void set_journal_mode () { + try { + this.exec_sql ("PRAGMA journal_mode = TRUNCATE"); + } catch (SqlError e) { + critical ("%s", e.message); + } + } + /** * Get database version */ @@ -113,6 +122,14 @@ if (val != Sqlite.OK) this.throw_last_error (); } + public void begin_transaction () throws SqlError { + this.exec_sql ("BEGIN;"); + } + + public void end_transaction () throws SqlError { + this.exec_sql ("END;"); + } + protected void throw_last_error (string? errmsg=null) throws SqlError { int code = this.db.errcode (); string msg; diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteEPGStore.c gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteEPGStore.c --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteEPGStore.c 2010-03-17 19:35:05.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteEPGStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteEPGStore.c generated by valac, the Vala compiler +/* SqliteEPGStore.c generated by valac 0.9.7, the Vala compiler * generated from SqliteEPGStore.vala, do not modify */ /* @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -157,6 +158,7 @@ gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -179,6 +181,7 @@ sqlite3_stmt* has_event_statement; sqlite3_stmt* select_event_statement; sqlite3_stmt* delete_events_group; + sqlite3_stmt* delete_expired_events; }; struct _DVBEvent { @@ -212,21 +215,22 @@ static gpointer dvb_database_sqlite_sqlite_epg_store_parent_class = 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); +GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); -GType dvb_database_epg_store_get_type (void); -GType dvb_database_sqlite_sqlite_epg_store_get_type (void); +GType dvb_event_get_type (void) G_GNUC_CONST; +GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; +GType dvb_database_sqlite_sqlite_epg_store_get_type (void) G_GNUC_CONST; #define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_DATABASE_SQLITE_TYPE_SQLITE_EPG_STORE, DVBdatabasesqliteSqliteEPGStorePrivate)) enum { DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DUMMY_PROPERTY }; -#define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_VERSION 1 +#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" \ " event_id INTEGER,\n" \ @@ -244,7 +248,10 @@ " duration, running_status, free_ca_mode, name,\n" \ " description, extended_description\n" \ " FROM events WHERE group_id='%u' AND sid='%u'" -#define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT "SELECT COUNT(*) FROM events WHERE group_id=? AND sid=? AND event_id=?" +#define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_MINIMAL_EVENTS_STATEMENT "SELECT event_id, datetime(starttime),\n" \ +" duration FROM events WHERE group_id='%u' AND sid='%u'\n" \ +" ORDER BY starttime ASC" +#define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT "SELECT 1 FROM events WHERE group_id=? AND sid=? AND event_id=? LIMIT 1" #define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_UPDATE_EVENT_SQL "UPDATE events SET starttime=?, duration=?, running_status=?,\n" \ " free_ca_mode=?, name=?, description=?,\n" \ " extended_description=? WHERE group_id=? AND sid=? AND even" \ @@ -255,41 +262,49 @@ " description, extended_description\n" \ " FROM events WHERE group_id=? AND sid=? AND event_id=?" #define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENTS_GROUP "DELETE FROM events WHERE group_id=?" -DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version); +#define DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EXPIRED_EVENTS "DELETE FROM events WHERE starttime <= julianday(?, 'unixepoch')\n" \ +" AND sid=? AND group_id=?" DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_new (void); DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_construct (GType object_type); +DVBdatabasesqliteSqliteDatabase* dvb_database_sqlite_sqlite_database_construct (GType object_type, GFile* dbfile, gint version); static void dvb_database_sqlite_sqlite_epg_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base); -void dvb_database_sqlite_sqlite_database_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error); static void dvb_database_sqlite_sqlite_epg_store_real_create (DVBdatabasesqliteSqliteDatabase* base, GError** error); +void dvb_database_sqlite_sqlite_database_exec_sql (DVBdatabasesqliteSqliteDatabase* self, const char* sql, GError** error); static void dvb_database_sqlite_sqlite_epg_store_real_upgrade (DVBdatabasesqliteSqliteDatabase* base, gint old_version, gint new_version, GError** error); +static gboolean dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gpointer dvb_event_audio_component_ref (gpointer instance); void dvb_event_audio_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_audio_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_audio_component (GValue* value, gpointer v_object); +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_audio_component (const GValue* value); -GType dvb_event_audio_component_get_type (void); +GType dvb_event_audio_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_video_component_ref (gpointer instance); void dvb_event_video_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_video_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_video_component (GValue* value, gpointer v_object); +void dvb_event_value_take_video_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_video_component (const GValue* value); -GType dvb_event_video_component_get_type (void); +GType dvb_event_video_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_teletext_component_ref (gpointer instance); void dvb_event_teletext_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_teletext_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_teletext_component (GValue* value, gpointer v_object); +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); +GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; char* dvb_database_sqlite_utils_escape (const char* text); static double dvb_database_sqlite_sqlite_epg_store_to_julian (DVBdatabasesqliteSqliteEPGStore* self, guint year, guint month, guint day, guint hour, guint minute, guint second, GError** error); 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 char* errmsg, GError** error); -static gboolean dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error); -static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement); static DVBEvent* dvb_database_sqlite_sqlite_epg_store_real_get_event (DVBdatabaseEPGStore* base, guint event_id, guint channel_sid, guint group_id, GError** error); +static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement); static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_event (DVBdatabaseEPGStore* base, guint event_id, guint channel_sid, guint group_id, GError** error); +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); +time_t dvb_event_get_end_timestamp (DVBEvent* self); static gboolean dvb_database_sqlite_sqlite_epg_store_real_contains_event (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error); static GeeList* dvb_database_sqlite_sqlite_epg_store_real_get_events (DVBdatabaseEPGStore* base, guint channel_sid, guint group_id, GError** error); +static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_minimal_event (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement); static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group (DVBdatabaseEPGStore* base, guint group_id, GError** error); DVBEvent* dvb_event_new (void); DVBEvent* dvb_event_construct (GType object_type); @@ -310,9 +325,9 @@ our_cache = g_file_get_child (cache_dir, "gnome-dvb-daemon"); database_file = g_file_get_child (our_cache, "eventsdb.sqlite3"); self = (DVBdatabasesqliteSqliteEPGStore*) dvb_database_sqlite_sqlite_database_construct (object_type, database_file, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_VERSION); - _g_object_unref0 (cache_dir); - _g_object_unref0 (our_cache); _g_object_unref0 (database_file); + _g_object_unref0 (our_cache); + _g_object_unref0 (cache_dir); return self; } @@ -324,57 +339,46 @@ static void dvb_database_sqlite_sqlite_epg_store_real_on_open (DVBdatabasesqliteSqliteDatabase* base) { DVBdatabasesqliteSqliteEPGStore * self; - sqlite3_stmt* _tmp2_; - gint _tmp1_; sqlite3_stmt* _tmp0_ = NULL; + sqlite3_stmt* _tmp1_; + sqlite3_stmt* _tmp2_ = NULL; + sqlite3_stmt* _tmp3_; + sqlite3_stmt* _tmp4_ = NULL; sqlite3_stmt* _tmp5_; - gint _tmp4_; - sqlite3_stmt* _tmp3_ = NULL; - sqlite3_stmt* _tmp8_; - gint _tmp7_; sqlite3_stmt* _tmp6_ = NULL; + sqlite3_stmt* _tmp7_; + sqlite3_stmt* _tmp8_ = NULL; + sqlite3_stmt* _tmp9_; + sqlite3_stmt* _tmp10_ = NULL; sqlite3_stmt* _tmp11_; - gint _tmp10_; - sqlite3_stmt* _tmp9_ = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp13_; sqlite3_stmt* _tmp12_ = NULL; - sqlite3_stmt* _tmp17_; - gint _tmp16_; - sqlite3_stmt* _tmp15_ = NULL; - sqlite3_stmt* _tmp20_; - gint _tmp19_; - sqlite3_stmt* _tmp18_ = NULL; + sqlite3_stmt* _tmp13_; + sqlite3_stmt* _tmp14_ = NULL; + sqlite3_stmt* _tmp15_; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _tmp1_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_TO_JULIAN_SQL, -1, &_tmp0_, NULL); - self->priv->to_julian_statement = (_tmp2_ = _tmp0_, _sqlite3_finalize0 (self->priv->to_julian_statement), _tmp2_); - _tmp1_; - _tmp4_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_INSERT_EVENT_SQL, -1, &_tmp3_, NULL); - self->priv->insert_event_statement = (_tmp5_ = _tmp3_, _sqlite3_finalize0 (self->priv->insert_event_statement), _tmp5_); - _tmp4_; - _tmp7_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_UPDATE_EVENT_SQL, -1, &_tmp6_, NULL); - self->priv->update_event_statement = (_tmp8_ = _tmp6_, _sqlite3_finalize0 (self->priv->update_event_statement), _tmp8_); - _tmp7_; - _tmp10_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENT_STATEMENT, -1, &_tmp9_, NULL); - self->priv->delete_event_statement = (_tmp11_ = _tmp9_, _sqlite3_finalize0 (self->priv->delete_event_statement), _tmp11_); - _tmp10_; - _tmp13_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT, -1, &_tmp12_, NULL); - self->priv->has_event_statement = (_tmp14_ = _tmp12_, _sqlite3_finalize0 (self->priv->has_event_statement), _tmp14_); - _tmp13_; - _tmp16_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_EVENT_SQL, -1, &_tmp15_, NULL); - self->priv->select_event_statement = (_tmp17_ = _tmp15_, _sqlite3_finalize0 (self->priv->select_event_statement), _tmp17_); - _tmp16_; - _tmp19_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENTS_GROUP, -1, &_tmp18_, NULL); - self->priv->delete_events_group = (_tmp20_ = _tmp18_, _sqlite3_finalize0 (self->priv->delete_events_group), _tmp20_); - _tmp19_; + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_TO_JULIAN_SQL, -1, &_tmp0_, NULL); + self->priv->to_julian_statement = (_tmp1_ = _tmp0_, _sqlite3_finalize0 (self->priv->to_julian_statement), _tmp1_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_INSERT_EVENT_SQL, -1, &_tmp2_, NULL); + self->priv->insert_event_statement = (_tmp3_ = _tmp2_, _sqlite3_finalize0 (self->priv->insert_event_statement), _tmp3_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_UPDATE_EVENT_SQL, -1, &_tmp4_, NULL); + self->priv->update_event_statement = (_tmp5_ = _tmp4_, _sqlite3_finalize0 (self->priv->update_event_statement), _tmp5_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENT_STATEMENT, -1, &_tmp6_, NULL); + self->priv->delete_event_statement = (_tmp7_ = _tmp6_, _sqlite3_finalize0 (self->priv->delete_event_statement), _tmp7_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_HAS_EVENT_STATEMENT, -1, &_tmp8_, NULL); + self->priv->has_event_statement = (_tmp9_ = _tmp8_, _sqlite3_finalize0 (self->priv->has_event_statement), _tmp9_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_EVENT_SQL, -1, &_tmp10_, NULL); + self->priv->select_event_statement = (_tmp11_ = _tmp10_, _sqlite3_finalize0 (self->priv->select_event_statement), _tmp11_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EVENTS_GROUP, -1, &_tmp12_, NULL); + self->priv->delete_events_group = (_tmp13_ = _tmp12_, _sqlite3_finalize0 (self->priv->delete_events_group), _tmp13_); + sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_DELETE_EXPIRED_EVENTS, -1, &_tmp14_, NULL); + self->priv->delete_expired_events = (_tmp15_ = _tmp14_, _sqlite3_finalize0 (self->priv->delete_expired_events), _tmp15_); } static void dvb_database_sqlite_sqlite_epg_store_real_create (DVBdatabasesqliteSqliteDatabase* base, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - GError * _inner_error_; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _inner_error_ = NULL; dvb_database_sqlite_sqlite_database_exec_sql ((DVBdatabasesqliteSqliteDatabase*) self, DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_CREATE_EVENTS_TABLE_STATEMENT, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { @@ -386,19 +390,43 @@ return; } } + 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) { + g_propagate_error (error, _inner_error_); + return; + } 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; + } + } } static void dvb_database_sqlite_sqlite_epg_store_real_upgrade (DVBdatabasesqliteSqliteDatabase* base, gint old_version, gint new_version, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; + if (old_version == 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) { + g_propagate_error (error, _inner_error_); + return; + } 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; + } + } + } } static gboolean dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gint _tmp0_ = 0; gint free_ca_mode; char* name; @@ -406,9 +434,9 @@ char* ext_desc; double julian_start; gboolean _tmp1_; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; g_return_val_if_fail (event != NULL, FALSE); - _inner_error_ = NULL; if (event->free_ca_mode) { _tmp0_ = 1; } else { @@ -422,14 +450,14 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; @@ -437,23 +465,23 @@ } if (julian_start <= 0) { result = FALSE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } _tmp1_ = dvb_database_epg_store_contains_event ((DVBdatabaseEPGStore*) self, event, channel_sid, group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; @@ -520,23 +548,23 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; } } result = FALSE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } if (sqlite3_step (self->priv->update_event_statement) != SQLITE_DONE) { @@ -544,23 +572,23 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; } } result = FALSE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } } else { @@ -624,23 +652,23 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; } } result = FALSE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } if (sqlite3_step (self->priv->insert_event_statement) != SQLITE_DONE) { @@ -648,44 +676,43 @@ if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { g_propagate_error (error, _inner_error_); - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return FALSE; } else { - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _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 FALSE; } } result = FALSE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } } result = TRUE; - _g_free0 (name); - _g_free0 (desc); _g_free0 (ext_desc); + _g_free0 (desc); + _g_free0 (name); return result; } static DVBEvent* dvb_database_sqlite_sqlite_epg_store_real_get_event (DVBdatabaseEPGStore* base, guint event_id, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - DVBEvent* result; - GError * _inner_error_; + DVBEvent* result = NULL; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gint rc; gboolean _tmp2_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->select_event_statement); if (sqlite3_bind_int (self->priv->select_event_statement, 1, (gint) group_id) != SQLITE_OK) { _tmp1_ = TRUE; @@ -745,12 +772,11 @@ static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_event (DVBdatabaseEPGStore* base, guint event_id, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_event_statement); if (sqlite3_bind_int (self->priv->delete_event_statement, 1, (gint) group_id) != SQLITE_OK) { _tmp1_ = TRUE; @@ -797,16 +823,71 @@ } +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 timestamp; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; + self = (DVBdatabasesqliteSqliteEPGStore*) base; + g_return_val_if_fail (event != NULL, FALSE); + sqlite3_reset (self->priv->delete_expired_events); + timestamp = dvb_event_get_end_timestamp (event); + if (sqlite3_bind_int64 (self->priv->delete_expired_events, 1, (gint64) timestamp) != SQLITE_OK) { + _tmp1_ = TRUE; + } else { + _tmp1_ = sqlite3_bind_int (self->priv->delete_expired_events, 2, (gint) channel_sid) != SQLITE_OK; + } + if (_tmp1_) { + _tmp0_ = TRUE; + } else { + _tmp0_ = sqlite3_bind_int (self->priv->delete_expired_events, 3, (gint) group_id) != SQLITE_OK; + } + if (_tmp0_) { + 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) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } + result = FALSE; + return result; + } + if (sqlite3_step (self->priv->delete_expired_events) != SQLITE_DONE) { + 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) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } + result = FALSE; + return result; + } + result = TRUE; + return result; +} + + static gboolean dvb_database_sqlite_sqlite_epg_store_real_contains_event (DVBdatabaseEPGStore* base, DVBEvent* event, guint channel_sid, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gint c; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; g_return_val_if_fail (event != NULL, FALSE); - _inner_error_ = NULL; sqlite3_reset (self->priv->has_event_statement); if (sqlite3_bind_int (self->priv->has_event_statement, 1, (gint) group_id) != SQLITE_OK) { _tmp1_ = TRUE; @@ -847,44 +928,43 @@ 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; - GError * _inner_error_; + GeeList* result = NULL; GeeList* events; char* statement_str; sqlite3_stmt* statement; - sqlite3_stmt* _tmp2_; - gint _tmp1_; sqlite3_stmt* _tmp0_ = NULL; + gint _tmp1_; + sqlite3_stmt* _tmp2_; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _inner_error_ = NULL; events = (GeeList*) gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); if (((DVBdatabasesqliteSqliteDatabase*) self)->db == NULL) { result = events; return result; } - statement_str = g_strdup_printf (DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_ALL_EVENTS_STATEMENT, group_id, channel_sid); + statement_str = g_strdup_printf (DVB_DATABASE_SQLITE_SQLITE_EPG_STORE_SELECT_MINIMAL_EVENTS_STATEMENT, group_id, channel_sid); statement = NULL; if ((_tmp1_ = sqlite3_prepare (((DVBdatabasesqliteSqliteDatabase*) self)->db, statement_str, -1, &_tmp0_, NULL), statement = (_tmp2_ = _tmp0_, _sqlite3_finalize0 (statement), _tmp2_), _tmp1_) != 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) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (events); - _g_free0 (statement_str); _sqlite3_finalize0 (statement); + _g_free0 (statement_str); + _g_object_unref0 (events); return NULL; } else { - _g_object_unref0 (events); - _g_free0 (statement_str); _sqlite3_finalize0 (statement); + _g_free0 (statement_str); + _g_object_unref0 (events); 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 = events; - _g_free0 (statement_str); _sqlite3_finalize0 (statement); + _g_free0 (statement_str); return result; } while (TRUE) { @@ -892,23 +972,22 @@ if (!(sqlite3_step (statement) == SQLITE_ROW)) { break; } - event = dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (self, statement); + event = dvb_database_sqlite_sqlite_epg_store_create_minimal_event (self, statement); gee_collection_add ((GeeCollection*) events, event); _dvb_event_unref0 (event); } result = events; - _g_free0 (statement_str); _sqlite3_finalize0 (statement); + _g_free0 (statement_str); return result; } static gboolean dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group (DVBdatabaseEPGStore* base, guint group_id, GError** error) { DVBdatabasesqliteSqliteEPGStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBdatabasesqliteSqliteEPGStore*) base; - _inner_error_ = NULL; sqlite3_reset (self->priv->delete_events_group); if (sqlite3_bind_int (self->priv->delete_events_group, 1, (gint) group_id) != SQLITE_OK) { dvb_database_sqlite_sqlite_database_throw_last_error ((DVBdatabasesqliteSqliteDatabase*) self, NULL, &_inner_error_); @@ -945,6 +1024,22 @@ } +static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_minimal_event (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement) { + DVBEvent* result = NULL; + DVBEvent* event; + const char* starttime; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (statement != NULL, NULL); + event = dvb_event_new (); + event->id = (guint) sqlite3_column_int (statement, 0); + starttime = sqlite3_column_text (statement, 1); + sscanf (starttime, "%04u-%02u-%02u %02u:%02u:%02u", &event->year, &event->month, &event->day, &event->hour, &event->minute, &event->second); + event->duration = (guint) sqlite3_column_int (statement, 2); + result = event; + return result; +} + + static void _g_slist_free_dvb_event_audio_component_unref (GSList* self) { g_slist_foreach (self, (GFunc) dvb_event_audio_component_unref, NULL); g_slist_free (self); @@ -964,7 +1059,7 @@ static DVBEvent* dvb_database_sqlite_sqlite_epg_store_create_event_from_statement (DVBdatabasesqliteSqliteEPGStore* self, sqlite3_stmt* statement) { - DVBEvent* result; + DVBEvent* result = NULL; DVBEvent* event; const char* starttime; char* _tmp0_; @@ -994,11 +1089,10 @@ static double dvb_database_sqlite_sqlite_epg_store_to_julian (DVBdatabasesqliteSqliteEPGStore* self, guint year, guint month, guint day, guint hour, guint minute, guint second, GError** error) { - double result; - GError * _inner_error_; + double result = 0.0; char* datetime_str; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0.0); - _inner_error_ = NULL; sqlite3_reset (self->priv->to_julian_statement); datetime_str = g_strdup_printf ("%04u-%02u-%02u %02u:%02u:%02u", year, month, day, hour, minute, second); if (sqlite3_bind_text (self->priv->to_julian_statement, 1, g_strdup (datetime_str), -1, g_free) != SQLITE_OK) { @@ -1058,6 +1152,7 @@ iface->add_or_update_event = dvb_database_sqlite_sqlite_epg_store_real_add_or_update_event; iface->get_event = dvb_database_sqlite_sqlite_epg_store_real_get_event; iface->remove_event = dvb_database_sqlite_sqlite_epg_store_real_remove_event; + iface->remove_events_older_than = dvb_database_sqlite_sqlite_epg_store_real_remove_events_older_than; iface->contains_event = dvb_database_sqlite_sqlite_epg_store_real_contains_event; iface->get_events = dvb_database_sqlite_sqlite_epg_store_real_get_events; iface->remove_events_of_group = dvb_database_sqlite_sqlite_epg_store_real_remove_events_of_group; @@ -1079,19 +1174,22 @@ _sqlite3_finalize0 (self->priv->has_event_statement); _sqlite3_finalize0 (self->priv->select_event_statement); _sqlite3_finalize0 (self->priv->delete_events_group); + _sqlite3_finalize0 (self->priv->delete_expired_events); G_OBJECT_CLASS (dvb_database_sqlite_sqlite_epg_store_parent_class)->finalize (obj); } GType dvb_database_sqlite_sqlite_epg_store_get_type (void) { - static GType dvb_database_sqlite_sqlite_epg_store_type_id = 0; - if (dvb_database_sqlite_sqlite_epg_store_type_id == 0) { + static volatile gsize dvb_database_sqlite_sqlite_epg_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_sqlite_sqlite_epg_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabasesqliteSqliteEPGStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_database_sqlite_sqlite_epg_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBdatabasesqliteSqliteEPGStore), 0, (GInstanceInitFunc) dvb_database_sqlite_sqlite_epg_store_instance_init, NULL }; static const GInterfaceInfo dvb_database_epg_store_info = { (GInterfaceInitFunc) dvb_database_sqlite_sqlite_epg_store_dvb_database_epg_store_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_database_sqlite_sqlite_epg_store_type_id; dvb_database_sqlite_sqlite_epg_store_type_id = g_type_register_static (DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE, "DVBdatabasesqliteSqliteEPGStore", &g_define_type_info, 0); g_type_add_interface_static (dvb_database_sqlite_sqlite_epg_store_type_id, DVB_DATABASE_TYPE_EPG_STORE, &dvb_database_epg_store_info); + g_once_init_leave (&dvb_database_sqlite_sqlite_epg_store_type_id__volatile, dvb_database_sqlite_sqlite_epg_store_type_id); } - return dvb_database_sqlite_sqlite_epg_store_type_id; + return dvb_database_sqlite_sqlite_epg_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteEPGStore.vala gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteEPGStore.vala --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteEPGStore.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteEPGStore.vala 2010-06-06 14:12:13.000000000 +0000 @@ -25,7 +25,7 @@ public class SqliteEPGStore : SqliteDatabase, EPGStore { - private static const int VERSION = 1; + private static const int VERSION = 2; private static const string CREATE_EVENTS_TABLE_STATEMENT = """CREATE TABLE events (group_id INTEGER, @@ -51,9 +51,14 @@ duration, running_status, free_ca_mode, name, description, extended_description FROM events WHERE group_id='%u' AND sid='%u'"""; + + private static const string SELECT_MINIMAL_EVENTS_STATEMENT = + """SELECT event_id, datetime(starttime), + duration FROM events WHERE group_id='%u' AND sid='%u' + ORDER BY starttime ASC"""; private static const string HAS_EVENT_STATEMENT = - "SELECT COUNT(*) FROM events WHERE group_id=? AND sid=? AND event_id=?"; + "SELECT 1 FROM events WHERE group_id=? AND sid=? AND event_id=? LIMIT 1"; private static const string UPDATE_EVENT_SQL = """UPDATE events SET starttime=?, duration=?, running_status=?, @@ -71,6 +76,10 @@ private static const string DELETE_EVENTS_GROUP = "DELETE FROM events WHERE group_id=?"; + + private static const string DELETE_EXPIRED_EVENTS = + """DELETE FROM events WHERE starttime <= julianday(?, 'unixepoch') + AND sid=? AND group_id=?"""; private Statement to_julian_statement; private Statement insert_event_statement; @@ -79,6 +88,7 @@ private Statement has_event_statement; private Statement select_event_statement; private Statement delete_events_group; + private Statement delete_expired_events; public SqliteEPGStore () { File cache_dir = File.new_for_path ( @@ -104,16 +114,21 @@ out this.select_event_statement); this.db.prepare (DELETE_EVENTS_GROUP, -1, out this.delete_events_group); + this.db.prepare (DELETE_EXPIRED_EVENTS, -1, + out this.delete_expired_events); } public override void create () throws SqlError { this.exec_sql (CREATE_EVENTS_TABLE_STATEMENT); + this.exec_sql ("PRAGMA synchronous=OFF"); } public override void upgrade (int old_version, int new_version) throws SqlError { - + if (old_version == 1) { + this.exec_sql ("PRAGMA synchronous=OFF"); + } } public bool add_or_update_event (Event event, uint channel_sid, @@ -219,6 +234,28 @@ return true; } + + public bool remove_events_older_than (Event event, uint channel_sid, + uint group_id) throws SqlError + { + this.delete_expired_events.reset (); + time_t timestamp = event.get_end_timestamp (); + + if (this.delete_expired_events.bind_int64 (1, timestamp) != Sqlite.OK + || this.delete_expired_events.bind_int (2, (int)channel_sid) != Sqlite.OK + || this.delete_expired_events.bind_int (3, (int)group_id) != Sqlite.OK) + { + this.throw_last_error (); + return false; + } + + if (this.delete_expired_events.step () != Sqlite.DONE) { + this.throw_last_error (); + return false; + } + + return true; + } public bool contains_event (Event event, uint channel_sid, uint group_id) throws SqlError { @@ -246,7 +283,7 @@ if (this.db == null) return events; - string statement_str = SELECT_ALL_EVENTS_STATEMENT.printf ( + string statement_str = SELECT_MINIMAL_EVENTS_STATEMENT.printf ( group_id, channel_sid); Statement statement; @@ -256,7 +293,7 @@ } while (statement.step () == Sqlite.ROW) { - Event event = this.create_event_from_statement (statement); + Event event = this.create_minimal_event (statement); events.add (event); } @@ -278,6 +315,24 @@ return true; } + + private Event create_minimal_event (Statement statement) { + var event = new Event (); + event.id = (uint)statement.column_int (0); + + weak string starttime = statement.column_text (1); + starttime.scanf ("%04u-%02u-%02u %02u:%02u:%02u", + &event.year, + &event.month, + &event.day, + &event.hour, + &event.minute, + &event.second); + + event.duration = (uint)statement.column_int (2); + + return event; + } private Event create_event_from_statement (Statement statement) { var event = new Event (); diff -Nru gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteUtils.c gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteUtils.c --- gnome-dvb-daemon-0.1.16/src/database/sqlite/SqliteUtils.c 2010-02-23 13:10:56.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/sqlite/SqliteUtils.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* SqliteUtils.c generated by valac, the Vala compiler +/* SqliteUtils.c generated by valac 0.9.7, the Vala compiler * generated from SqliteUtils.vala, do not modify */ /* @@ -36,12 +36,14 @@ +/** + * Replace "'" with "''" + */ char* dvb_database_sqlite_utils_escape (const char* text) { - char* result; - GError * _inner_error_; + char* result = NULL; GRegex* regex; char* escaped_str; - _inner_error_ = NULL; + GError * _inner_error_ = NULL; if (text == NULL) { result = g_strdup (""); return result; @@ -53,7 +55,7 @@ _tmp0_ = g_regex_new ("'", G_REGEX_MULTILINE, 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch6_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); @@ -62,8 +64,8 @@ } regex = (_tmp1_ = _tmp0_, _g_regex_unref0 (regex), _tmp1_); } - goto __finally6; - __catch6_g_regex_error: + goto __finally4; + __catch4_g_regex_error: { GError * e; e = _inner_error_; @@ -76,7 +78,7 @@ return result; } } - __finally6: + __finally4: 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); @@ -90,18 +92,18 @@ _tmp2_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "''", 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch7_g_regex_error; + goto __catch5_g_regex_error; } - _g_regex_unref0 (regex); _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 = (_tmp3_ = _tmp2_, _g_free0 (escaped_str), _tmp3_); } - goto __finally7; - __catch7_g_regex_error: + goto __finally5; + __catch5_g_regex_error: { GError * e; e = _inner_error_; @@ -110,15 +112,15 @@ g_warning ("SqliteUtils.vala:45: RegexError: %s", e->message); result = g_strdup (text); _g_error_free0 (e); - _g_regex_unref0 (regex); _g_free0 (escaped_str); + _g_regex_unref0 (regex); return result; } } - __finally7: + __finally5: if (_inner_error_ != NULL) { - _g_regex_unref0 (regex); _g_free0 (escaped_str); + _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; @@ -129,13 +131,15 @@ } +/** + * Replace "''" with "'" + */ char* dvb_database_sqlite_utils_unescape (const char* text) { - char* result; - GError * _inner_error_; + char* result = NULL; GRegex* regex; char* new_str; + GError * _inner_error_ = NULL; g_return_val_if_fail (text != NULL, NULL); - _inner_error_ = NULL; regex = NULL; { GRegex* _tmp0_; @@ -143,7 +147,7 @@ _tmp0_ = g_regex_new ("''", G_REGEX_MULTILINE, 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch8_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); @@ -152,8 +156,8 @@ } regex = (_tmp1_ = _tmp0_, _g_regex_unref0 (regex), _tmp1_); } - goto __finally8; - __catch8_g_regex_error: + goto __finally6; + __catch6_g_regex_error: { GError * e; e = _inner_error_; @@ -166,7 +170,7 @@ return result; } } - __finally8: + __finally6: 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); @@ -180,18 +184,18 @@ _tmp2_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "'", 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch9_g_regex_error; + goto __catch7_g_regex_error; } - _g_regex_unref0 (regex); _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 = (_tmp3_ = _tmp2_, _g_free0 (new_str), _tmp3_); } - goto __finally9; - __catch9_g_regex_error: + goto __finally7; + __catch7_g_regex_error: { GError * e; e = _inner_error_; @@ -200,15 +204,15 @@ g_warning ("SqliteUtils.vala:71: RegexError: %s", e->message); result = g_strdup (text); _g_error_free0 (e); - _g_regex_unref0 (regex); _g_free0 (new_str); + _g_regex_unref0 (regex); return result; } } - __finally9: + __finally7: if (_inner_error_ != NULL) { - _g_regex_unref0 (regex); _g_free0 (new_str); + _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; diff -Nru gnome-dvb-daemon-0.1.16/src/database/TimersStore.c gnome-dvb-daemon-0.1.21/src/database/TimersStore.c --- gnome-dvb-daemon-0.1.16/src/database/TimersStore.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/database/TimersStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* TimersStore.c generated by valac, the Vala compiler +/* TimersStore.c generated by valac 0.9.7, the Vala compiler * generated from TimersStore.vala, do not modify */ /* @@ -92,10 +92,10 @@ -GType dvb_device_group_get_type (void); -GType dvb_timer_get_type (void); +GType dvb_device_group_get_type (void) G_GNUC_CONST; +GType dvb_timer_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_database_timers_store_get_type (void); +GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; GeeList* dvb_database_timers_store_get_all_timers_of_device_group (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error); gboolean dvb_database_timers_store_add_timer_to_device_group (DVBdatabaseTimersStore* self, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); gboolean dvb_database_timers_store_remove_timer_from_device_group (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error); @@ -132,13 +132,15 @@ GType dvb_database_timers_store_get_type (void) { - static GType dvb_database_timers_store_type_id = 0; - if (dvb_database_timers_store_type_id == 0) { + static volatile gsize dvb_database_timers_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_database_timers_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBdatabaseTimersStoreIface), (GBaseInitFunc) dvb_database_timers_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType dvb_database_timers_store_type_id; dvb_database_timers_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "DVBdatabaseTimersStore", &g_define_type_info, 0); g_type_interface_add_prerequisite (dvb_database_timers_store_type_id, G_TYPE_OBJECT); + g_once_init_leave (&dvb_database_timers_store_type_id__volatile, dvb_database_timers_store_type_id); } - return dvb_database_timers_store_type_id; + return dvb_database_timers_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusChannelList.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusChannelList.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusChannelList.c 2010-03-17 19:10:35.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusChannelList.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusChannelList.c generated by valac, the Vala compiler +/* IDBusChannelList.c generated by valac 0.9.7, the Vala compiler * generated from IDBusChannelList.vala, do not modify */ /* @@ -40,9 +40,9 @@ typedef struct _DVBIDBusChannelList DVBIDBusChannelList; typedef struct _DVBIDBusChannelListIface DVBIDBusChannelListIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; typedef struct _DVBIDBusChannelListDBusProxy DVBIDBusChannelListDBusProxy; typedef DBusGProxyClass DVBIDBusChannelListDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBChannelInfo { guint id; @@ -65,23 +65,24 @@ 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; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_channel_info_get_type (void); +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); +DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); guint* dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error); @@ -93,6 +94,8 @@ gboolean dvb_id_bus_channel_list_GetChannelsOfGroup (DVBIDBusChannelList* self, gint channel_group_id, guint** channel_ids, int* channel_ids_length1, GError** error); 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 _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); @@ -111,8 +114,7 @@ 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); -DVBIDBusChannelList* dvb_id_bus_channel_list_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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 { @@ -132,8 +134,6 @@ static void dvb_id_bus_channel_list_dbus_proxy_dvb_id_bus_channel_list__interface_init (DVBIDBusChannelListIface* iface); static void dvb_id_bus_channel_list_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_channel_list_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -167,44 +167,78 @@ GType dvb_channel_info_get_type (void) { - static GType dvb_channel_info_type_id = 0; - if (dvb_channel_info_type_id == 0) { + static volatile gsize dvb_channel_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_info_type_id__volatile)) { + GType dvb_channel_info_type_id; dvb_channel_info_type_id = g_boxed_type_register_static ("DVBChannelInfo", (GBoxedCopyFunc) dvb_channel_info_dup, (GBoxedFreeFunc) dvb_channel_info_free); + g_once_init_leave (&dvb_channel_info_type_id__volatile, dvb_channel_info_type_id); } - return dvb_channel_info_type_id; + return dvb_channel_info_type_id__volatile; } +/** + * @returns: List of channel IDs aka SIDs of all channels + */ guint* dvb_id_bus_channel_list_GetChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannels (self, result_length1, error); } +/** + * @returns: List of channel IDs aka SIDs of radio channels + */ guint* dvb_id_bus_channel_list_GetRadioChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetRadioChannels (self, result_length1, error); } +/** + * @returns: List of channel IDs aka SIDs of TV channels + */ guint* dvb_id_bus_channel_list_GetTVChannels (DVBIDBusChannelList* self, int* result_length1, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetTVChannels (self, result_length1, error); } +/** + * @channel_id: ID of channel + * @channel_name: Name of channel if channel with id exists + * otherwise an empty string + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_GetChannelName (DVBIDBusChannelList* self, guint channel_id, char** channel_name, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelName (self, channel_id, channel_name, error); } +/** + * @channel_id: ID of channel + * @network: Name of network the channel belongs to + * if the channel with id exists, otherwise an empty + * string + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_GetChannelNetwork (DVBIDBusChannelList* self, guint channel_id, char** network, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelNetwork (self, channel_id, network, error); } +/** + * @channel_id: ID of channel + * @radio: Whether the channel is a radio channel or not + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_IsRadioChannel (DVBIDBusChannelList* self, guint channel_id, gboolean* radio, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->IsRadioChannel (self, channel_id, radio, error); } +/** + * @channel_id: ID of channel + * @url: URL to watch the channel + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_GetChannelURL (DVBIDBusChannelList* self, guint channel_id, char** url, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelURL (self, channel_id, url, error); } @@ -215,21 +249,54 @@ } +/** + * @channel_group_id: ID of the ChannelGroup + * @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) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->GetChannelsOfGroup (self, channel_group_id, channel_ids, channel_ids_length1, error); } +/** + * @channel_id: ID of channel + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->AddChannelToGroup (self, channel_id, channel_group_id, error); } +/** + * @channel_id: ID of channel + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ gboolean dvb_id_bus_channel_list_RemoveChannelFromGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { return DVB_ID_BUS_CHANNEL_LIST_GET_INTERFACE (self)->RemoveChannelFromGroup (self, channel_id, channel_group_id, 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_channel_list_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -1986,6 +2053,9 @@ 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)); } @@ -1993,14 +2063,16 @@ GType dvb_id_bus_channel_list_get_type (void) { - static GType dvb_id_bus_channel_list_type_id = 0; - if (dvb_id_bus_channel_list_type_id == 0) { + 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; + return dvb_id_bus_channel_list_type_id__volatile; } @@ -2033,20 +2105,20 @@ 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 _tmp46_; + dbus_uint32_t _tmp93_; guint type = 0U; - dbus_uint32_t _tmp47_; + dbus_uint32_t _tmp94_; DBusMessage* reply; if (strcmp (dbus_message_get_signature (message), "uu")) { return; } dbus_message_iter_init (message, &iter); - dbus_message_iter_get_basic (&iter, &_tmp46_); + dbus_message_iter_get_basic (&iter, &_tmp93_); dbus_message_iter_next (&iter); - channel_id = _tmp46_; - dbus_message_iter_get_basic (&iter, &_tmp47_); + channel_id = _tmp93_; + dbus_message_iter_get_basic (&iter, &_tmp94_); dbus_message_iter_next (&iter); - type = _tmp47_; + type = _tmp94_; g_signal_emit_by_name (self, "changed", channel_id, type); } @@ -2092,13 +2164,13 @@ DBusMessageIter _iter; guint* _result; int _result_length1; - guint* _tmp48_; - int _tmp48__length; - int _tmp48__size; - int _tmp48__length1; - DBusMessageIter _tmp49_; + guint* _tmp95_; + int _tmp95__length; + int _tmp95__size; + int _tmp95__length1; + DBusMessageIter _tmp96_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2112,78 +2184,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp51_; + const char* _tmp98_; _edomain = DBUS_GERROR; - _tmp51_ = _dbus_error.name + 27; - if (strcmp (_tmp51_, "Failed") == 0) { + _tmp98_ = _dbus_error.name + 27; + if (strcmp (_tmp98_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp51_, "NoMemory") == 0) { + } else if (strcmp (_tmp98_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp51_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp98_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp51_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp98_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp51_, "NoReply") == 0) { + } else if (strcmp (_tmp98_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp51_, "IOError") == 0) { + } else if (strcmp (_tmp98_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp51_, "BadAddress") == 0) { + } else if (strcmp (_tmp98_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp51_, "NotSupported") == 0) { + } else if (strcmp (_tmp98_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp51_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp98_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp51_, "AccessDenied") == 0) { + } else if (strcmp (_tmp98_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp51_, "AuthFailed") == 0) { + } else if (strcmp (_tmp98_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp51_, "NoServer") == 0) { + } else if (strcmp (_tmp98_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp51_, "Timeout") == 0) { + } else if (strcmp (_tmp98_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp51_, "NoNetwork") == 0) { + } else if (strcmp (_tmp98_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp51_, "AddressInUse") == 0) { + } else if (strcmp (_tmp98_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp51_, "Disconnected") == 0) { + } else if (strcmp (_tmp98_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp51_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp98_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp51_, "FileNotFound") == 0) { + } else if (strcmp (_tmp98_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp51_, "FileExists") == 0) { + } else if (strcmp (_tmp98_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp51_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp98_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp51_, "TimedOut") == 0) { + } else if (strcmp (_tmp98_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp51_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp98_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp51_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp98_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp51_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp98_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp51_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp98_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp51_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp98_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp51_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp98_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp51_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp98_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp51_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp98_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp51_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp98_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp51_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp98_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp51_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp98_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp51_, "RemoteException") == 0) { + } else if (strcmp (_tmp98_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2194,24 +2266,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp48_ = g_new (guint, 5); - _tmp48__length = 0; - _tmp48__size = 4; - _tmp48__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp49_); - for (; dbus_message_iter_get_arg_type (&_tmp49_); _tmp48__length1++) { - dbus_uint32_t _tmp50_; - if (_tmp48__size == _tmp48__length) { - _tmp48__size = 2 * _tmp48__size; - _tmp48_ = g_renew (guint, _tmp48_, _tmp48__size + 1); - } - dbus_message_iter_get_basic (&_tmp49_, &_tmp50_); - dbus_message_iter_next (&_tmp49_); - _tmp48_[_tmp48__length++] = _tmp50_; + _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 = _tmp48__length1; + _result_length1 = _tmp95__length1; dbus_message_iter_next (&_iter); - _result = _tmp48_; + _result = _tmp95_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2225,13 +2297,13 @@ DBusMessageIter _iter; guint* _result; int _result_length1; - guint* _tmp52_; - int _tmp52__length; - int _tmp52__size; - int _tmp52__length1; - DBusMessageIter _tmp53_; + guint* _tmp99_; + int _tmp99__length; + int _tmp99__size; + int _tmp99__length1; + DBusMessageIter _tmp100_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2245,78 +2317,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp55_; + const char* _tmp102_; _edomain = DBUS_GERROR; - _tmp55_ = _dbus_error.name + 27; - if (strcmp (_tmp55_, "Failed") == 0) { + _tmp102_ = _dbus_error.name + 27; + if (strcmp (_tmp102_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp55_, "NoMemory") == 0) { + } else if (strcmp (_tmp102_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp55_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp102_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp55_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp102_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp55_, "NoReply") == 0) { + } else if (strcmp (_tmp102_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp55_, "IOError") == 0) { + } else if (strcmp (_tmp102_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp55_, "BadAddress") == 0) { + } else if (strcmp (_tmp102_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp55_, "NotSupported") == 0) { + } else if (strcmp (_tmp102_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp55_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp102_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp55_, "AccessDenied") == 0) { + } else if (strcmp (_tmp102_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp55_, "AuthFailed") == 0) { + } else if (strcmp (_tmp102_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp55_, "NoServer") == 0) { + } else if (strcmp (_tmp102_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp55_, "Timeout") == 0) { + } else if (strcmp (_tmp102_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp55_, "NoNetwork") == 0) { + } else if (strcmp (_tmp102_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp55_, "AddressInUse") == 0) { + } else if (strcmp (_tmp102_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp55_, "Disconnected") == 0) { + } else if (strcmp (_tmp102_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp55_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp102_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp55_, "FileNotFound") == 0) { + } else if (strcmp (_tmp102_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp55_, "FileExists") == 0) { + } else if (strcmp (_tmp102_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp55_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp102_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp55_, "TimedOut") == 0) { + } else if (strcmp (_tmp102_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp55_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp102_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp55_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp102_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp55_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp102_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp102_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp102_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp55_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp102_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp55_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp102_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp55_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp102_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp55_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp102_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp55_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp102_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp55_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp102_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp55_, "RemoteException") == 0) { + } else if (strcmp (_tmp102_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2327,24 +2399,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp52_ = g_new (guint, 5); - _tmp52__length = 0; - _tmp52__size = 4; - _tmp52__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp53_); - for (; dbus_message_iter_get_arg_type (&_tmp53_); _tmp52__length1++) { - dbus_uint32_t _tmp54_; - if (_tmp52__size == _tmp52__length) { - _tmp52__size = 2 * _tmp52__size; - _tmp52_ = g_renew (guint, _tmp52_, _tmp52__size + 1); - } - dbus_message_iter_get_basic (&_tmp53_, &_tmp54_); - dbus_message_iter_next (&_tmp53_); - _tmp52_[_tmp52__length++] = _tmp54_; + _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 = _tmp52__length1; + _result_length1 = _tmp99__length1; dbus_message_iter_next (&_iter); - _result = _tmp52_; + _result = _tmp99_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2358,13 +2430,13 @@ DBusMessageIter _iter; guint* _result; int _result_length1; - guint* _tmp56_; - int _tmp56__length; - int _tmp56__size; - int _tmp56__length1; - DBusMessageIter _tmp57_; + guint* _tmp103_; + int _tmp103__length; + int _tmp103__size; + int _tmp103__length1; + DBusMessageIter _tmp104_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2378,78 +2450,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp59_; + const char* _tmp106_; _edomain = DBUS_GERROR; - _tmp59_ = _dbus_error.name + 27; - if (strcmp (_tmp59_, "Failed") == 0) { + _tmp106_ = _dbus_error.name + 27; + if (strcmp (_tmp106_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp59_, "NoMemory") == 0) { + } else if (strcmp (_tmp106_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp59_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp106_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp59_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp106_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp59_, "NoReply") == 0) { + } else if (strcmp (_tmp106_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp59_, "IOError") == 0) { + } else if (strcmp (_tmp106_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp59_, "BadAddress") == 0) { + } else if (strcmp (_tmp106_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp59_, "NotSupported") == 0) { + } else if (strcmp (_tmp106_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp59_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp106_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp59_, "AccessDenied") == 0) { + } else if (strcmp (_tmp106_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp59_, "AuthFailed") == 0) { + } else if (strcmp (_tmp106_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp59_, "NoServer") == 0) { + } else if (strcmp (_tmp106_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp59_, "Timeout") == 0) { + } else if (strcmp (_tmp106_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp59_, "NoNetwork") == 0) { + } else if (strcmp (_tmp106_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp59_, "AddressInUse") == 0) { + } else if (strcmp (_tmp106_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp59_, "Disconnected") == 0) { + } else if (strcmp (_tmp106_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp59_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp106_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp59_, "FileNotFound") == 0) { + } else if (strcmp (_tmp106_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp59_, "FileExists") == 0) { + } else if (strcmp (_tmp106_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp59_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp106_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp59_, "TimedOut") == 0) { + } else if (strcmp (_tmp106_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp59_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp106_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp59_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp106_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp59_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp106_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp106_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp106_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp59_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp106_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp59_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp106_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp59_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp106_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp59_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp106_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp59_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp106_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp59_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp106_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp59_, "RemoteException") == 0) { + } else if (strcmp (_tmp106_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2460,24 +2532,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp56_ = g_new (guint, 5); - _tmp56__length = 0; - _tmp56__size = 4; - _tmp56__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp57_); - for (; dbus_message_iter_get_arg_type (&_tmp57_); _tmp56__length1++) { - dbus_uint32_t _tmp58_; - if (_tmp56__size == _tmp56__length) { - _tmp56__size = 2 * _tmp56__size; - _tmp56_ = g_renew (guint, _tmp56_, _tmp56__size + 1); - } - dbus_message_iter_get_basic (&_tmp57_, &_tmp58_); - dbus_message_iter_next (&_tmp57_); - _tmp56_[_tmp56__length++] = _tmp58_; + _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 = _tmp56__length1; + _result_length1 = _tmp103__length1; dbus_message_iter_next (&_iter); - _result = _tmp56_; + _result = _tmp103_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2489,19 +2561,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp60_; + dbus_uint32_t _tmp107_; char* _channel_name; - const char* _tmp61_; + const char* _tmp108_; gboolean _result; - dbus_bool_t _tmp62_; + dbus_bool_t _tmp109_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp60_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp60_); + _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); @@ -2511,78 +2583,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp63_; + const char* _tmp110_; _edomain = DBUS_GERROR; - _tmp63_ = _dbus_error.name + 27; - if (strcmp (_tmp63_, "Failed") == 0) { + _tmp110_ = _dbus_error.name + 27; + if (strcmp (_tmp110_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp63_, "NoMemory") == 0) { + } else if (strcmp (_tmp110_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp63_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp110_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp63_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp110_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp63_, "NoReply") == 0) { + } else if (strcmp (_tmp110_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp63_, "IOError") == 0) { + } else if (strcmp (_tmp110_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp63_, "BadAddress") == 0) { + } else if (strcmp (_tmp110_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp63_, "NotSupported") == 0) { + } else if (strcmp (_tmp110_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp63_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp110_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp63_, "AccessDenied") == 0) { + } else if (strcmp (_tmp110_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp63_, "AuthFailed") == 0) { + } else if (strcmp (_tmp110_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp63_, "NoServer") == 0) { + } else if (strcmp (_tmp110_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp63_, "Timeout") == 0) { + } else if (strcmp (_tmp110_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp63_, "NoNetwork") == 0) { + } else if (strcmp (_tmp110_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp63_, "AddressInUse") == 0) { + } else if (strcmp (_tmp110_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp63_, "Disconnected") == 0) { + } else if (strcmp (_tmp110_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp63_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp110_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp63_, "FileNotFound") == 0) { + } else if (strcmp (_tmp110_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp63_, "FileExists") == 0) { + } else if (strcmp (_tmp110_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp63_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp110_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp63_, "TimedOut") == 0) { + } else if (strcmp (_tmp110_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp63_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp110_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp63_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp110_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp63_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp110_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp63_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp110_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp63_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp110_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp63_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp110_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp63_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp110_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp63_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp110_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp63_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp110_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp63_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp110_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp63_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp110_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp63_, "RemoteException") == 0) { + } else if (strcmp (_tmp110_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2592,13 +2664,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp61_); + dbus_message_iter_get_basic (&_iter, &_tmp108_); dbus_message_iter_next (&_iter); - _channel_name = g_strdup (_tmp61_); + _channel_name = g_strdup (_tmp108_); *channel_name = _channel_name; - dbus_message_iter_get_basic (&_iter, &_tmp62_); + dbus_message_iter_get_basic (&_iter, &_tmp109_); dbus_message_iter_next (&_iter); - _result = _tmp62_; + _result = _tmp109_; dbus_message_unref (_reply); return _result; } @@ -2609,19 +2681,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp64_; + dbus_uint32_t _tmp111_; char* _network; - const char* _tmp65_; + const char* _tmp112_; gboolean _result; - dbus_bool_t _tmp66_; + dbus_bool_t _tmp113_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp64_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp64_); + _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); @@ -2631,78 +2703,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp67_; + const char* _tmp114_; _edomain = DBUS_GERROR; - _tmp67_ = _dbus_error.name + 27; - if (strcmp (_tmp67_, "Failed") == 0) { + _tmp114_ = _dbus_error.name + 27; + if (strcmp (_tmp114_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp67_, "NoMemory") == 0) { + } else if (strcmp (_tmp114_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp67_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp114_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp67_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp114_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp67_, "NoReply") == 0) { + } else if (strcmp (_tmp114_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp67_, "IOError") == 0) { + } else if (strcmp (_tmp114_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp67_, "BadAddress") == 0) { + } else if (strcmp (_tmp114_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp67_, "NotSupported") == 0) { + } else if (strcmp (_tmp114_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp67_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp114_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp67_, "AccessDenied") == 0) { + } else if (strcmp (_tmp114_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp67_, "AuthFailed") == 0) { + } else if (strcmp (_tmp114_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp67_, "NoServer") == 0) { + } else if (strcmp (_tmp114_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp67_, "Timeout") == 0) { + } else if (strcmp (_tmp114_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp67_, "NoNetwork") == 0) { + } else if (strcmp (_tmp114_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp67_, "AddressInUse") == 0) { + } else if (strcmp (_tmp114_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp67_, "Disconnected") == 0) { + } else if (strcmp (_tmp114_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp67_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp114_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp67_, "FileNotFound") == 0) { + } else if (strcmp (_tmp114_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp67_, "FileExists") == 0) { + } else if (strcmp (_tmp114_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp67_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp114_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp67_, "TimedOut") == 0) { + } else if (strcmp (_tmp114_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp67_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp114_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp67_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp114_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp67_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp114_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp67_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp114_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp67_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp114_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp67_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp114_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp67_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp114_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp67_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp114_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp67_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp114_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp67_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp114_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp67_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp114_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp67_, "RemoteException") == 0) { + } else if (strcmp (_tmp114_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2712,13 +2784,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp65_); + dbus_message_iter_get_basic (&_iter, &_tmp112_); dbus_message_iter_next (&_iter); - _network = g_strdup (_tmp65_); + _network = g_strdup (_tmp112_); *network = _network; - dbus_message_iter_get_basic (&_iter, &_tmp66_); + dbus_message_iter_get_basic (&_iter, &_tmp113_); dbus_message_iter_next (&_iter); - _result = _tmp66_; + _result = _tmp113_; dbus_message_unref (_reply); return _result; } @@ -2729,19 +2801,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp68_; + dbus_uint32_t _tmp115_; gboolean _radio; - dbus_bool_t _tmp69_; + dbus_bool_t _tmp116_; gboolean _result; - dbus_bool_t _tmp70_; + dbus_bool_t _tmp117_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp68_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp68_); + _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); @@ -2751,78 +2823,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp71_; + const char* _tmp118_; _edomain = DBUS_GERROR; - _tmp71_ = _dbus_error.name + 27; - if (strcmp (_tmp71_, "Failed") == 0) { + _tmp118_ = _dbus_error.name + 27; + if (strcmp (_tmp118_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp71_, "NoMemory") == 0) { + } else if (strcmp (_tmp118_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp71_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp118_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp71_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp118_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp71_, "NoReply") == 0) { + } else if (strcmp (_tmp118_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp71_, "IOError") == 0) { + } else if (strcmp (_tmp118_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp71_, "BadAddress") == 0) { + } else if (strcmp (_tmp118_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp71_, "NotSupported") == 0) { + } else if (strcmp (_tmp118_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp71_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp118_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp71_, "AccessDenied") == 0) { + } else if (strcmp (_tmp118_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp71_, "AuthFailed") == 0) { + } else if (strcmp (_tmp118_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp71_, "NoServer") == 0) { + } else if (strcmp (_tmp118_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp71_, "Timeout") == 0) { + } else if (strcmp (_tmp118_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp71_, "NoNetwork") == 0) { + } else if (strcmp (_tmp118_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp71_, "AddressInUse") == 0) { + } else if (strcmp (_tmp118_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp71_, "Disconnected") == 0) { + } else if (strcmp (_tmp118_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp71_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp118_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp71_, "FileNotFound") == 0) { + } else if (strcmp (_tmp118_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp71_, "FileExists") == 0) { + } else if (strcmp (_tmp118_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp71_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp118_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp71_, "TimedOut") == 0) { + } else if (strcmp (_tmp118_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp71_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp118_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp71_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp118_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp71_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp118_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp71_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp118_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp71_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp118_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp71_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp118_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp71_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp118_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp71_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp118_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp71_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp118_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp71_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp118_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp71_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp118_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp71_, "RemoteException") == 0) { + } else if (strcmp (_tmp118_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2832,13 +2904,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp69_); + dbus_message_iter_get_basic (&_iter, &_tmp116_); dbus_message_iter_next (&_iter); - _radio = _tmp69_; + _radio = _tmp116_; *radio = _radio; - dbus_message_iter_get_basic (&_iter, &_tmp70_); + dbus_message_iter_get_basic (&_iter, &_tmp117_); dbus_message_iter_next (&_iter); - _result = _tmp70_; + _result = _tmp117_; dbus_message_unref (_reply); return _result; } @@ -2849,19 +2921,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp72_; + dbus_uint32_t _tmp119_; char* _url; - const char* _tmp73_; + const char* _tmp120_; gboolean _result; - dbus_bool_t _tmp74_; + dbus_bool_t _tmp121_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp72_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp72_); + _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); @@ -2871,78 +2943,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp75_; + const char* _tmp122_; _edomain = DBUS_GERROR; - _tmp75_ = _dbus_error.name + 27; - if (strcmp (_tmp75_, "Failed") == 0) { + _tmp122_ = _dbus_error.name + 27; + if (strcmp (_tmp122_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp75_, "NoMemory") == 0) { + } else if (strcmp (_tmp122_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp75_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp122_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp75_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp122_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp75_, "NoReply") == 0) { + } else if (strcmp (_tmp122_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp75_, "IOError") == 0) { + } else if (strcmp (_tmp122_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp75_, "BadAddress") == 0) { + } else if (strcmp (_tmp122_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp75_, "NotSupported") == 0) { + } else if (strcmp (_tmp122_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp75_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp122_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp75_, "AccessDenied") == 0) { + } else if (strcmp (_tmp122_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp75_, "AuthFailed") == 0) { + } else if (strcmp (_tmp122_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp75_, "NoServer") == 0) { + } else if (strcmp (_tmp122_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp75_, "Timeout") == 0) { + } else if (strcmp (_tmp122_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp75_, "NoNetwork") == 0) { + } else if (strcmp (_tmp122_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp75_, "AddressInUse") == 0) { + } else if (strcmp (_tmp122_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp75_, "Disconnected") == 0) { + } else if (strcmp (_tmp122_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp75_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp122_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp75_, "FileNotFound") == 0) { + } else if (strcmp (_tmp122_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp75_, "FileExists") == 0) { + } else if (strcmp (_tmp122_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp75_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp122_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp75_, "TimedOut") == 0) { + } else if (strcmp (_tmp122_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp75_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp122_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp75_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp122_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp75_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp122_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp75_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp122_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp75_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp122_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp75_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp122_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp75_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp122_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp75_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp122_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp75_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp122_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp75_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp122_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp75_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp122_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp75_, "RemoteException") == 0) { + } else if (strcmp (_tmp122_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2952,13 +3024,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp73_); + dbus_message_iter_get_basic (&_iter, &_tmp120_); dbus_message_iter_next (&_iter); - _url = g_strdup (_tmp73_); + _url = g_strdup (_tmp120_); *url = _url; - dbus_message_iter_get_basic (&_iter, &_tmp74_); + dbus_message_iter_get_basic (&_iter, &_tmp121_); dbus_message_iter_next (&_iter); - _result = _tmp74_; + _result = _tmp121_; dbus_message_unref (_reply); return _result; } @@ -2971,13 +3043,13 @@ DBusMessageIter _iter; DVBChannelInfo* _result; int _result_length1; - DVBChannelInfo* _tmp76_; - int _tmp76__length; - int _tmp76__size; - int _tmp76__length1; - DBusMessageIter _tmp77_; + DVBChannelInfo* _tmp123_; + int _tmp123__length; + int _tmp123__size; + int _tmp123__length1; + DBusMessageIter _tmp124_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "GetChannelInfos"); @@ -2991,78 +3063,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp83_; + const char* _tmp130_; _edomain = DBUS_GERROR; - _tmp83_ = _dbus_error.name + 27; - if (strcmp (_tmp83_, "Failed") == 0) { + _tmp130_ = _dbus_error.name + 27; + if (strcmp (_tmp130_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp83_, "NoMemory") == 0) { + } else if (strcmp (_tmp130_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp83_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp130_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp83_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp130_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp83_, "NoReply") == 0) { + } else if (strcmp (_tmp130_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp83_, "IOError") == 0) { + } else if (strcmp (_tmp130_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp83_, "BadAddress") == 0) { + } else if (strcmp (_tmp130_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp83_, "NotSupported") == 0) { + } else if (strcmp (_tmp130_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp83_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp130_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp83_, "AccessDenied") == 0) { + } else if (strcmp (_tmp130_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp83_, "AuthFailed") == 0) { + } else if (strcmp (_tmp130_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp83_, "NoServer") == 0) { + } else if (strcmp (_tmp130_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp83_, "Timeout") == 0) { + } else if (strcmp (_tmp130_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp83_, "NoNetwork") == 0) { + } else if (strcmp (_tmp130_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp83_, "AddressInUse") == 0) { + } else if (strcmp (_tmp130_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp83_, "Disconnected") == 0) { + } else if (strcmp (_tmp130_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp83_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp130_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp83_, "FileNotFound") == 0) { + } else if (strcmp (_tmp130_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp83_, "FileExists") == 0) { + } else if (strcmp (_tmp130_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp83_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp130_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp83_, "TimedOut") == 0) { + } else if (strcmp (_tmp130_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp83_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp130_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp83_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp130_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp83_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp130_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp83_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp130_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp83_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp130_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp83_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp130_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp83_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp130_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp83_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp130_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp83_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp130_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp83_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp130_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp83_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp130_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp83_, "RemoteException") == 0) { + } else if (strcmp (_tmp130_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -3073,37 +3145,37 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp76_ = g_new (DVBChannelInfo, 5); - _tmp76__length = 0; - _tmp76__size = 4; - _tmp76__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp77_); - for (; dbus_message_iter_get_arg_type (&_tmp77_); _tmp76__length1++) { - DVBChannelInfo _tmp78_; - DBusMessageIter _tmp79_; - dbus_uint32_t _tmp80_; - const char* _tmp81_; - dbus_bool_t _tmp82_; - if (_tmp76__size == _tmp76__length) { - _tmp76__size = 2 * _tmp76__size; - _tmp76_ = g_renew (DVBChannelInfo, _tmp76_, _tmp76__size + 1); - } - dbus_message_iter_recurse (&_tmp77_, &_tmp79_); - dbus_message_iter_get_basic (&_tmp79_, &_tmp80_); - dbus_message_iter_next (&_tmp79_); - _tmp78_.id = _tmp80_; - dbus_message_iter_get_basic (&_tmp79_, &_tmp81_); - dbus_message_iter_next (&_tmp79_); - _tmp78_.name = g_strdup (_tmp81_); - dbus_message_iter_get_basic (&_tmp79_, &_tmp82_); - dbus_message_iter_next (&_tmp79_); - _tmp78_.is_radio = _tmp82_; - dbus_message_iter_next (&_tmp77_); - _tmp76_[_tmp76__length++] = _tmp78_; + _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 = _tmp76__length1; + _result_length1 = _tmp123__length1; dbus_message_iter_next (&_iter); - _result = _tmp76_; + _result = _tmp123_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -3115,24 +3187,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_int32_t _tmp84_; + dbus_int32_t _tmp131_; guint* _channel_ids; int _channel_ids_length1; - guint* _tmp85_; - int _tmp85__length; - int _tmp85__size; - int _tmp85__length1; - DBusMessageIter _tmp86_; + guint* _tmp132_; + int _tmp132__length; + int _tmp132__size; + int _tmp132__length1; + DBusMessageIter _tmp133_; gboolean _result; - dbus_bool_t _tmp88_; + dbus_bool_t _tmp135_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp84_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp84_); + _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); @@ -3142,78 +3214,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp89_; + const char* _tmp136_; _edomain = DBUS_GERROR; - _tmp89_ = _dbus_error.name + 27; - if (strcmp (_tmp89_, "Failed") == 0) { + _tmp136_ = _dbus_error.name + 27; + if (strcmp (_tmp136_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp89_, "NoMemory") == 0) { + } else if (strcmp (_tmp136_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp89_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp136_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp89_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp136_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp89_, "NoReply") == 0) { + } else if (strcmp (_tmp136_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp89_, "IOError") == 0) { + } else if (strcmp (_tmp136_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp89_, "BadAddress") == 0) { + } else if (strcmp (_tmp136_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp89_, "NotSupported") == 0) { + } else if (strcmp (_tmp136_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp89_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp136_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp89_, "AccessDenied") == 0) { + } else if (strcmp (_tmp136_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp89_, "AuthFailed") == 0) { + } else if (strcmp (_tmp136_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp89_, "NoServer") == 0) { + } else if (strcmp (_tmp136_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp89_, "Timeout") == 0) { + } else if (strcmp (_tmp136_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp89_, "NoNetwork") == 0) { + } else if (strcmp (_tmp136_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp89_, "AddressInUse") == 0) { + } else if (strcmp (_tmp136_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp89_, "Disconnected") == 0) { + } else if (strcmp (_tmp136_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp89_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp136_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp89_, "FileNotFound") == 0) { + } else if (strcmp (_tmp136_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp89_, "FileExists") == 0) { + } else if (strcmp (_tmp136_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp89_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp136_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp89_, "TimedOut") == 0) { + } else if (strcmp (_tmp136_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp89_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp136_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp89_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp136_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp89_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp136_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp89_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp136_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp89_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp136_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp89_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp136_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp89_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp136_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp89_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp136_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp89_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp136_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp89_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp136_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp89_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp136_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp89_, "RemoteException") == 0) { + } else if (strcmp (_tmp136_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3224,29 +3296,29 @@ } dbus_message_iter_init (_reply, &_iter); _channel_ids_length1 = 0; - _tmp85_ = g_new (guint, 5); - _tmp85__length = 0; - _tmp85__size = 4; - _tmp85__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp86_); - for (; dbus_message_iter_get_arg_type (&_tmp86_); _tmp85__length1++) { - dbus_uint32_t _tmp87_; - if (_tmp85__size == _tmp85__length) { - _tmp85__size = 2 * _tmp85__size; - _tmp85_ = g_renew (guint, _tmp85_, _tmp85__size + 1); - } - dbus_message_iter_get_basic (&_tmp86_, &_tmp87_); - dbus_message_iter_next (&_tmp86_); - _tmp85_[_tmp85__length++] = _tmp87_; + _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 = _tmp85__length1; + _channel_ids_length1 = _tmp132__length1; dbus_message_iter_next (&_iter); - _channel_ids = _tmp85_; + _channel_ids = _tmp132_; *channel_ids = _channel_ids; *channel_ids_length1 = _channel_ids_length1; - dbus_message_iter_get_basic (&_iter, &_tmp88_); + dbus_message_iter_get_basic (&_iter, &_tmp135_); dbus_message_iter_next (&_iter); - _result = _tmp88_; + _result = _tmp135_; dbus_message_unref (_reply); return _result; } @@ -3257,20 +3329,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp90_; - dbus_int32_t _tmp91_; + dbus_uint32_t _tmp137_; + dbus_int32_t _tmp138_; gboolean _result; - dbus_bool_t _tmp92_; + dbus_bool_t _tmp139_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp90_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp90_); - _tmp91_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp91_); + _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); @@ -3280,78 +3352,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp93_; + const char* _tmp140_; _edomain = DBUS_GERROR; - _tmp93_ = _dbus_error.name + 27; - if (strcmp (_tmp93_, "Failed") == 0) { + _tmp140_ = _dbus_error.name + 27; + if (strcmp (_tmp140_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp93_, "NoMemory") == 0) { + } else if (strcmp (_tmp140_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp93_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp140_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp93_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp140_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp93_, "NoReply") == 0) { + } else if (strcmp (_tmp140_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp93_, "IOError") == 0) { + } else if (strcmp (_tmp140_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp93_, "BadAddress") == 0) { + } else if (strcmp (_tmp140_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp93_, "NotSupported") == 0) { + } else if (strcmp (_tmp140_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp93_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp140_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp93_, "AccessDenied") == 0) { + } else if (strcmp (_tmp140_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp93_, "AuthFailed") == 0) { + } else if (strcmp (_tmp140_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp93_, "NoServer") == 0) { + } else if (strcmp (_tmp140_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp93_, "Timeout") == 0) { + } else if (strcmp (_tmp140_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp93_, "NoNetwork") == 0) { + } else if (strcmp (_tmp140_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp93_, "AddressInUse") == 0) { + } else if (strcmp (_tmp140_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp93_, "Disconnected") == 0) { + } else if (strcmp (_tmp140_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp93_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp140_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp93_, "FileNotFound") == 0) { + } else if (strcmp (_tmp140_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp93_, "FileExists") == 0) { + } else if (strcmp (_tmp140_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp93_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp140_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp93_, "TimedOut") == 0) { + } else if (strcmp (_tmp140_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp93_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp140_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp93_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp140_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp93_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp140_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp93_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp140_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp93_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp140_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp93_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp140_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp93_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp140_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp93_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp140_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp93_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp140_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp93_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp140_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp93_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp140_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp93_, "RemoteException") == 0) { + } else if (strcmp (_tmp140_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3361,9 +3433,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp92_); + dbus_message_iter_get_basic (&_iter, &_tmp139_); dbus_message_iter_next (&_iter); - _result = _tmp92_; + _result = _tmp139_; dbus_message_unref (_reply); return _result; } @@ -3374,20 +3446,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp94_; - dbus_int32_t _tmp95_; + dbus_uint32_t _tmp141_; + dbus_int32_t _tmp142_; gboolean _result; - dbus_bool_t _tmp96_; + dbus_bool_t _tmp143_; if (((DVBIDBusChannelListDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp94_ = channel_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp94_); - _tmp95_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp95_); + _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); @@ -3397,78 +3469,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp97_; + const char* _tmp144_; _edomain = DBUS_GERROR; - _tmp97_ = _dbus_error.name + 27; - if (strcmp (_tmp97_, "Failed") == 0) { + _tmp144_ = _dbus_error.name + 27; + if (strcmp (_tmp144_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp97_, "NoMemory") == 0) { + } else if (strcmp (_tmp144_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp97_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp144_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp97_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp144_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp97_, "NoReply") == 0) { + } else if (strcmp (_tmp144_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp97_, "IOError") == 0) { + } else if (strcmp (_tmp144_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp97_, "BadAddress") == 0) { + } else if (strcmp (_tmp144_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp97_, "NotSupported") == 0) { + } else if (strcmp (_tmp144_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp97_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp144_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp97_, "AccessDenied") == 0) { + } else if (strcmp (_tmp144_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp97_, "AuthFailed") == 0) { + } else if (strcmp (_tmp144_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp97_, "NoServer") == 0) { + } else if (strcmp (_tmp144_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp97_, "Timeout") == 0) { + } else if (strcmp (_tmp144_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp97_, "NoNetwork") == 0) { + } else if (strcmp (_tmp144_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp97_, "AddressInUse") == 0) { + } else if (strcmp (_tmp144_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp97_, "Disconnected") == 0) { + } else if (strcmp (_tmp144_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp97_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp144_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp97_, "FileNotFound") == 0) { + } else if (strcmp (_tmp144_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp97_, "FileExists") == 0) { + } else if (strcmp (_tmp144_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp97_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp144_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp97_, "TimedOut") == 0) { + } else if (strcmp (_tmp144_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp97_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp144_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp97_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp144_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp97_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp144_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp97_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp144_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp97_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp144_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp97_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp144_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp97_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp144_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp97_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp144_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp97_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp144_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp97_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp144_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp97_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp144_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp97_, "RemoteException") == 0) { + } else if (strcmp (_tmp144_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3478,9 +3550,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp96_); + dbus_message_iter_get_basic (&_iter, &_tmp143_); dbus_message_iter_next (&_iter); - _result = _tmp96_; + _result = _tmp143_; dbus_message_unref (_reply); return _result; } @@ -3509,25 +3581,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); -} - - 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); diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusDeviceGroup.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusDeviceGroup.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusDeviceGroup.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusDeviceGroup.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusDeviceGroup.c generated by valac, the Vala compiler +/* IDBusDeviceGroup.c generated by valac 0.9.7, the Vala compiler * generated from IDBusDeviceGroup.vala, do not modify */ /* @@ -36,10 +36,10 @@ typedef struct _DVBIDBusDeviceGroup DVBIDBusDeviceGroup; typedef struct _DVBIDBusDeviceGroupIface DVBIDBusDeviceGroupIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; #define _g_free0(var) (var = (g_free (var), NULL)) typedef struct _DVBIDBusDeviceGroupDBusProxy DVBIDBusDeviceGroupDBusProxy; typedef DBusGProxyClass DVBIDBusDeviceGroupDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBIDBusDeviceGroupIface { GTypeInterface parent_iface; @@ -56,18 +56,19 @@ gboolean (*SetRecordingsDirectory) (DVBIDBusDeviceGroup* self, const char* location, GError** error); }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _DVBIDBusDeviceGroupDBusProxy { DBusGProxy parent_instance; gboolean disposed; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_id_bus_device_group_get_type (void); +DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +GType dvb_id_bus_device_group_get_type (void) G_GNUC_CONST; char* dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GError** error); char* dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GError** error); gboolean dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error); @@ -79,6 +80,8 @@ gboolean dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error); char* dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error); gboolean dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const char* location, 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_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); @@ -97,8 +100,7 @@ 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); -DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); @@ -121,69 +123,139 @@ static void dvb_id_bus_device_group_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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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 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); +/** + * @returns: Name of adapter type the group holds + * or an empty string when group with given id doesn't exist. + */ char* dvb_id_bus_device_group_GetType (DVBIDBusDeviceGroup* self, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetType (self, error); } +/** + * @returns: Object path of the device's recorder + * + * Returns the object path to the device's recorder. + */ char* dvb_id_bus_device_group_GetRecorder (DVBIDBusDeviceGroup* self, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetRecorder (self, error); } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @group_id: ID of device group + * @returns: TRUE when the device has been registered successfully + * + * Creates a new device and adds it to the specified DeviceGroup. + * The new device will inherit all settings from the group's + * reference device. + */ gboolean dvb_id_bus_device_group_AddDevice (DVBIDBusDeviceGroup* self, guint adapter, guint frontend, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->AddDevice (self, adapter, frontend, error); } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @returns: TRUE when device has been removed successfully + * + * Removes the device from the group. If the group contains + * 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) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->RemoveDevice (self, adapter, frontend, error); } +/** + * @returns: Object path to the ChannelList service for this device + */ char* dvb_id_bus_device_group_GetChannelList (DVBIDBusDeviceGroup* self, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetChannelList (self, error); } +/** + * @returns: Name of the device group + */ char* dvb_id_bus_device_group_GetName (DVBIDBusDeviceGroup* self, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetName (self, error); } +/** + * @name: Name of the group + * @returns: TRUE on success + */ gboolean dvb_id_bus_device_group_SetName (DVBIDBusDeviceGroup* self, const char* name, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->SetName (self, name, error); } +/** + * @returns: List of paths to the devices that are part of + * the group (e.g. /dev/dvb/adapter0/frontend0) + */ char** dvb_id_bus_device_group_GetMembers (DVBIDBusDeviceGroup* self, int* result_length1, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetMembers (self, result_length1, error); } +/** + * @channel_sid: ID of the channel + * @opath: Object path to Schedule service + * @returns: TRUE on success + */ gboolean dvb_id_bus_device_group_GetSchedule (DVBIDBusDeviceGroup* self, guint channel_sid, char** opath, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetSchedule (self, channel_sid, opath, error); } +/** + * @returns: Location of the recordings directory + */ char* dvb_id_bus_device_group_GetRecordingsDirectory (DVBIDBusDeviceGroup* self, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->GetRecordingsDirectory (self, error); } +/** + * @location: Location of the recordings directory + * @returns: TRUE on success + */ gboolean dvb_id_bus_device_group_SetRecordingsDirectory (DVBIDBusDeviceGroup* self, const char* location, GError** error) { return DVB_ID_BUS_DEVICE_GROUP_GET_INTERFACE (self)->SetRecordingsDirectory (self, location, 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_device_group_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -1878,14 +1950,16 @@ GType dvb_id_bus_device_group_get_type (void) { - static GType dvb_id_bus_device_group_type_id = 0; - if (dvb_id_bus_device_group_type_id == 0) { + static volatile gsize dvb_id_bus_device_group_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_device_group_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusDeviceGroupIface), (GBaseInitFunc) dvb_id_bus_device_group_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_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; + return dvb_id_bus_device_group_type_id__volatile; } @@ -1918,20 +1992,20 @@ static void _dbus_handle_dvb_id_bus_device_group_device_added (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint adapter = 0U; - dbus_uint32_t _tmp27_; + dbus_uint32_t _tmp145_; guint frontend = 0U; - dbus_uint32_t _tmp28_; + 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, &_tmp27_); + dbus_message_iter_get_basic (&iter, &_tmp145_); dbus_message_iter_next (&iter); - adapter = _tmp27_; - dbus_message_iter_get_basic (&iter, &_tmp28_); + adapter = _tmp145_; + dbus_message_iter_get_basic (&iter, &_tmp146_); dbus_message_iter_next (&iter); - frontend = _tmp28_; + frontend = _tmp146_; g_signal_emit_by_name (self, "device-added", adapter, frontend); } @@ -1939,20 +2013,20 @@ static void _dbus_handle_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint adapter = 0U; - dbus_uint32_t _tmp29_; + dbus_uint32_t _tmp147_; guint frontend = 0U; - dbus_uint32_t _tmp30_; + 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, &_tmp29_); + dbus_message_iter_get_basic (&iter, &_tmp147_); dbus_message_iter_next (&iter); - adapter = _tmp29_; - dbus_message_iter_get_basic (&iter, &_tmp30_); + adapter = _tmp147_; + dbus_message_iter_get_basic (&iter, &_tmp148_); dbus_message_iter_next (&iter); - frontend = _tmp30_; + frontend = _tmp148_; g_signal_emit_by_name (self, "device-removed", adapter, frontend); } @@ -1999,9 +2073,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; char* _result; - const char* _tmp31_; + const char* _tmp149_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2015,78 +2089,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp32_; + const char* _tmp150_; _edomain = DBUS_GERROR; - _tmp32_ = _dbus_error.name + 27; - if (strcmp (_tmp32_, "Failed") == 0) { + _tmp150_ = _dbus_error.name + 27; + if (strcmp (_tmp150_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp32_, "NoMemory") == 0) { + } else if (strcmp (_tmp150_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp32_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp150_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp32_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp150_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp32_, "NoReply") == 0) { + } else if (strcmp (_tmp150_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp32_, "IOError") == 0) { + } else if (strcmp (_tmp150_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp32_, "BadAddress") == 0) { + } else if (strcmp (_tmp150_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp32_, "NotSupported") == 0) { + } else if (strcmp (_tmp150_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp32_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp150_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp32_, "AccessDenied") == 0) { + } else if (strcmp (_tmp150_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp32_, "AuthFailed") == 0) { + } else if (strcmp (_tmp150_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp32_, "NoServer") == 0) { + } else if (strcmp (_tmp150_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp32_, "Timeout") == 0) { + } else if (strcmp (_tmp150_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp32_, "NoNetwork") == 0) { + } else if (strcmp (_tmp150_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp32_, "AddressInUse") == 0) { + } else if (strcmp (_tmp150_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp32_, "Disconnected") == 0) { + } else if (strcmp (_tmp150_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp32_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp150_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp32_, "FileNotFound") == 0) { + } else if (strcmp (_tmp150_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp32_, "FileExists") == 0) { + } else if (strcmp (_tmp150_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp32_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp150_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp32_, "TimedOut") == 0) { + } else if (strcmp (_tmp150_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp32_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp150_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp32_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp150_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp32_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp150_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp32_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp150_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp32_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp150_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp32_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp150_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp32_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp150_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp32_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp150_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp32_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp150_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp32_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp150_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp32_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp150_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp32_, "RemoteException") == 0) { + } else if (strcmp (_tmp150_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2096,9 +2170,9 @@ return NULL; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp31_); + dbus_message_iter_get_basic (&_iter, &_tmp149_); dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp31_); + _result = g_strdup (_tmp149_); dbus_message_unref (_reply); return _result; } @@ -2110,9 +2184,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; char* _result; - const char* _tmp33_; + const char* _tmp151_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "GetRecorder"); @@ -2126,78 +2200,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp34_; + const char* _tmp152_; _edomain = DBUS_GERROR; - _tmp34_ = _dbus_error.name + 27; - if (strcmp (_tmp34_, "Failed") == 0) { + _tmp152_ = _dbus_error.name + 27; + if (strcmp (_tmp152_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp34_, "NoMemory") == 0) { + } else if (strcmp (_tmp152_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp34_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp152_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp34_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp152_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp34_, "NoReply") == 0) { + } else if (strcmp (_tmp152_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp34_, "IOError") == 0) { + } else if (strcmp (_tmp152_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp34_, "BadAddress") == 0) { + } else if (strcmp (_tmp152_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp34_, "NotSupported") == 0) { + } else if (strcmp (_tmp152_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp34_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp152_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp34_, "AccessDenied") == 0) { + } else if (strcmp (_tmp152_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp34_, "AuthFailed") == 0) { + } else if (strcmp (_tmp152_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp34_, "NoServer") == 0) { + } else if (strcmp (_tmp152_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp34_, "Timeout") == 0) { + } else if (strcmp (_tmp152_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp34_, "NoNetwork") == 0) { + } else if (strcmp (_tmp152_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp34_, "AddressInUse") == 0) { + } else if (strcmp (_tmp152_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp34_, "Disconnected") == 0) { + } else if (strcmp (_tmp152_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp34_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp152_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp34_, "FileNotFound") == 0) { + } else if (strcmp (_tmp152_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp34_, "FileExists") == 0) { + } else if (strcmp (_tmp152_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp34_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp152_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp34_, "TimedOut") == 0) { + } else if (strcmp (_tmp152_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp34_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp152_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp34_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp152_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp34_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp152_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp152_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp152_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp34_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp152_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp34_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp152_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp34_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp152_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp34_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp152_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp34_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp152_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp34_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp152_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp34_, "RemoteException") == 0) { + } else if (strcmp (_tmp152_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2207,9 +2281,9 @@ return NULL; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp33_); + dbus_message_iter_get_basic (&_iter, &_tmp151_); dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp33_); + _result = g_strdup (_tmp151_); dbus_message_unref (_reply); return _result; } @@ -2220,20 +2294,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp35_; - dbus_uint32_t _tmp36_; + dbus_uint32_t _tmp153_; + dbus_uint32_t _tmp154_; gboolean _result; - dbus_bool_t _tmp37_; + dbus_bool_t _tmp155_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp35_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp35_); - _tmp36_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp36_); + _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); @@ -2243,78 +2317,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp38_; + const char* _tmp156_; _edomain = DBUS_GERROR; - _tmp38_ = _dbus_error.name + 27; - if (strcmp (_tmp38_, "Failed") == 0) { + _tmp156_ = _dbus_error.name + 27; + if (strcmp (_tmp156_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp38_, "NoMemory") == 0) { + } else if (strcmp (_tmp156_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp38_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp156_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp38_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp156_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp38_, "NoReply") == 0) { + } else if (strcmp (_tmp156_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp38_, "IOError") == 0) { + } else if (strcmp (_tmp156_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp38_, "BadAddress") == 0) { + } else if (strcmp (_tmp156_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp38_, "NotSupported") == 0) { + } else if (strcmp (_tmp156_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp38_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp156_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp38_, "AccessDenied") == 0) { + } else if (strcmp (_tmp156_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp38_, "AuthFailed") == 0) { + } else if (strcmp (_tmp156_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp38_, "NoServer") == 0) { + } else if (strcmp (_tmp156_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp38_, "Timeout") == 0) { + } else if (strcmp (_tmp156_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp38_, "NoNetwork") == 0) { + } else if (strcmp (_tmp156_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp38_, "AddressInUse") == 0) { + } else if (strcmp (_tmp156_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp38_, "Disconnected") == 0) { + } else if (strcmp (_tmp156_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp38_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp156_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp38_, "FileNotFound") == 0) { + } else if (strcmp (_tmp156_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp38_, "FileExists") == 0) { + } else if (strcmp (_tmp156_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp38_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp156_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp38_, "TimedOut") == 0) { + } else if (strcmp (_tmp156_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp38_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp156_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp38_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp156_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp38_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp156_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp38_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp156_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp38_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp156_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp38_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp156_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp38_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp156_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp38_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp156_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp38_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp156_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp38_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp156_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp38_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp156_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp38_, "RemoteException") == 0) { + } else if (strcmp (_tmp156_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2324,9 +2398,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp37_); + dbus_message_iter_get_basic (&_iter, &_tmp155_); dbus_message_iter_next (&_iter); - _result = _tmp37_; + _result = _tmp155_; dbus_message_unref (_reply); return _result; } @@ -2337,20 +2411,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp39_; - dbus_uint32_t _tmp40_; + dbus_uint32_t _tmp157_; + dbus_uint32_t _tmp158_; gboolean _result; - dbus_bool_t _tmp41_; + dbus_bool_t _tmp159_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp39_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp39_); - _tmp40_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp40_); + _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); @@ -2360,78 +2434,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp42_; + const char* _tmp160_; _edomain = DBUS_GERROR; - _tmp42_ = _dbus_error.name + 27; - if (strcmp (_tmp42_, "Failed") == 0) { + _tmp160_ = _dbus_error.name + 27; + if (strcmp (_tmp160_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp42_, "NoMemory") == 0) { + } else if (strcmp (_tmp160_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp42_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp160_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp42_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp160_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp42_, "NoReply") == 0) { + } else if (strcmp (_tmp160_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp42_, "IOError") == 0) { + } else if (strcmp (_tmp160_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp42_, "BadAddress") == 0) { + } else if (strcmp (_tmp160_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp42_, "NotSupported") == 0) { + } else if (strcmp (_tmp160_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp42_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp160_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp42_, "AccessDenied") == 0) { + } else if (strcmp (_tmp160_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp42_, "AuthFailed") == 0) { + } else if (strcmp (_tmp160_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp42_, "NoServer") == 0) { + } else if (strcmp (_tmp160_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp42_, "Timeout") == 0) { + } else if (strcmp (_tmp160_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp42_, "NoNetwork") == 0) { + } else if (strcmp (_tmp160_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp42_, "AddressInUse") == 0) { + } else if (strcmp (_tmp160_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp42_, "Disconnected") == 0) { + } else if (strcmp (_tmp160_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp42_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp160_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp42_, "FileNotFound") == 0) { + } else if (strcmp (_tmp160_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp42_, "FileExists") == 0) { + } else if (strcmp (_tmp160_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp42_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp160_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp42_, "TimedOut") == 0) { + } else if (strcmp (_tmp160_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp42_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp160_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp42_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp160_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp42_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp160_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp42_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp160_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp42_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp160_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp42_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp160_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp42_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp160_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp42_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp160_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp42_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp160_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp42_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp160_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp42_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp160_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp42_, "RemoteException") == 0) { + } else if (strcmp (_tmp160_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2441,9 +2515,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp41_); + dbus_message_iter_get_basic (&_iter, &_tmp159_); dbus_message_iter_next (&_iter); - _result = _tmp41_; + _result = _tmp159_; dbus_message_unref (_reply); return _result; } @@ -2455,9 +2529,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; char* _result; - const char* _tmp43_; + const char* _tmp161_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2471,78 +2545,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp44_; + const char* _tmp162_; _edomain = DBUS_GERROR; - _tmp44_ = _dbus_error.name + 27; - if (strcmp (_tmp44_, "Failed") == 0) { + _tmp162_ = _dbus_error.name + 27; + if (strcmp (_tmp162_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp44_, "NoMemory") == 0) { + } else if (strcmp (_tmp162_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp44_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp162_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp44_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp162_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp44_, "NoReply") == 0) { + } else if (strcmp (_tmp162_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp44_, "IOError") == 0) { + } else if (strcmp (_tmp162_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp44_, "BadAddress") == 0) { + } else if (strcmp (_tmp162_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp44_, "NotSupported") == 0) { + } else if (strcmp (_tmp162_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp44_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp162_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp44_, "AccessDenied") == 0) { + } else if (strcmp (_tmp162_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp44_, "AuthFailed") == 0) { + } else if (strcmp (_tmp162_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp44_, "NoServer") == 0) { + } else if (strcmp (_tmp162_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp44_, "Timeout") == 0) { + } else if (strcmp (_tmp162_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp44_, "NoNetwork") == 0) { + } else if (strcmp (_tmp162_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp44_, "AddressInUse") == 0) { + } else if (strcmp (_tmp162_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp44_, "Disconnected") == 0) { + } else if (strcmp (_tmp162_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp44_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp162_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp44_, "FileNotFound") == 0) { + } else if (strcmp (_tmp162_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp44_, "FileExists") == 0) { + } else if (strcmp (_tmp162_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp44_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp162_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp44_, "TimedOut") == 0) { + } else if (strcmp (_tmp162_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp44_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp162_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp44_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp162_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp44_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp162_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp162_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp162_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp44_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp162_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp44_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp162_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp44_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp162_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp44_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp162_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp44_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp162_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp44_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp162_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp44_, "RemoteException") == 0) { + } else if (strcmp (_tmp162_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2552,9 +2626,9 @@ return NULL; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp43_); + dbus_message_iter_get_basic (&_iter, &_tmp161_); dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp43_); + _result = g_strdup (_tmp161_); dbus_message_unref (_reply); return _result; } @@ -2566,9 +2640,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; char* _result; - const char* _tmp45_; + const char* _tmp163_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "GetName"); @@ -2582,78 +2656,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp46_; + const char* _tmp164_; _edomain = DBUS_GERROR; - _tmp46_ = _dbus_error.name + 27; - if (strcmp (_tmp46_, "Failed") == 0) { + _tmp164_ = _dbus_error.name + 27; + if (strcmp (_tmp164_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp46_, "NoMemory") == 0) { + } else if (strcmp (_tmp164_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp46_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp164_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp46_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp164_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp46_, "NoReply") == 0) { + } else if (strcmp (_tmp164_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp46_, "IOError") == 0) { + } else if (strcmp (_tmp164_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp46_, "BadAddress") == 0) { + } else if (strcmp (_tmp164_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp46_, "NotSupported") == 0) { + } else if (strcmp (_tmp164_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp46_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp164_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp46_, "AccessDenied") == 0) { + } else if (strcmp (_tmp164_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp46_, "AuthFailed") == 0) { + } else if (strcmp (_tmp164_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp46_, "NoServer") == 0) { + } else if (strcmp (_tmp164_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp46_, "Timeout") == 0) { + } else if (strcmp (_tmp164_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp46_, "NoNetwork") == 0) { + } else if (strcmp (_tmp164_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp46_, "AddressInUse") == 0) { + } else if (strcmp (_tmp164_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp46_, "Disconnected") == 0) { + } else if (strcmp (_tmp164_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp46_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp164_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp46_, "FileNotFound") == 0) { + } else if (strcmp (_tmp164_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp46_, "FileExists") == 0) { + } else if (strcmp (_tmp164_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp46_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp164_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp46_, "TimedOut") == 0) { + } else if (strcmp (_tmp164_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp46_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp164_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp46_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp164_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp46_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp164_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp46_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp164_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp46_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp164_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp46_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp164_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp46_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp164_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp46_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp164_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp46_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp164_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp46_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp164_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp46_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp164_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp46_, "RemoteException") == 0) { + } else if (strcmp (_tmp164_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2663,9 +2737,9 @@ return NULL; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp45_); + dbus_message_iter_get_basic (&_iter, &_tmp163_); dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp45_); + _result = g_strdup (_tmp163_); dbus_message_unref (_reply); return _result; } @@ -2676,17 +2750,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp47_; + const char* _tmp165_; gboolean _result; - dbus_bool_t _tmp48_; + dbus_bool_t _tmp166_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "SetName"); dbus_message_iter_init_append (_message, &_iter); - _tmp47_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp47_); + _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); @@ -2696,78 +2770,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp49_; + const char* _tmp167_; _edomain = DBUS_GERROR; - _tmp49_ = _dbus_error.name + 27; - if (strcmp (_tmp49_, "Failed") == 0) { + _tmp167_ = _dbus_error.name + 27; + if (strcmp (_tmp167_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp49_, "NoMemory") == 0) { + } else if (strcmp (_tmp167_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp49_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp167_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp49_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp167_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp49_, "NoReply") == 0) { + } else if (strcmp (_tmp167_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp49_, "IOError") == 0) { + } else if (strcmp (_tmp167_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp49_, "BadAddress") == 0) { + } else if (strcmp (_tmp167_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp49_, "NotSupported") == 0) { + } else if (strcmp (_tmp167_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp49_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp167_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp49_, "AccessDenied") == 0) { + } else if (strcmp (_tmp167_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp49_, "AuthFailed") == 0) { + } else if (strcmp (_tmp167_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp49_, "NoServer") == 0) { + } else if (strcmp (_tmp167_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp49_, "Timeout") == 0) { + } else if (strcmp (_tmp167_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp49_, "NoNetwork") == 0) { + } else if (strcmp (_tmp167_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp49_, "AddressInUse") == 0) { + } else if (strcmp (_tmp167_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp49_, "Disconnected") == 0) { + } else if (strcmp (_tmp167_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp49_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp167_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp49_, "FileNotFound") == 0) { + } else if (strcmp (_tmp167_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp49_, "FileExists") == 0) { + } else if (strcmp (_tmp167_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp49_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp167_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp49_, "TimedOut") == 0) { + } else if (strcmp (_tmp167_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp49_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp167_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp49_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp167_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp49_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp167_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp49_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp167_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp49_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp167_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp49_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp167_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp49_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp167_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp49_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp167_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp49_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp167_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp49_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp167_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp49_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp167_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp49_, "RemoteException") == 0) { + } else if (strcmp (_tmp167_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2777,9 +2851,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp48_); + dbus_message_iter_get_basic (&_iter, &_tmp166_); dbus_message_iter_next (&_iter); - _result = _tmp48_; + _result = _tmp166_; dbus_message_unref (_reply); return _result; } @@ -2792,13 +2866,13 @@ DBusMessageIter _iter; char** _result; int _result_length1; - char** _tmp50_; - int _tmp50__length; - int _tmp50__size; - int _tmp50__length1; - DBusMessageIter _tmp51_; + char** _tmp168_; + int _tmp168__length; + int _tmp168__size; + int _tmp168__length1; + DBusMessageIter _tmp169_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2812,78 +2886,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp53_; + const char* _tmp171_; _edomain = DBUS_GERROR; - _tmp53_ = _dbus_error.name + 27; - if (strcmp (_tmp53_, "Failed") == 0) { + _tmp171_ = _dbus_error.name + 27; + if (strcmp (_tmp171_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp53_, "NoMemory") == 0) { + } else if (strcmp (_tmp171_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp53_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp171_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp53_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp171_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp53_, "NoReply") == 0) { + } else if (strcmp (_tmp171_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp53_, "IOError") == 0) { + } else if (strcmp (_tmp171_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp53_, "BadAddress") == 0) { + } else if (strcmp (_tmp171_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp53_, "NotSupported") == 0) { + } else if (strcmp (_tmp171_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp53_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp171_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp53_, "AccessDenied") == 0) { + } else if (strcmp (_tmp171_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp53_, "AuthFailed") == 0) { + } else if (strcmp (_tmp171_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp53_, "NoServer") == 0) { + } else if (strcmp (_tmp171_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp53_, "Timeout") == 0) { + } else if (strcmp (_tmp171_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp53_, "NoNetwork") == 0) { + } else if (strcmp (_tmp171_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp53_, "AddressInUse") == 0) { + } else if (strcmp (_tmp171_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp53_, "Disconnected") == 0) { + } else if (strcmp (_tmp171_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp53_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp171_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp53_, "FileNotFound") == 0) { + } else if (strcmp (_tmp171_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp53_, "FileExists") == 0) { + } else if (strcmp (_tmp171_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp53_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp171_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp53_, "TimedOut") == 0) { + } else if (strcmp (_tmp171_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp53_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp171_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp53_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp171_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp53_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp171_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp53_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp171_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp53_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp171_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp53_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp171_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp53_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp171_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp53_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp171_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp53_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp171_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp53_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp171_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp53_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp171_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp53_, "RemoteException") == 0) { + } else if (strcmp (_tmp171_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2894,25 +2968,25 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp50_ = g_new (char*, 5); - _tmp50__length = 0; - _tmp50__size = 4; - _tmp50__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp51_); - for (; dbus_message_iter_get_arg_type (&_tmp51_); _tmp50__length1++) { - const char* _tmp52_; - if (_tmp50__size == _tmp50__length) { - _tmp50__size = 2 * _tmp50__size; - _tmp50_ = g_renew (char*, _tmp50_, _tmp50__size + 1); - } - dbus_message_iter_get_basic (&_tmp51_, &_tmp52_); - dbus_message_iter_next (&_tmp51_); - _tmp50_[_tmp50__length++] = g_strdup (_tmp52_); + _tmp168_ = g_new (char*, 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 (char*, _tmp168_, _tmp168__size + 1); + } + dbus_message_iter_get_basic (&_tmp169_, &_tmp170_); + dbus_message_iter_next (&_tmp169_); + _tmp168_[_tmp168__length++] = g_strdup (_tmp170_); } - _result_length1 = _tmp50__length1; - _tmp50_[_tmp50__length] = NULL; + _result_length1 = _tmp168__length1; + _tmp168_[_tmp168__length] = NULL; dbus_message_iter_next (&_iter); - _result = _tmp50_; + _result = _tmp168_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2924,19 +2998,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp54_; + dbus_uint32_t _tmp172_; char* _opath; - const char* _tmp55_; + const char* _tmp173_; gboolean _result; - dbus_bool_t _tmp56_; + dbus_bool_t _tmp174_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp54_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp54_); + _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); @@ -2946,78 +3020,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp57_; + const char* _tmp175_; _edomain = DBUS_GERROR; - _tmp57_ = _dbus_error.name + 27; - if (strcmp (_tmp57_, "Failed") == 0) { + _tmp175_ = _dbus_error.name + 27; + if (strcmp (_tmp175_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp57_, "NoMemory") == 0) { + } else if (strcmp (_tmp175_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp57_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp175_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp57_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp175_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp57_, "NoReply") == 0) { + } else if (strcmp (_tmp175_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp57_, "IOError") == 0) { + } else if (strcmp (_tmp175_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp57_, "BadAddress") == 0) { + } else if (strcmp (_tmp175_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp57_, "NotSupported") == 0) { + } else if (strcmp (_tmp175_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp57_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp175_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp57_, "AccessDenied") == 0) { + } else if (strcmp (_tmp175_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp57_, "AuthFailed") == 0) { + } else if (strcmp (_tmp175_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp57_, "NoServer") == 0) { + } else if (strcmp (_tmp175_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp57_, "Timeout") == 0) { + } else if (strcmp (_tmp175_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp57_, "NoNetwork") == 0) { + } else if (strcmp (_tmp175_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp57_, "AddressInUse") == 0) { + } else if (strcmp (_tmp175_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp57_, "Disconnected") == 0) { + } else if (strcmp (_tmp175_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp57_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp175_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp57_, "FileNotFound") == 0) { + } else if (strcmp (_tmp175_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp57_, "FileExists") == 0) { + } else if (strcmp (_tmp175_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp57_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp175_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp57_, "TimedOut") == 0) { + } else if (strcmp (_tmp175_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp57_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp175_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp57_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp175_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp57_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp175_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp57_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp175_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp57_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp175_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp57_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp175_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp57_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp175_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp57_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp175_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp57_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp175_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp57_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp175_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp57_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp175_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp57_, "RemoteException") == 0) { + } else if (strcmp (_tmp175_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3027,13 +3101,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp55_); + dbus_message_iter_get_basic (&_iter, &_tmp173_); dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp55_); + _opath = g_strdup (_tmp173_); *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp56_); + dbus_message_iter_get_basic (&_iter, &_tmp174_); dbus_message_iter_next (&_iter); - _result = _tmp56_; + _result = _tmp174_; dbus_message_unref (_reply); return _result; } @@ -3045,9 +3119,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; char* _result; - const char* _tmp58_; + const char* _tmp176_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -3061,78 +3135,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp59_; + const char* _tmp177_; _edomain = DBUS_GERROR; - _tmp59_ = _dbus_error.name + 27; - if (strcmp (_tmp59_, "Failed") == 0) { + _tmp177_ = _dbus_error.name + 27; + if (strcmp (_tmp177_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp59_, "NoMemory") == 0) { + } else if (strcmp (_tmp177_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp59_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp177_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp59_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp177_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp59_, "NoReply") == 0) { + } else if (strcmp (_tmp177_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp59_, "IOError") == 0) { + } else if (strcmp (_tmp177_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp59_, "BadAddress") == 0) { + } else if (strcmp (_tmp177_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp59_, "NotSupported") == 0) { + } else if (strcmp (_tmp177_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp59_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp177_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp59_, "AccessDenied") == 0) { + } else if (strcmp (_tmp177_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp59_, "AuthFailed") == 0) { + } else if (strcmp (_tmp177_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp59_, "NoServer") == 0) { + } else if (strcmp (_tmp177_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp59_, "Timeout") == 0) { + } else if (strcmp (_tmp177_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp59_, "NoNetwork") == 0) { + } else if (strcmp (_tmp177_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp59_, "AddressInUse") == 0) { + } else if (strcmp (_tmp177_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp59_, "Disconnected") == 0) { + } else if (strcmp (_tmp177_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp59_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp177_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp59_, "FileNotFound") == 0) { + } else if (strcmp (_tmp177_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp59_, "FileExists") == 0) { + } else if (strcmp (_tmp177_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp59_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp177_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp59_, "TimedOut") == 0) { + } else if (strcmp (_tmp177_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp59_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp177_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp59_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp177_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp59_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp177_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp177_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp177_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp59_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp177_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp59_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp177_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp59_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp177_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp59_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp177_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp59_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp177_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp59_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp177_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp59_, "RemoteException") == 0) { + } else if (strcmp (_tmp177_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -3142,9 +3216,9 @@ return NULL; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp58_); + dbus_message_iter_get_basic (&_iter, &_tmp176_); dbus_message_iter_next (&_iter); - _result = g_strdup (_tmp58_); + _result = g_strdup (_tmp176_); dbus_message_unref (_reply); return _result; } @@ -3155,17 +3229,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp60_; + const char* _tmp178_; gboolean _result; - dbus_bool_t _tmp61_; + dbus_bool_t _tmp179_; if (((DVBIDBusDeviceGroupDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "SetRecordingsDirectory"); dbus_message_iter_init_append (_message, &_iter); - _tmp60_ = location; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp60_); + _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); @@ -3175,78 +3249,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp62_; + const char* _tmp180_; _edomain = DBUS_GERROR; - _tmp62_ = _dbus_error.name + 27; - if (strcmp (_tmp62_, "Failed") == 0) { + _tmp180_ = _dbus_error.name + 27; + if (strcmp (_tmp180_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp62_, "NoMemory") == 0) { + } else if (strcmp (_tmp180_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp62_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp180_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp62_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp180_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp62_, "NoReply") == 0) { + } else if (strcmp (_tmp180_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp62_, "IOError") == 0) { + } else if (strcmp (_tmp180_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp62_, "BadAddress") == 0) { + } else if (strcmp (_tmp180_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp62_, "NotSupported") == 0) { + } else if (strcmp (_tmp180_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp62_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp180_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp62_, "AccessDenied") == 0) { + } else if (strcmp (_tmp180_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp62_, "AuthFailed") == 0) { + } else if (strcmp (_tmp180_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp62_, "NoServer") == 0) { + } else if (strcmp (_tmp180_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp62_, "Timeout") == 0) { + } else if (strcmp (_tmp180_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp62_, "NoNetwork") == 0) { + } else if (strcmp (_tmp180_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp62_, "AddressInUse") == 0) { + } else if (strcmp (_tmp180_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp62_, "Disconnected") == 0) { + } else if (strcmp (_tmp180_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp62_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp180_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp62_, "FileNotFound") == 0) { + } else if (strcmp (_tmp180_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp62_, "FileExists") == 0) { + } else if (strcmp (_tmp180_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp62_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp180_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp62_, "TimedOut") == 0) { + } else if (strcmp (_tmp180_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp62_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp180_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp62_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp180_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp62_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp180_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp62_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp180_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp62_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp180_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp62_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp180_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp62_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp180_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp62_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp180_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp62_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp180_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp62_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp180_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp62_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp180_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp62_, "RemoteException") == 0) { + } else if (strcmp (_tmp180_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3256,9 +3330,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp61_); + dbus_message_iter_get_basic (&_iter, &_tmp179_); dbus_message_iter_next (&_iter); - _result = _tmp61_; + _result = _tmp179_; dbus_message_unref (_reply); return _result; } @@ -3305,25 +3379,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); -} - - 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); diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusManager.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusManager.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusManager.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusManager.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusManager.c generated by valac, the Vala compiler +/* IDBusManager.c generated by valac 0.9.7, the Vala compiler * generated from IDBusManager.vala, do not modify */ /* @@ -40,9 +40,9 @@ typedef struct _DVBIDBusManager DVBIDBusManager; typedef struct _DVBIDBusManagerIface DVBIDBusManagerIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; typedef struct _DVBIDBusManagerDBusProxy DVBIDBusManagerDBusProxy; typedef DBusGProxyClass DVBIDBusManagerDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBChannelGroupInfo { gint id; @@ -60,6 +60,11 @@ DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); gboolean (*AddChannelGroup) (DVBIDBusManager* self, const char* 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 { @@ -67,18 +72,15 @@ gboolean disposed; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_channel_group_info_get_type (void); +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); +DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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, char** dbusiface, GError** error); char** dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error); gboolean dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error); @@ -88,6 +90,9 @@ DVBChannelGroupInfo* dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error); gboolean dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, const char* 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); @@ -103,10 +108,10 @@ 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); -DVBIDBusManager* dvb_id_bus_manager_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); @@ -122,13 +127,12 @@ 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 char* 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 dvb_id_bus_manager_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_manager_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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -160,59 +164,143 @@ GType dvb_channel_group_info_get_type (void) { - static GType dvb_channel_group_info_type_id = 0; - if (dvb_channel_group_info_type_id == 0) { + static volatile gsize dvb_channel_group_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_channel_group_info_type_id__volatile)) { + GType dvb_channel_group_info_type_id; dvb_channel_group_info_type_id = g_boxed_type_register_static ("DVBChannelGroupInfo", (GBoxedCopyFunc) dvb_channel_group_info_dup, (GBoxedFreeFunc) dvb_channel_group_info_free); + g_once_init_leave (&dvb_channel_group_info_type_id__volatile, dvb_channel_group_info_type_id); } - return dvb_channel_group_info_type_id; + return dvb_channel_group_info_type_id__volatile; } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @opath: Object path of the scanner service + * @dbusiface: DBus interface of the scanner service + * @returns: TRUE on success + * + * 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, char** dbusiface, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetScannerForDevice (self, adapter, frontend, opath, dbusiface, error); } +/** + * @returns: Device groups' DBus path + */ char** dvb_id_bus_manager_GetRegisteredDeviceGroups (DVBIDBusManager* self, int* result_length1, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetRegisteredDeviceGroups (self, result_length1, error); } +/** + * @group_id: A group ID + * @opath: Device group's DBus path + * @returns: TRUE on success + */ gboolean dvb_id_bus_manager_GetDeviceGroup (DVBIDBusManager* self, guint group_id, char** opath, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetDeviceGroup (self, group_id, opath, error); } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @channels_conf: Path to channels.conf for this device + * @recordings_dir: Path where the recordings should be stored + * @name: Name of group + * @returns: TRUE when the device has been registered successfully + * + * Creates a new DeviceGroup and new DVB device whereas the + * DVB device is the reference device of this group (i.e. + * all other devices of this group will inherit the settings + * of the reference device). + */ gboolean dvb_id_bus_manager_AddDeviceToNewGroup (DVBIDBusManager* self, guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, const char* name, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->AddDeviceToNewGroup (self, adapter, frontend, channels_conf, recordings_dir, name, error); } +/** + * @adapter: Adapter of device + * @frontend: Frontend of device + * @name: The name of the device or "Unknown" + * @returns: TRUE on success + * + * The device must be part of group, otherwise "Unknown" + * is returned. + */ gboolean dvb_id_bus_manager_GetNameOfRegisteredDevice (DVBIDBusManager* self, guint adapter, guint frontend, char** name, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetNameOfRegisteredDevice (self, adapter, frontend, name, error); } +/** + * @returns: the numner of configured device groups + */ gint dvb_id_bus_manager_GetDeviceGroupSize (DVBIDBusManager* self, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetDeviceGroupSize (self, error); } +/** + * @returns: ID and name of each channel group + */ DVBChannelGroupInfo* dvb_id_bus_manager_GetChannelGroups (DVBIDBusManager* self, int* result_length1, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->GetChannelGroups (self, result_length1, error); } +/** + * @name: Name of the new group + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ gboolean dvb_id_bus_manager_AddChannelGroup (DVBIDBusManager* self, const char* name, gint* channel_group_id, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->AddChannelGroup (self, name, channel_group_id, error); } +/** + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ gboolean dvb_id_bus_manager_RemoveChannelGroup (DVBIDBusManager* self, gint channel_group_id, GError** error) { return DVB_ID_BUS_MANAGER_GET_INTERFACE (self)->RemoveChannelGroup (self, channel_group_id, error); } +/** + * @returns: informations about all connected + * devices retrieved via udev + */ +GHashTable** dvb_id_bus_manager_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error) { + 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_) { } @@ -226,7 +314,7 @@ 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"); + 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]); @@ -1612,6 +1700,169 @@ } +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_)) { + char* _key; + char* _value; + const char* _tmp43_; + const char* _tmp44_; + dbus_message_iter_open_container (&_tmp38_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp39_); + _key = (char*) _tmp41_; + _value = (char*) _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; @@ -1637,6 +1888,8 @@ 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; @@ -1650,12 +1903,12 @@ const char * _path; DBusMessage *_message; DBusMessageIter _iter; - dbus_uint32_t _tmp35_; + 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); - _tmp35_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp35_); + _tmp45_ = group_id; + dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp45_); dbus_connection_send (_connection, _message, NULL); dbus_message_unref (_message); } @@ -1665,12 +1918,12 @@ const char * _path; DBusMessage *_message; DBusMessageIter _iter; - dbus_uint32_t _tmp36_; + 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); - _tmp36_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp36_); + _tmp46_ = group_id; + dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp46_); dbus_connection_send (_connection, _message, NULL); dbus_message_unref (_message); } @@ -1699,14 +1952,16 @@ GType dvb_id_bus_manager_get_type (void) { - static GType dvb_id_bus_manager_type_id = 0; - if (dvb_id_bus_manager_type_id == 0) { + static volatile gsize dvb_id_bus_manager_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_manager_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusManagerIface), (GBaseInitFunc) dvb_id_bus_manager_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_once_init_leave (&dvb_id_bus_manager_type_id__volatile, dvb_id_bus_manager_type_id); } - return dvb_id_bus_manager_type_id; + return dvb_id_bus_manager_type_id__volatile; } @@ -1739,15 +1994,15 @@ static void _dbus_handle_dvb_id_bus_manager_group_added (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint group_id = 0U; - dbus_uint32_t _tmp37_; + 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, &_tmp37_); + dbus_message_iter_get_basic (&iter, &_tmp181_); dbus_message_iter_next (&iter); - group_id = _tmp37_; + group_id = _tmp181_; g_signal_emit_by_name (self, "group-added", group_id); } @@ -1755,15 +2010,15 @@ static void _dbus_handle_dvb_id_bus_manager_group_removed (DVBIDBusManager* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint group_id = 0U; - dbus_uint32_t _tmp38_; + 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, &_tmp38_); + dbus_message_iter_get_basic (&iter, &_tmp182_); dbus_message_iter_next (&iter); - group_id = _tmp38_; + group_id = _tmp182_; g_signal_emit_by_name (self, "group-removed", group_id); } @@ -1809,24 +2064,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp39_; - dbus_uint32_t _tmp40_; + dbus_uint32_t _tmp183_; + dbus_uint32_t _tmp184_; char* _opath; - const char* _tmp41_; + const char* _tmp185_; char* _dbusiface; - const char* _tmp42_; + const char* _tmp186_; gboolean _result; - dbus_bool_t _tmp43_; + dbus_bool_t _tmp187_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "GetScannerForDevice"); dbus_message_iter_init_append (_message, &_iter); - _tmp39_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp39_); - _tmp40_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp40_); + _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); @@ -1836,78 +2091,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp44_; + const char* _tmp188_; _edomain = DBUS_GERROR; - _tmp44_ = _dbus_error.name + 27; - if (strcmp (_tmp44_, "Failed") == 0) { + _tmp188_ = _dbus_error.name + 27; + if (strcmp (_tmp188_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp44_, "NoMemory") == 0) { + } else if (strcmp (_tmp188_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp44_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp188_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp44_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp188_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp44_, "NoReply") == 0) { + } else if (strcmp (_tmp188_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp44_, "IOError") == 0) { + } else if (strcmp (_tmp188_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp44_, "BadAddress") == 0) { + } else if (strcmp (_tmp188_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp44_, "NotSupported") == 0) { + } else if (strcmp (_tmp188_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp44_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp188_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp44_, "AccessDenied") == 0) { + } else if (strcmp (_tmp188_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp44_, "AuthFailed") == 0) { + } else if (strcmp (_tmp188_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp44_, "NoServer") == 0) { + } else if (strcmp (_tmp188_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp44_, "Timeout") == 0) { + } else if (strcmp (_tmp188_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp44_, "NoNetwork") == 0) { + } else if (strcmp (_tmp188_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp44_, "AddressInUse") == 0) { + } else if (strcmp (_tmp188_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp44_, "Disconnected") == 0) { + } else if (strcmp (_tmp188_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp44_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp188_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp44_, "FileNotFound") == 0) { + } else if (strcmp (_tmp188_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp44_, "FileExists") == 0) { + } else if (strcmp (_tmp188_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp44_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp188_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp44_, "TimedOut") == 0) { + } else if (strcmp (_tmp188_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp44_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp188_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp44_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp188_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp44_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp188_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp188_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp188_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp44_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp188_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp44_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp188_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp44_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp188_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp44_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp188_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp44_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp188_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp44_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp188_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp44_, "RemoteException") == 0) { + } else if (strcmp (_tmp188_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1917,17 +2172,17 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp41_); + dbus_message_iter_get_basic (&_iter, &_tmp185_); dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp41_); + _opath = g_strdup (_tmp185_); *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp42_); + dbus_message_iter_get_basic (&_iter, &_tmp186_); dbus_message_iter_next (&_iter); - _dbusiface = g_strdup (_tmp42_); + _dbusiface = g_strdup (_tmp186_); *dbusiface = _dbusiface; - dbus_message_iter_get_basic (&_iter, &_tmp43_); + dbus_message_iter_get_basic (&_iter, &_tmp187_); dbus_message_iter_next (&_iter); - _result = _tmp43_; + _result = _tmp187_; dbus_message_unref (_reply); return _result; } @@ -1940,13 +2195,13 @@ DBusMessageIter _iter; char** _result; int _result_length1; - char** _tmp45_; - int _tmp45__length; - int _tmp45__size; - int _tmp45__length1; - DBusMessageIter _tmp46_; + char** _tmp189_; + int _tmp189__length; + int _tmp189__size; + int _tmp189__length1; + DBusMessageIter _tmp190_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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.Manager", "GetRegisteredDeviceGroups"); @@ -1960,78 +2215,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp48_; + const char* _tmp192_; _edomain = DBUS_GERROR; - _tmp48_ = _dbus_error.name + 27; - if (strcmp (_tmp48_, "Failed") == 0) { + _tmp192_ = _dbus_error.name + 27; + if (strcmp (_tmp192_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp48_, "NoMemory") == 0) { + } else if (strcmp (_tmp192_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp48_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp192_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp48_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp192_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp48_, "NoReply") == 0) { + } else if (strcmp (_tmp192_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp48_, "IOError") == 0) { + } else if (strcmp (_tmp192_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp48_, "BadAddress") == 0) { + } else if (strcmp (_tmp192_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp48_, "NotSupported") == 0) { + } else if (strcmp (_tmp192_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp48_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp192_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp48_, "AccessDenied") == 0) { + } else if (strcmp (_tmp192_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp48_, "AuthFailed") == 0) { + } else if (strcmp (_tmp192_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp48_, "NoServer") == 0) { + } else if (strcmp (_tmp192_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp48_, "Timeout") == 0) { + } else if (strcmp (_tmp192_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp48_, "NoNetwork") == 0) { + } else if (strcmp (_tmp192_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp48_, "AddressInUse") == 0) { + } else if (strcmp (_tmp192_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp48_, "Disconnected") == 0) { + } else if (strcmp (_tmp192_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp48_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp192_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp48_, "FileNotFound") == 0) { + } else if (strcmp (_tmp192_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp48_, "FileExists") == 0) { + } else if (strcmp (_tmp192_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp48_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp192_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp48_, "TimedOut") == 0) { + } else if (strcmp (_tmp192_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp48_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp192_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp48_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp192_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp48_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp192_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp48_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp192_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp48_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp192_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp48_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp192_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp48_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp192_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp48_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp192_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp48_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp192_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp48_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp192_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp48_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp192_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp48_, "RemoteException") == 0) { + } else if (strcmp (_tmp192_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2042,25 +2297,25 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp45_ = g_new (char*, 5); - _tmp45__length = 0; - _tmp45__size = 4; - _tmp45__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp46_); - for (; dbus_message_iter_get_arg_type (&_tmp46_); _tmp45__length1++) { - const char* _tmp47_; - if (_tmp45__size == _tmp45__length) { - _tmp45__size = 2 * _tmp45__size; - _tmp45_ = g_renew (char*, _tmp45_, _tmp45__size + 1); - } - dbus_message_iter_get_basic (&_tmp46_, &_tmp47_); - dbus_message_iter_next (&_tmp46_); - _tmp45_[_tmp45__length++] = g_strdup (_tmp47_); + _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 = _tmp45__length1; - _tmp45_[_tmp45__length] = NULL; + _result_length1 = _tmp189__length1; + _tmp189_[_tmp189__length] = NULL; dbus_message_iter_next (&_iter); - _result = _tmp45_; + _result = _tmp189_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2072,19 +2327,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp49_; + dbus_uint32_t _tmp193_; char* _opath; - const char* _tmp50_; + const char* _tmp194_; gboolean _result; - dbus_bool_t _tmp51_; + dbus_bool_t _tmp195_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp49_ = group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp49_); + _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); @@ -2094,78 +2349,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp52_; + const char* _tmp196_; _edomain = DBUS_GERROR; - _tmp52_ = _dbus_error.name + 27; - if (strcmp (_tmp52_, "Failed") == 0) { + _tmp196_ = _dbus_error.name + 27; + if (strcmp (_tmp196_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp52_, "NoMemory") == 0) { + } else if (strcmp (_tmp196_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp52_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp196_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp52_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp196_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp52_, "NoReply") == 0) { + } else if (strcmp (_tmp196_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp52_, "IOError") == 0) { + } else if (strcmp (_tmp196_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp52_, "BadAddress") == 0) { + } else if (strcmp (_tmp196_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp52_, "NotSupported") == 0) { + } else if (strcmp (_tmp196_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp52_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp196_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp52_, "AccessDenied") == 0) { + } else if (strcmp (_tmp196_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp52_, "AuthFailed") == 0) { + } else if (strcmp (_tmp196_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp52_, "NoServer") == 0) { + } else if (strcmp (_tmp196_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp52_, "Timeout") == 0) { + } else if (strcmp (_tmp196_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp52_, "NoNetwork") == 0) { + } else if (strcmp (_tmp196_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp52_, "AddressInUse") == 0) { + } else if (strcmp (_tmp196_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp52_, "Disconnected") == 0) { + } else if (strcmp (_tmp196_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp52_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp196_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp52_, "FileNotFound") == 0) { + } else if (strcmp (_tmp196_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp52_, "FileExists") == 0) { + } else if (strcmp (_tmp196_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp52_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp196_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp52_, "TimedOut") == 0) { + } else if (strcmp (_tmp196_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp52_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp196_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp52_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp196_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp52_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp196_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp52_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp196_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp52_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp196_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp52_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp196_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp52_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp196_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp52_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp196_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp52_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp196_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp52_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp196_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp52_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp196_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp52_, "RemoteException") == 0) { + } else if (strcmp (_tmp196_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2175,13 +2430,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp50_); + dbus_message_iter_get_basic (&_iter, &_tmp194_); dbus_message_iter_next (&_iter); - _opath = g_strdup (_tmp50_); + _opath = g_strdup (_tmp194_); *opath = _opath; - dbus_message_iter_get_basic (&_iter, &_tmp51_); + dbus_message_iter_get_basic (&_iter, &_tmp195_); dbus_message_iter_next (&_iter); - _result = _tmp51_; + _result = _tmp195_; dbus_message_unref (_reply); return _result; } @@ -2192,29 +2447,29 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp53_; - dbus_uint32_t _tmp54_; - const char* _tmp55_; - const char* _tmp56_; - const char* _tmp57_; + dbus_uint32_t _tmp197_; + dbus_uint32_t _tmp198_; + const char* _tmp199_; + const char* _tmp200_; + const char* _tmp201_; gboolean _result; - dbus_bool_t _tmp58_; + dbus_bool_t _tmp202_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "AddDeviceToNewGroup"); dbus_message_iter_init_append (_message, &_iter); - _tmp53_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp53_); - _tmp54_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp54_); - _tmp55_ = channels_conf; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp55_); - _tmp56_ = recordings_dir; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp56_); - _tmp57_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp57_); + _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); @@ -2224,78 +2479,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp59_; + const char* _tmp203_; _edomain = DBUS_GERROR; - _tmp59_ = _dbus_error.name + 27; - if (strcmp (_tmp59_, "Failed") == 0) { + _tmp203_ = _dbus_error.name + 27; + if (strcmp (_tmp203_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp59_, "NoMemory") == 0) { + } else if (strcmp (_tmp203_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp59_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp203_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp59_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp203_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp59_, "NoReply") == 0) { + } else if (strcmp (_tmp203_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp59_, "IOError") == 0) { + } else if (strcmp (_tmp203_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp59_, "BadAddress") == 0) { + } else if (strcmp (_tmp203_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp59_, "NotSupported") == 0) { + } else if (strcmp (_tmp203_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp59_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp203_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp59_, "AccessDenied") == 0) { + } else if (strcmp (_tmp203_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp59_, "AuthFailed") == 0) { + } else if (strcmp (_tmp203_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp59_, "NoServer") == 0) { + } else if (strcmp (_tmp203_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp59_, "Timeout") == 0) { + } else if (strcmp (_tmp203_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp59_, "NoNetwork") == 0) { + } else if (strcmp (_tmp203_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp59_, "AddressInUse") == 0) { + } else if (strcmp (_tmp203_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp59_, "Disconnected") == 0) { + } else if (strcmp (_tmp203_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp59_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp203_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp59_, "FileNotFound") == 0) { + } else if (strcmp (_tmp203_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp59_, "FileExists") == 0) { + } else if (strcmp (_tmp203_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp59_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp203_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp59_, "TimedOut") == 0) { + } else if (strcmp (_tmp203_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp59_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp203_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp59_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp203_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp59_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp203_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp203_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp59_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp203_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp59_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp203_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp59_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp203_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp59_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp203_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp59_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp203_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp59_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp203_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp59_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp203_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp59_, "RemoteException") == 0) { + } else if (strcmp (_tmp203_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2305,9 +2560,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp58_); + dbus_message_iter_get_basic (&_iter, &_tmp202_); dbus_message_iter_next (&_iter); - _result = _tmp58_; + _result = _tmp202_; dbus_message_unref (_reply); return _result; } @@ -2318,22 +2573,22 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp60_; - dbus_uint32_t _tmp61_; + dbus_uint32_t _tmp204_; + dbus_uint32_t _tmp205_; char* _name; - const char* _tmp62_; + const char* _tmp206_; gboolean _result; - dbus_bool_t _tmp63_; + dbus_bool_t _tmp207_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp60_ = adapter; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp60_); - _tmp61_ = frontend; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp61_); + _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); @@ -2343,78 +2598,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp64_; + const char* _tmp208_; _edomain = DBUS_GERROR; - _tmp64_ = _dbus_error.name + 27; - if (strcmp (_tmp64_, "Failed") == 0) { + _tmp208_ = _dbus_error.name + 27; + if (strcmp (_tmp208_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp64_, "NoMemory") == 0) { + } else if (strcmp (_tmp208_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp64_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp208_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp64_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp208_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp64_, "NoReply") == 0) { + } else if (strcmp (_tmp208_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp64_, "IOError") == 0) { + } else if (strcmp (_tmp208_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp64_, "BadAddress") == 0) { + } else if (strcmp (_tmp208_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp64_, "NotSupported") == 0) { + } else if (strcmp (_tmp208_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp64_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp208_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp64_, "AccessDenied") == 0) { + } else if (strcmp (_tmp208_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp64_, "AuthFailed") == 0) { + } else if (strcmp (_tmp208_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp64_, "NoServer") == 0) { + } else if (strcmp (_tmp208_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp64_, "Timeout") == 0) { + } else if (strcmp (_tmp208_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp64_, "NoNetwork") == 0) { + } else if (strcmp (_tmp208_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp64_, "AddressInUse") == 0) { + } else if (strcmp (_tmp208_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp64_, "Disconnected") == 0) { + } else if (strcmp (_tmp208_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp64_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp208_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp64_, "FileNotFound") == 0) { + } else if (strcmp (_tmp208_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp64_, "FileExists") == 0) { + } else if (strcmp (_tmp208_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp64_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp208_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp64_, "TimedOut") == 0) { + } else if (strcmp (_tmp208_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp64_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp208_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp64_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp208_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp64_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp208_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp64_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp208_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp64_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp208_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp64_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp208_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp64_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp208_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp64_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp208_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp64_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp208_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp64_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp208_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp64_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp208_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp64_, "RemoteException") == 0) { + } else if (strcmp (_tmp208_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2424,13 +2679,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp62_); + dbus_message_iter_get_basic (&_iter, &_tmp206_); dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp62_); + _name = g_strdup (_tmp206_); *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp63_); + dbus_message_iter_get_basic (&_iter, &_tmp207_); dbus_message_iter_next (&_iter); - _result = _tmp63_; + _result = _tmp207_; dbus_message_unref (_reply); return _result; } @@ -2442,9 +2697,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; gint _result; - dbus_int32_t _tmp65_; + dbus_int32_t _tmp209_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2458,78 +2713,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp66_; + const char* _tmp210_; _edomain = DBUS_GERROR; - _tmp66_ = _dbus_error.name + 27; - if (strcmp (_tmp66_, "Failed") == 0) { + _tmp210_ = _dbus_error.name + 27; + if (strcmp (_tmp210_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp66_, "NoMemory") == 0) { + } else if (strcmp (_tmp210_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp66_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp210_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp66_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp210_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp66_, "NoReply") == 0) { + } else if (strcmp (_tmp210_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp66_, "IOError") == 0) { + } else if (strcmp (_tmp210_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp66_, "BadAddress") == 0) { + } else if (strcmp (_tmp210_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp66_, "NotSupported") == 0) { + } else if (strcmp (_tmp210_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp66_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp210_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp66_, "AccessDenied") == 0) { + } else if (strcmp (_tmp210_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp66_, "AuthFailed") == 0) { + } else if (strcmp (_tmp210_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp66_, "NoServer") == 0) { + } else if (strcmp (_tmp210_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp66_, "Timeout") == 0) { + } else if (strcmp (_tmp210_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp66_, "NoNetwork") == 0) { + } else if (strcmp (_tmp210_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp66_, "AddressInUse") == 0) { + } else if (strcmp (_tmp210_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp66_, "Disconnected") == 0) { + } else if (strcmp (_tmp210_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp66_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp210_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp66_, "FileNotFound") == 0) { + } else if (strcmp (_tmp210_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp66_, "FileExists") == 0) { + } else if (strcmp (_tmp210_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp66_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp210_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp66_, "TimedOut") == 0) { + } else if (strcmp (_tmp210_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp66_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp210_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp66_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp210_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp66_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp210_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp66_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp210_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp66_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp210_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp66_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp210_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp66_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp210_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp66_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp210_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp66_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp210_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp66_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp210_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp66_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp210_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp66_, "RemoteException") == 0) { + } else if (strcmp (_tmp210_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return 0; } @@ -2539,9 +2794,9 @@ return 0; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp65_); + dbus_message_iter_get_basic (&_iter, &_tmp209_); dbus_message_iter_next (&_iter); - _result = _tmp65_; + _result = _tmp209_; dbus_message_unref (_reply); return _result; } @@ -2554,13 +2809,13 @@ DBusMessageIter _iter; DVBChannelGroupInfo* _result; int _result_length1; - DVBChannelGroupInfo* _tmp67_; - int _tmp67__length; - int _tmp67__size; - int _tmp67__length1; - DBusMessageIter _tmp68_; + DVBChannelGroupInfo* _tmp211_; + int _tmp211__length; + int _tmp211__size; + int _tmp211__length1; + DBusMessageIter _tmp212_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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.Manager", "GetChannelGroups"); @@ -2574,78 +2829,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp73_; + const char* _tmp217_; _edomain = DBUS_GERROR; - _tmp73_ = _dbus_error.name + 27; - if (strcmp (_tmp73_, "Failed") == 0) { + _tmp217_ = _dbus_error.name + 27; + if (strcmp (_tmp217_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp73_, "NoMemory") == 0) { + } else if (strcmp (_tmp217_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp73_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp217_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp73_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp217_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp73_, "NoReply") == 0) { + } else if (strcmp (_tmp217_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp73_, "IOError") == 0) { + } else if (strcmp (_tmp217_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp73_, "BadAddress") == 0) { + } else if (strcmp (_tmp217_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp73_, "NotSupported") == 0) { + } else if (strcmp (_tmp217_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp73_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp217_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp73_, "AccessDenied") == 0) { + } else if (strcmp (_tmp217_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp73_, "AuthFailed") == 0) { + } else if (strcmp (_tmp217_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp73_, "NoServer") == 0) { + } else if (strcmp (_tmp217_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp73_, "Timeout") == 0) { + } else if (strcmp (_tmp217_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp73_, "NoNetwork") == 0) { + } else if (strcmp (_tmp217_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp73_, "AddressInUse") == 0) { + } else if (strcmp (_tmp217_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp73_, "Disconnected") == 0) { + } else if (strcmp (_tmp217_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp73_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp217_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp73_, "FileNotFound") == 0) { + } else if (strcmp (_tmp217_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp73_, "FileExists") == 0) { + } else if (strcmp (_tmp217_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp73_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp217_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp73_, "TimedOut") == 0) { + } else if (strcmp (_tmp217_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp73_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp217_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp73_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp217_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp73_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp217_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp73_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp217_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp73_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp217_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp73_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp217_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp73_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp217_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp73_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp217_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp73_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp217_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp73_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp217_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp73_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp217_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp73_, "RemoteException") == 0) { + } else if (strcmp (_tmp217_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2656,33 +2911,33 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp67_ = g_new (DVBChannelGroupInfo, 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++) { - DVBChannelGroupInfo _tmp69_; - DBusMessageIter _tmp70_; - dbus_int32_t _tmp71_; - const char* _tmp72_; - if (_tmp67__size == _tmp67__length) { - _tmp67__size = 2 * _tmp67__size; - _tmp67_ = g_renew (DVBChannelGroupInfo, _tmp67_, _tmp67__size + 1); - } - dbus_message_iter_recurse (&_tmp68_, &_tmp70_); - dbus_message_iter_get_basic (&_tmp70_, &_tmp71_); - dbus_message_iter_next (&_tmp70_); - _tmp69_.id = _tmp71_; - dbus_message_iter_get_basic (&_tmp70_, &_tmp72_); - dbus_message_iter_next (&_tmp70_); - _tmp69_.name = g_strdup (_tmp72_); - dbus_message_iter_next (&_tmp68_); - _tmp67_[_tmp67__length++] = _tmp69_; + _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 = _tmp67__length1; + _result_length1 = _tmp211__length1; dbus_message_iter_next (&_iter); - _result = _tmp67_; + _result = _tmp211_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2694,19 +2949,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp74_; + const char* _tmp218_; gint _channel_group_id; - dbus_int32_t _tmp75_; + dbus_int32_t _tmp219_; gboolean _result; - dbus_bool_t _tmp76_; + dbus_bool_t _tmp220_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "AddChannelGroup"); dbus_message_iter_init_append (_message, &_iter); - _tmp74_ = name; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp74_); + _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); @@ -2716,78 +2971,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp77_; + const char* _tmp221_; _edomain = DBUS_GERROR; - _tmp77_ = _dbus_error.name + 27; - if (strcmp (_tmp77_, "Failed") == 0) { + _tmp221_ = _dbus_error.name + 27; + if (strcmp (_tmp221_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp77_, "NoMemory") == 0) { + } else if (strcmp (_tmp221_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp77_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp221_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp77_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp221_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp77_, "NoReply") == 0) { + } else if (strcmp (_tmp221_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp77_, "IOError") == 0) { + } else if (strcmp (_tmp221_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp77_, "BadAddress") == 0) { + } else if (strcmp (_tmp221_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp77_, "NotSupported") == 0) { + } else if (strcmp (_tmp221_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp77_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp221_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp77_, "AccessDenied") == 0) { + } else if (strcmp (_tmp221_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp77_, "AuthFailed") == 0) { + } else if (strcmp (_tmp221_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp77_, "NoServer") == 0) { + } else if (strcmp (_tmp221_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp77_, "Timeout") == 0) { + } else if (strcmp (_tmp221_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp77_, "NoNetwork") == 0) { + } else if (strcmp (_tmp221_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp77_, "AddressInUse") == 0) { + } else if (strcmp (_tmp221_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp77_, "Disconnected") == 0) { + } else if (strcmp (_tmp221_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp77_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp221_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp77_, "FileNotFound") == 0) { + } else if (strcmp (_tmp221_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp77_, "FileExists") == 0) { + } else if (strcmp (_tmp221_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp77_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp221_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp77_, "TimedOut") == 0) { + } else if (strcmp (_tmp221_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp77_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp221_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp77_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp221_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp77_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp221_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp221_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp221_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp77_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp221_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp77_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp221_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp77_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp221_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp77_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp221_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp77_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp221_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp77_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp221_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp77_, "RemoteException") == 0) { + } else if (strcmp (_tmp221_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2797,13 +3052,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp75_); + dbus_message_iter_get_basic (&_iter, &_tmp219_); dbus_message_iter_next (&_iter); - _channel_group_id = _tmp75_; + _channel_group_id = _tmp219_; *channel_group_id = _channel_group_id; - dbus_message_iter_get_basic (&_iter, &_tmp76_); + dbus_message_iter_get_basic (&_iter, &_tmp220_); dbus_message_iter_next (&_iter); - _result = _tmp76_; + _result = _tmp220_; dbus_message_unref (_reply); return _result; } @@ -2814,17 +3069,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_int32_t _tmp78_; + dbus_int32_t _tmp222_; gboolean _result; - dbus_bool_t _tmp79_; + dbus_bool_t _tmp223_; if (((DVBIDBusManagerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp78_ = channel_group_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp78_); + _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); @@ -2834,78 +3089,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp80_; + const char* _tmp224_; _edomain = DBUS_GERROR; - _tmp80_ = _dbus_error.name + 27; - if (strcmp (_tmp80_, "Failed") == 0) { + _tmp224_ = _dbus_error.name + 27; + if (strcmp (_tmp224_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp80_, "NoMemory") == 0) { + } else if (strcmp (_tmp224_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp80_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp224_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp80_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp224_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp80_, "NoReply") == 0) { + } else if (strcmp (_tmp224_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp80_, "IOError") == 0) { + } else if (strcmp (_tmp224_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp80_, "BadAddress") == 0) { + } else if (strcmp (_tmp224_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp80_, "NotSupported") == 0) { + } else if (strcmp (_tmp224_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp80_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp224_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp80_, "AccessDenied") == 0) { + } else if (strcmp (_tmp224_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp80_, "AuthFailed") == 0) { + } else if (strcmp (_tmp224_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp80_, "NoServer") == 0) { + } else if (strcmp (_tmp224_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp80_, "Timeout") == 0) { + } else if (strcmp (_tmp224_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp80_, "NoNetwork") == 0) { + } else if (strcmp (_tmp224_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp80_, "AddressInUse") == 0) { + } else if (strcmp (_tmp224_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp80_, "Disconnected") == 0) { + } else if (strcmp (_tmp224_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp80_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp224_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp80_, "FileNotFound") == 0) { + } else if (strcmp (_tmp224_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp80_, "FileExists") == 0) { + } else if (strcmp (_tmp224_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp80_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp224_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp80_, "TimedOut") == 0) { + } else if (strcmp (_tmp224_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp80_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp224_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp80_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp224_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp80_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp224_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp224_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp224_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp80_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp224_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp80_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp224_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp80_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp224_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp80_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp224_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp80_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp224_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp80_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp224_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp80_, "RemoteException") == 0) { + } else if (strcmp (_tmp224_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2915,9 +3170,161 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp79_); + dbus_message_iter_get_basic (&_iter, &_tmp223_); dbus_message_iter_next (&_iter); - _result = _tmp79_; + _result = _tmp223_; + dbus_message_unref (_reply); + 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; + 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"); + 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; + gint _ecode; + 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); + return NULL; + } + dbus_message_iter_init (_reply, &_iter); + _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); + } + _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_)) { + char* _key; + char* _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_; + } + _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; } @@ -2933,6 +3340,7 @@ 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; } @@ -2962,24 +3370,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusManager.vala gnome-dvb-daemon-0.1.21/src/dbus/IDBusManager.vala --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusManager.vala 2009-10-15 10:03:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusManager.vala 2010-05-12 13:47:32.000000000 +0000 @@ -107,6 +107,12 @@ */ public abstract bool RemoveChannelGroup (int channel_group_id) throws DBus.Error; + /** + * @returns: informations about all connected + * devices retrieved via udev + */ + public abstract GLib.HashTable[] GetDevices () throws DBus.Error; + } } diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusRecorder.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusRecorder.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusRecorder.c 2010-02-23 13:10:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusRecorder.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusRecorder.c generated by valac, the Vala compiler +/* IDBusRecorder.c generated by valac 0.9.7, the Vala compiler * generated from IDBusRecorder.vala, do not modify */ /* @@ -42,9 +42,9 @@ typedef struct _DVBIDBusRecorderIface DVBIDBusRecorderIface; #define DVB_TYPE_OVERLAP_TYPE (dvb_overlap_type_get_type ()) +typedef struct _DBusObjectVTable _DBusObjectVTable; typedef struct _DVBIDBusRecorderDBusProxy DVBIDBusRecorderDBusProxy; typedef DBusGProxyClass DVBIDBusRecorderDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBTimerInfo { guint32 id; @@ -82,24 +82,25 @@ 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; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_timer_info_get_type (void); +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); -GType dvb_id_bus_recorder_get_type (void); +DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); 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); gboolean dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error); @@ -117,6 +118,8 @@ gboolean dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error); 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 _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); @@ -142,8 +145,7 @@ 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); -DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); @@ -171,8 +173,6 @@ static void dvb_id_bus_recorder_dbus_proxy_dvb_id_bus_recorder__interface_init (DVBIDBusRecorderIface* iface); static void dvb_id_bus_recorder_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_recorder_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -209,99 +209,222 @@ GType dvb_timer_info_get_type (void) { - static GType dvb_timer_info_type_id = 0; - if (dvb_timer_info_type_id == 0) { + static volatile gsize dvb_timer_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_timer_info_type_id__volatile)) { + GType dvb_timer_info_type_id; dvb_timer_info_type_id = g_boxed_type_register_static ("DVBTimerInfo", (GBoxedCopyFunc) dvb_timer_info_dup, (GBoxedFreeFunc) dvb_timer_info_free); + g_once_init_leave (&dvb_timer_info_type_id__volatile, dvb_timer_info_type_id); } - return dvb_timer_info_type_id; + return dvb_timer_info_type_id__volatile; } +/** + * @channel: Channel number + * @start_year: The year when the recording should start + * @start_month: The month when recording should start + * @start_day: The day when recording should start + * @start_hour: The hour when recording should start + * @start_minute: The minute when recording should start + * @duration: How long the channel should be recorded (in minutes) + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * be created + * @returns: TRUE on success + * + * 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) { 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); } +/** + * Works the same way as AddTimer() but adds a margin before and + * 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) { 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); } +/** + * @event_id: id of the EPG event + * @channel_sid: SID of channel + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * be created + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_AddTimerForEPGEvent (DVBIDBusRecorder* self, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->AddTimerForEPGEvent (self, event_id, channel_sid, timer_id, error); } +/** + * @timer_id: The id of the timer you want to delete + * @returns: TRUE on success + * + * Delete timer. If the id belongs to the currently + * active timer recording is aborted. + */ gboolean dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->DeleteTimer (self, timer_id, error); } +/** + * dvb_recorder_GetTimers + * @returns: A list of all timer ids + */ guint32* dvb_id_bus_recorder_GetTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetTimers (self, result_length1, error); } +/** + * @timer_id: Timer's id + * @start_time: An array of length 5, where index 0 = year, 1 = month, + * 2 = day, 3 = hour and 4 = minute. + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_GetStartTime (DVBIDBusRecorder* self, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetStartTime (self, timer_id, start_time, start_time_length1, error); } +/** + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * @start_year: The year when the recording should start + * @start_month: The month when recording should start + * @start_day: The day when recording should start + * @start_hour: The hour when recording should start + * @start_minute: The minute when recording should start + * @duration: How long the channel should be recorded (in minutes) + * @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) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->SetStartTime (self, timer_id, start_year, start_month, start_day, start_hour, start_minute, error); } +/** + * @timer_id: Timer's id + * @end_time: Same as dvb_recorder_GetStartTime() + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_GetEndTime (DVBIDBusRecorder* self, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetEndTime (self, timer_id, end_time, end_time_length1, error); } +/** + * @timer_id: Timer's id + * @duration: Duration in seconds or 0 if there's no timer with + * the given id + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_GetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint* duration, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetDuration (self, timer_id, duration, error); } +/** + * @timer_id: Timer's id + * @duration: Duration in minutes + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_SetDuration (DVBIDBusRecorder* self, guint32 timer_id, guint duration, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->SetDuration (self, timer_id, duration, error); } +/** + * @timer_id: Timer's id + * @name: The name of the channel the timer belongs to or an + * empty string when a timer with the given id doesn't exist + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_GetChannelName (DVBIDBusRecorder* self, guint32 timer_id, char** name, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetChannelName (self, timer_id, name, error); } +/** + * @timer_id: Timer's id + * @title: The name of the show the timer belongs to or an + * empty string if the timer doesn't exist or has no information + * about the title of the show + * @returns: TRUE on success + */ gboolean dvb_id_bus_recorder_GetTitle (DVBIDBusRecorder* self, guint32 timer_id, char** title, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetTitle (self, timer_id, title, error); } +/** + * @timer_id: Timer's id + * @returns: TRUE on success + * + * This method can be used to retrieve all informations + * about a particular timer at once + */ gboolean dvb_id_bus_recorder_GetAllInformations (DVBIDBusRecorder* self, guint32 timer_id, DVBTimerInfo* info, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetAllInformations (self, timer_id, info, error); } +/** + * @returns: The currently active timers + */ guint32* dvb_id_bus_recorder_GetActiveTimers (DVBIDBusRecorder* self, int* result_length1, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->GetActiveTimers (self, result_length1, error); } +/** + * @timer_id: Timer's id + * @returns: TRUE if timer is currently active + */ gboolean dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->IsTimerActive (self, timer_id, error); } +/** + * @returns: TRUE if a timer is already scheduled in the given + * 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) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->HasTimer (self, start_year, start_month, start_day, start_hour, start_minute, duration, error); } +/** + * 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) { return DVB_ID_BUS_RECORDER_GET_INTERFACE (self)->HasTimerForEvent (self, event_id, channel_sid, 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_recorder_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -3062,6 +3185,9 @@ 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)); } @@ -3069,14 +3195,16 @@ GType dvb_id_bus_recorder_get_type (void) { - static GType dvb_id_bus_recorder_type_id = 0; - if (dvb_id_bus_recorder_type_id == 0) { + 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; + return dvb_id_bus_recorder_type_id__volatile; } @@ -3109,15 +3237,15 @@ 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 _tmp88_; + 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, &_tmp88_); + dbus_message_iter_get_basic (&iter, &_tmp233_); dbus_message_iter_next (&iter); - timer_id = _tmp88_; + timer_id = _tmp233_; g_signal_emit_by_name (self, "recording-started", timer_id); } @@ -3125,15 +3253,15 @@ 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 _tmp89_; + 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, &_tmp89_); + dbus_message_iter_get_basic (&iter, &_tmp234_); dbus_message_iter_next (&iter); - recording_id = _tmp89_; + recording_id = _tmp234_; g_signal_emit_by_name (self, "recording-finished", recording_id); } @@ -3141,20 +3269,20 @@ static void _dbus_handle_dvb_id_bus_recorder_changed (DVBIDBusRecorder* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint32 timer_id = 0U; - dbus_uint32_t _tmp90_; + dbus_uint32_t _tmp235_; guint type = 0U; - dbus_uint32_t _tmp91_; + 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, &_tmp90_); + dbus_message_iter_get_basic (&iter, &_tmp235_); dbus_message_iter_next (&iter); - timer_id = _tmp90_; - dbus_message_iter_get_basic (&iter, &_tmp91_); + timer_id = _tmp235_; + dbus_message_iter_get_basic (&iter, &_tmp236_); dbus_message_iter_next (&iter); - type = _tmp91_; + type = _tmp236_; g_signal_emit_by_name (self, "changed", timer_id, type); } @@ -3202,37 +3330,37 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp92_; - dbus_int32_t _tmp93_; - dbus_int32_t _tmp94_; - dbus_int32_t _tmp95_; - dbus_int32_t _tmp96_; - dbus_int32_t _tmp97_; - dbus_uint32_t _tmp98_; + 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 _tmp99_; + dbus_uint32_t _tmp244_; gboolean _result; - dbus_bool_t _tmp100_; + dbus_bool_t _tmp245_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp92_ = channel; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp92_); - _tmp93_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp93_); - _tmp94_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp94_); - _tmp95_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp95_); - _tmp96_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp96_); - _tmp97_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp97_); - _tmp98_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp98_); + _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); @@ -3242,78 +3370,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp101_; + const char* _tmp246_; _edomain = DBUS_GERROR; - _tmp101_ = _dbus_error.name + 27; - if (strcmp (_tmp101_, "Failed") == 0) { + _tmp246_ = _dbus_error.name + 27; + if (strcmp (_tmp246_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp101_, "NoMemory") == 0) { + } else if (strcmp (_tmp246_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp101_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp246_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp101_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp246_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp101_, "NoReply") == 0) { + } else if (strcmp (_tmp246_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp101_, "IOError") == 0) { + } else if (strcmp (_tmp246_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp101_, "BadAddress") == 0) { + } else if (strcmp (_tmp246_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp101_, "NotSupported") == 0) { + } else if (strcmp (_tmp246_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp101_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp246_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp101_, "AccessDenied") == 0) { + } else if (strcmp (_tmp246_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp101_, "AuthFailed") == 0) { + } else if (strcmp (_tmp246_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp101_, "NoServer") == 0) { + } else if (strcmp (_tmp246_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp101_, "Timeout") == 0) { + } else if (strcmp (_tmp246_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp101_, "NoNetwork") == 0) { + } else if (strcmp (_tmp246_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp101_, "AddressInUse") == 0) { + } else if (strcmp (_tmp246_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp101_, "Disconnected") == 0) { + } else if (strcmp (_tmp246_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp101_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp246_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp101_, "FileNotFound") == 0) { + } else if (strcmp (_tmp246_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp101_, "FileExists") == 0) { + } else if (strcmp (_tmp246_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp101_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp246_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp101_, "TimedOut") == 0) { + } else if (strcmp (_tmp246_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp101_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp246_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp101_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp246_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp101_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp246_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp101_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp246_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp101_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp246_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp101_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp246_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp101_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp246_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp101_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp246_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp101_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp246_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp101_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp246_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp101_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp246_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp101_, "RemoteException") == 0) { + } else if (strcmp (_tmp246_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3323,13 +3451,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp99_); + dbus_message_iter_get_basic (&_iter, &_tmp244_); dbus_message_iter_next (&_iter); - _timer_id = _tmp99_; + _timer_id = _tmp244_; *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp100_); + dbus_message_iter_get_basic (&_iter, &_tmp245_); dbus_message_iter_next (&_iter); - _result = _tmp100_; + _result = _tmp245_; dbus_message_unref (_reply); return _result; } @@ -3340,37 +3468,37 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp102_; - dbus_int32_t _tmp103_; - dbus_int32_t _tmp104_; - dbus_int32_t _tmp105_; - dbus_int32_t _tmp106_; - dbus_int32_t _tmp107_; - dbus_uint32_t _tmp108_; + 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 _tmp109_; + dbus_uint32_t _tmp254_; gboolean _result; - dbus_bool_t _tmp110_; + dbus_bool_t _tmp255_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp102_ = channel; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp102_); - _tmp103_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp103_); - _tmp104_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp104_); - _tmp105_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp105_); - _tmp106_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp106_); - _tmp107_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp107_); - _tmp108_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp108_); + _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); @@ -3380,78 +3508,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp111_; + const char* _tmp256_; _edomain = DBUS_GERROR; - _tmp111_ = _dbus_error.name + 27; - if (strcmp (_tmp111_, "Failed") == 0) { + _tmp256_ = _dbus_error.name + 27; + if (strcmp (_tmp256_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp111_, "NoMemory") == 0) { + } else if (strcmp (_tmp256_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp111_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp256_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp111_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp256_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp111_, "NoReply") == 0) { + } else if (strcmp (_tmp256_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp111_, "IOError") == 0) { + } else if (strcmp (_tmp256_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp111_, "BadAddress") == 0) { + } else if (strcmp (_tmp256_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp111_, "NotSupported") == 0) { + } else if (strcmp (_tmp256_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp111_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp256_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp111_, "AccessDenied") == 0) { + } else if (strcmp (_tmp256_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp111_, "AuthFailed") == 0) { + } else if (strcmp (_tmp256_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp111_, "NoServer") == 0) { + } else if (strcmp (_tmp256_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp111_, "Timeout") == 0) { + } else if (strcmp (_tmp256_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp111_, "NoNetwork") == 0) { + } else if (strcmp (_tmp256_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp111_, "AddressInUse") == 0) { + } else if (strcmp (_tmp256_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp111_, "Disconnected") == 0) { + } else if (strcmp (_tmp256_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp111_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp256_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp111_, "FileNotFound") == 0) { + } else if (strcmp (_tmp256_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp111_, "FileExists") == 0) { + } else if (strcmp (_tmp256_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp111_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp256_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp111_, "TimedOut") == 0) { + } else if (strcmp (_tmp256_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp111_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp256_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp111_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp256_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp111_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp256_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp111_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp256_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp111_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp256_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp111_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp256_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp111_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp256_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp111_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp256_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp111_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp256_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp111_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp256_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp111_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp256_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp111_, "RemoteException") == 0) { + } else if (strcmp (_tmp256_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3461,13 +3589,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp109_); + dbus_message_iter_get_basic (&_iter, &_tmp254_); dbus_message_iter_next (&_iter); - _timer_id = _tmp109_; + _timer_id = _tmp254_; *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp110_); + dbus_message_iter_get_basic (&_iter, &_tmp255_); dbus_message_iter_next (&_iter); - _result = _tmp110_; + _result = _tmp255_; dbus_message_unref (_reply); return _result; } @@ -3478,22 +3606,22 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp112_; - dbus_uint32_t _tmp113_; + dbus_uint32_t _tmp257_; + dbus_uint32_t _tmp258_; guint32 _timer_id; - dbus_uint32_t _tmp114_; + dbus_uint32_t _tmp259_; gboolean _result; - dbus_bool_t _tmp115_; + dbus_bool_t _tmp260_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp112_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp112_); - _tmp113_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp113_); + _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); @@ -3503,78 +3631,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp116_; + const char* _tmp261_; _edomain = DBUS_GERROR; - _tmp116_ = _dbus_error.name + 27; - if (strcmp (_tmp116_, "Failed") == 0) { + _tmp261_ = _dbus_error.name + 27; + if (strcmp (_tmp261_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp116_, "NoMemory") == 0) { + } else if (strcmp (_tmp261_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp116_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp261_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp116_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp261_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp116_, "NoReply") == 0) { + } else if (strcmp (_tmp261_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp116_, "IOError") == 0) { + } else if (strcmp (_tmp261_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp116_, "BadAddress") == 0) { + } else if (strcmp (_tmp261_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp116_, "NotSupported") == 0) { + } else if (strcmp (_tmp261_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp116_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp261_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp116_, "AccessDenied") == 0) { + } else if (strcmp (_tmp261_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp116_, "AuthFailed") == 0) { + } else if (strcmp (_tmp261_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp116_, "NoServer") == 0) { + } else if (strcmp (_tmp261_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp116_, "Timeout") == 0) { + } else if (strcmp (_tmp261_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp116_, "NoNetwork") == 0) { + } else if (strcmp (_tmp261_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp116_, "AddressInUse") == 0) { + } else if (strcmp (_tmp261_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp116_, "Disconnected") == 0) { + } else if (strcmp (_tmp261_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp116_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp261_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp116_, "FileNotFound") == 0) { + } else if (strcmp (_tmp261_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp116_, "FileExists") == 0) { + } else if (strcmp (_tmp261_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp116_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp261_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp116_, "TimedOut") == 0) { + } else if (strcmp (_tmp261_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp116_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp261_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp116_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp261_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp116_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp261_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp116_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp261_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp116_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp261_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp116_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp261_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp116_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp261_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp116_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp261_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp116_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp261_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp116_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp261_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp116_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp261_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp116_, "RemoteException") == 0) { + } else if (strcmp (_tmp261_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3584,13 +3712,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp114_); + dbus_message_iter_get_basic (&_iter, &_tmp259_); dbus_message_iter_next (&_iter); - _timer_id = _tmp114_; + _timer_id = _tmp259_; *timer_id = _timer_id; - dbus_message_iter_get_basic (&_iter, &_tmp115_); + dbus_message_iter_get_basic (&_iter, &_tmp260_); dbus_message_iter_next (&_iter); - _result = _tmp115_; + _result = _tmp260_; dbus_message_unref (_reply); return _result; } @@ -3601,17 +3729,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp117_; + dbus_uint32_t _tmp262_; gboolean _result; - dbus_bool_t _tmp118_; + dbus_bool_t _tmp263_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp117_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp117_); + _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); @@ -3621,78 +3749,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp119_; + const char* _tmp264_; _edomain = DBUS_GERROR; - _tmp119_ = _dbus_error.name + 27; - if (strcmp (_tmp119_, "Failed") == 0) { + _tmp264_ = _dbus_error.name + 27; + if (strcmp (_tmp264_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp119_, "NoMemory") == 0) { + } else if (strcmp (_tmp264_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp119_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp264_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp119_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp264_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp119_, "NoReply") == 0) { + } else if (strcmp (_tmp264_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp119_, "IOError") == 0) { + } else if (strcmp (_tmp264_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp119_, "BadAddress") == 0) { + } else if (strcmp (_tmp264_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp119_, "NotSupported") == 0) { + } else if (strcmp (_tmp264_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp119_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp264_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp119_, "AccessDenied") == 0) { + } else if (strcmp (_tmp264_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp119_, "AuthFailed") == 0) { + } else if (strcmp (_tmp264_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp119_, "NoServer") == 0) { + } else if (strcmp (_tmp264_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp119_, "Timeout") == 0) { + } else if (strcmp (_tmp264_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp119_, "NoNetwork") == 0) { + } else if (strcmp (_tmp264_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp119_, "AddressInUse") == 0) { + } else if (strcmp (_tmp264_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp119_, "Disconnected") == 0) { + } else if (strcmp (_tmp264_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp119_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp264_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp119_, "FileNotFound") == 0) { + } else if (strcmp (_tmp264_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp119_, "FileExists") == 0) { + } else if (strcmp (_tmp264_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp119_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp264_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp119_, "TimedOut") == 0) { + } else if (strcmp (_tmp264_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp119_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp264_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp119_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp264_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp119_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp264_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp119_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp264_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp119_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp264_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp119_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp264_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp119_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp264_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp119_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp264_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp119_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp264_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp119_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp264_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp119_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp264_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp119_, "RemoteException") == 0) { + } else if (strcmp (_tmp264_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3702,9 +3830,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp118_); + dbus_message_iter_get_basic (&_iter, &_tmp263_); dbus_message_iter_next (&_iter); - _result = _tmp118_; + _result = _tmp263_; dbus_message_unref (_reply); return _result; } @@ -3717,13 +3845,13 @@ DBusMessageIter _iter; guint32* _result; int _result_length1; - guint32* _tmp120_; - int _tmp120__length; - int _tmp120__size; - int _tmp120__length1; - DBusMessageIter _tmp121_; + guint32* _tmp265_; + int _tmp265__length; + int _tmp265__size; + int _tmp265__length1; + DBusMessageIter _tmp266_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -3737,78 +3865,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp123_; + const char* _tmp268_; _edomain = DBUS_GERROR; - _tmp123_ = _dbus_error.name + 27; - if (strcmp (_tmp123_, "Failed") == 0) { + _tmp268_ = _dbus_error.name + 27; + if (strcmp (_tmp268_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp123_, "NoMemory") == 0) { + } else if (strcmp (_tmp268_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp123_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp268_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp123_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp268_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp123_, "NoReply") == 0) { + } else if (strcmp (_tmp268_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp123_, "IOError") == 0) { + } else if (strcmp (_tmp268_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp123_, "BadAddress") == 0) { + } else if (strcmp (_tmp268_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp123_, "NotSupported") == 0) { + } else if (strcmp (_tmp268_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp123_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp268_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp123_, "AccessDenied") == 0) { + } else if (strcmp (_tmp268_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp123_, "AuthFailed") == 0) { + } else if (strcmp (_tmp268_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp123_, "NoServer") == 0) { + } else if (strcmp (_tmp268_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp123_, "Timeout") == 0) { + } else if (strcmp (_tmp268_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp123_, "NoNetwork") == 0) { + } else if (strcmp (_tmp268_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp123_, "AddressInUse") == 0) { + } else if (strcmp (_tmp268_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp123_, "Disconnected") == 0) { + } else if (strcmp (_tmp268_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp123_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp268_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp123_, "FileNotFound") == 0) { + } else if (strcmp (_tmp268_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp123_, "FileExists") == 0) { + } else if (strcmp (_tmp268_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp123_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp268_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp123_, "TimedOut") == 0) { + } else if (strcmp (_tmp268_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp123_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp268_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp123_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp268_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp123_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp268_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp123_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp268_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp123_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp268_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp123_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp268_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp123_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp268_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp123_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp268_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp123_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp268_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp123_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp268_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp123_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp268_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp123_, "RemoteException") == 0) { + } else if (strcmp (_tmp268_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -3819,24 +3947,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp120_ = g_new (guint32, 5); - _tmp120__length = 0; - _tmp120__size = 4; - _tmp120__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp121_); - for (; dbus_message_iter_get_arg_type (&_tmp121_); _tmp120__length1++) { - dbus_uint32_t _tmp122_; - if (_tmp120__size == _tmp120__length) { - _tmp120__size = 2 * _tmp120__size; - _tmp120_ = g_renew (guint32, _tmp120_, _tmp120__size + 1); + _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 (&_tmp121_, &_tmp122_); - dbus_message_iter_next (&_tmp121_); - _tmp120_[_tmp120__length++] = _tmp122_; + dbus_message_iter_get_basic (&_tmp266_, &_tmp267_); + dbus_message_iter_next (&_tmp266_); + _tmp265_[_tmp265__length++] = _tmp267_; } - _result_length1 = _tmp120__length1; + _result_length1 = _tmp265__length1; dbus_message_iter_next (&_iter); - _result = _tmp120_; + _result = _tmp265_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -3848,24 +3976,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp124_; + dbus_uint32_t _tmp269_; guint32* _start_time; int _start_time_length1; - guint32* _tmp125_; - int _tmp125__length; - int _tmp125__size; - int _tmp125__length1; - DBusMessageIter _tmp126_; + guint32* _tmp270_; + int _tmp270__length; + int _tmp270__size; + int _tmp270__length1; + DBusMessageIter _tmp271_; gboolean _result; - dbus_bool_t _tmp128_; + dbus_bool_t _tmp273_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp124_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp124_); + _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); @@ -3875,78 +4003,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp129_; + const char* _tmp274_; _edomain = DBUS_GERROR; - _tmp129_ = _dbus_error.name + 27; - if (strcmp (_tmp129_, "Failed") == 0) { + _tmp274_ = _dbus_error.name + 27; + if (strcmp (_tmp274_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp129_, "NoMemory") == 0) { + } else if (strcmp (_tmp274_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp129_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp274_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp129_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp274_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp129_, "NoReply") == 0) { + } else if (strcmp (_tmp274_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp129_, "IOError") == 0) { + } else if (strcmp (_tmp274_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp129_, "BadAddress") == 0) { + } else if (strcmp (_tmp274_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp129_, "NotSupported") == 0) { + } else if (strcmp (_tmp274_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp129_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp274_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp129_, "AccessDenied") == 0) { + } else if (strcmp (_tmp274_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp129_, "AuthFailed") == 0) { + } else if (strcmp (_tmp274_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp129_, "NoServer") == 0) { + } else if (strcmp (_tmp274_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp129_, "Timeout") == 0) { + } else if (strcmp (_tmp274_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp129_, "NoNetwork") == 0) { + } else if (strcmp (_tmp274_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp129_, "AddressInUse") == 0) { + } else if (strcmp (_tmp274_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp129_, "Disconnected") == 0) { + } else if (strcmp (_tmp274_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp129_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp274_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp129_, "FileNotFound") == 0) { + } else if (strcmp (_tmp274_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp129_, "FileExists") == 0) { + } else if (strcmp (_tmp274_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp129_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp274_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp129_, "TimedOut") == 0) { + } else if (strcmp (_tmp274_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp129_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp274_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp129_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp274_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp129_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp274_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp129_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp274_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp129_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp274_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp129_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp274_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp129_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp274_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp129_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp274_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp129_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp274_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp129_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp274_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp129_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp274_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp129_, "RemoteException") == 0) { + } else if (strcmp (_tmp274_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3957,29 +4085,29 @@ } dbus_message_iter_init (_reply, &_iter); _start_time_length1 = 0; - _tmp125_ = g_new (guint32, 5); - _tmp125__length = 0; - _tmp125__size = 4; - _tmp125__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp126_); - for (; dbus_message_iter_get_arg_type (&_tmp126_); _tmp125__length1++) { - dbus_uint32_t _tmp127_; - if (_tmp125__size == _tmp125__length) { - _tmp125__size = 2 * _tmp125__size; - _tmp125_ = g_renew (guint32, _tmp125_, _tmp125__size + 1); + _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 (&_tmp126_, &_tmp127_); - dbus_message_iter_next (&_tmp126_); - _tmp125_[_tmp125__length++] = _tmp127_; + dbus_message_iter_get_basic (&_tmp271_, &_tmp272_); + dbus_message_iter_next (&_tmp271_); + _tmp270_[_tmp270__length++] = _tmp272_; } - _start_time_length1 = _tmp125__length1; + _start_time_length1 = _tmp270__length1; dbus_message_iter_next (&_iter); - _start_time = _tmp125_; + _start_time = _tmp270_; *start_time = _start_time; *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp128_); + dbus_message_iter_get_basic (&_iter, &_tmp273_); dbus_message_iter_next (&_iter); - _result = _tmp128_; + _result = _tmp273_; dbus_message_unref (_reply); return _result; } @@ -3990,32 +4118,32 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp130_; - dbus_int32_t _tmp131_; - dbus_int32_t _tmp132_; - dbus_int32_t _tmp133_; - dbus_int32_t _tmp134_; - dbus_int32_t _tmp135_; + 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 _tmp136_; + dbus_bool_t _tmp281_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp130_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp130_); - _tmp131_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp131_); - _tmp132_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp132_); - _tmp133_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp133_); - _tmp134_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp134_); - _tmp135_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_INT32, &_tmp135_); + _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); @@ -4025,78 +4153,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp137_; + const char* _tmp282_; _edomain = DBUS_GERROR; - _tmp137_ = _dbus_error.name + 27; - if (strcmp (_tmp137_, "Failed") == 0) { + _tmp282_ = _dbus_error.name + 27; + if (strcmp (_tmp282_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp137_, "NoMemory") == 0) { + } else if (strcmp (_tmp282_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp137_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp282_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp137_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp282_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp137_, "NoReply") == 0) { + } else if (strcmp (_tmp282_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp137_, "IOError") == 0) { + } else if (strcmp (_tmp282_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp137_, "BadAddress") == 0) { + } else if (strcmp (_tmp282_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp137_, "NotSupported") == 0) { + } else if (strcmp (_tmp282_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp137_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp282_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp137_, "AccessDenied") == 0) { + } else if (strcmp (_tmp282_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp137_, "AuthFailed") == 0) { + } else if (strcmp (_tmp282_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp137_, "NoServer") == 0) { + } else if (strcmp (_tmp282_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp137_, "Timeout") == 0) { + } else if (strcmp (_tmp282_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp137_, "NoNetwork") == 0) { + } else if (strcmp (_tmp282_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp137_, "AddressInUse") == 0) { + } else if (strcmp (_tmp282_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp137_, "Disconnected") == 0) { + } else if (strcmp (_tmp282_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp137_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp282_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp137_, "FileNotFound") == 0) { + } else if (strcmp (_tmp282_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp137_, "FileExists") == 0) { + } else if (strcmp (_tmp282_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp137_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp282_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp137_, "TimedOut") == 0) { + } else if (strcmp (_tmp282_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp137_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp282_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp137_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp282_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp137_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp282_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp137_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp282_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp137_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp282_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp137_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp282_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp137_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp282_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp137_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp282_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp137_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp282_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp137_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp282_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp137_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp282_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp137_, "RemoteException") == 0) { + } else if (strcmp (_tmp282_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4106,9 +4234,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp136_); + dbus_message_iter_get_basic (&_iter, &_tmp281_); dbus_message_iter_next (&_iter); - _result = _tmp136_; + _result = _tmp281_; dbus_message_unref (_reply); return _result; } @@ -4119,24 +4247,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp138_; + dbus_uint32_t _tmp283_; guint* _end_time; int _end_time_length1; - guint* _tmp139_; - int _tmp139__length; - int _tmp139__size; - int _tmp139__length1; - DBusMessageIter _tmp140_; + guint* _tmp284_; + int _tmp284__length; + int _tmp284__size; + int _tmp284__length1; + DBusMessageIter _tmp285_; gboolean _result; - dbus_bool_t _tmp142_; + dbus_bool_t _tmp287_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp138_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp138_); + _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); @@ -4146,78 +4274,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp143_; + const char* _tmp288_; _edomain = DBUS_GERROR; - _tmp143_ = _dbus_error.name + 27; - if (strcmp (_tmp143_, "Failed") == 0) { + _tmp288_ = _dbus_error.name + 27; + if (strcmp (_tmp288_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp143_, "NoMemory") == 0) { + } else if (strcmp (_tmp288_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp143_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp288_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp143_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp288_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp143_, "NoReply") == 0) { + } else if (strcmp (_tmp288_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp143_, "IOError") == 0) { + } else if (strcmp (_tmp288_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp143_, "BadAddress") == 0) { + } else if (strcmp (_tmp288_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp143_, "NotSupported") == 0) { + } else if (strcmp (_tmp288_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp143_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp288_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp143_, "AccessDenied") == 0) { + } else if (strcmp (_tmp288_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp143_, "AuthFailed") == 0) { + } else if (strcmp (_tmp288_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp143_, "NoServer") == 0) { + } else if (strcmp (_tmp288_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp143_, "Timeout") == 0) { + } else if (strcmp (_tmp288_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp143_, "NoNetwork") == 0) { + } else if (strcmp (_tmp288_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp143_, "AddressInUse") == 0) { + } else if (strcmp (_tmp288_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp143_, "Disconnected") == 0) { + } else if (strcmp (_tmp288_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp143_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp288_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp143_, "FileNotFound") == 0) { + } else if (strcmp (_tmp288_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp143_, "FileExists") == 0) { + } else if (strcmp (_tmp288_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp143_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp288_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp143_, "TimedOut") == 0) { + } else if (strcmp (_tmp288_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp143_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp288_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp143_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp288_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp143_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp288_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp143_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp288_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp143_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp288_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp143_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp288_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp143_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp288_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp143_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp288_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp143_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp288_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp143_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp288_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp143_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp288_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp143_, "RemoteException") == 0) { + } else if (strcmp (_tmp288_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4228,29 +4356,29 @@ } dbus_message_iter_init (_reply, &_iter); _end_time_length1 = 0; - _tmp139_ = g_new (guint, 5); - _tmp139__length = 0; - _tmp139__size = 4; - _tmp139__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp140_); - for (; dbus_message_iter_get_arg_type (&_tmp140_); _tmp139__length1++) { - dbus_uint32_t _tmp141_; - if (_tmp139__size == _tmp139__length) { - _tmp139__size = 2 * _tmp139__size; - _tmp139_ = g_renew (guint, _tmp139_, _tmp139__size + 1); + _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 (&_tmp140_, &_tmp141_); - dbus_message_iter_next (&_tmp140_); - _tmp139_[_tmp139__length++] = _tmp141_; + dbus_message_iter_get_basic (&_tmp285_, &_tmp286_); + dbus_message_iter_next (&_tmp285_); + _tmp284_[_tmp284__length++] = _tmp286_; } - _end_time_length1 = _tmp139__length1; + _end_time_length1 = _tmp284__length1; dbus_message_iter_next (&_iter); - _end_time = _tmp139_; + _end_time = _tmp284_; *end_time = _end_time; *end_time_length1 = _end_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp142_); + dbus_message_iter_get_basic (&_iter, &_tmp287_); dbus_message_iter_next (&_iter); - _result = _tmp142_; + _result = _tmp287_; dbus_message_unref (_reply); return _result; } @@ -4261,19 +4389,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp144_; + dbus_uint32_t _tmp289_; guint _duration; - dbus_uint32_t _tmp145_; + dbus_uint32_t _tmp290_; gboolean _result; - dbus_bool_t _tmp146_; + dbus_bool_t _tmp291_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp144_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp144_); + _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); @@ -4283,78 +4411,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp147_; + const char* _tmp292_; _edomain = DBUS_GERROR; - _tmp147_ = _dbus_error.name + 27; - if (strcmp (_tmp147_, "Failed") == 0) { + _tmp292_ = _dbus_error.name + 27; + if (strcmp (_tmp292_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp147_, "NoMemory") == 0) { + } else if (strcmp (_tmp292_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp147_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp292_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp147_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp292_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp147_, "NoReply") == 0) { + } else if (strcmp (_tmp292_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp147_, "IOError") == 0) { + } else if (strcmp (_tmp292_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp147_, "BadAddress") == 0) { + } else if (strcmp (_tmp292_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp147_, "NotSupported") == 0) { + } else if (strcmp (_tmp292_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp147_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp292_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp147_, "AccessDenied") == 0) { + } else if (strcmp (_tmp292_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp147_, "AuthFailed") == 0) { + } else if (strcmp (_tmp292_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp147_, "NoServer") == 0) { + } else if (strcmp (_tmp292_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp147_, "Timeout") == 0) { + } else if (strcmp (_tmp292_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp147_, "NoNetwork") == 0) { + } else if (strcmp (_tmp292_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp147_, "AddressInUse") == 0) { + } else if (strcmp (_tmp292_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp147_, "Disconnected") == 0) { + } else if (strcmp (_tmp292_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp147_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp292_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp147_, "FileNotFound") == 0) { + } else if (strcmp (_tmp292_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp147_, "FileExists") == 0) { + } else if (strcmp (_tmp292_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp147_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp292_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp147_, "TimedOut") == 0) { + } else if (strcmp (_tmp292_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp147_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp292_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp147_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp292_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp147_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp292_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp147_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp292_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp147_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp292_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp147_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp292_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp147_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp292_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp147_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp292_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp147_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp292_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp147_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp292_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp147_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp292_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp147_, "RemoteException") == 0) { + } else if (strcmp (_tmp292_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4364,13 +4492,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp145_); + dbus_message_iter_get_basic (&_iter, &_tmp290_); dbus_message_iter_next (&_iter); - _duration = _tmp145_; + _duration = _tmp290_; *duration = _duration; - dbus_message_iter_get_basic (&_iter, &_tmp146_); + dbus_message_iter_get_basic (&_iter, &_tmp291_); dbus_message_iter_next (&_iter); - _result = _tmp146_; + _result = _tmp291_; dbus_message_unref (_reply); return _result; } @@ -4381,20 +4509,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp148_; - dbus_uint32_t _tmp149_; + dbus_uint32_t _tmp293_; + dbus_uint32_t _tmp294_; gboolean _result; - dbus_bool_t _tmp150_; + dbus_bool_t _tmp295_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp148_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp148_); - _tmp149_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp149_); + _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); @@ -4404,78 +4532,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp151_; + const char* _tmp296_; _edomain = DBUS_GERROR; - _tmp151_ = _dbus_error.name + 27; - if (strcmp (_tmp151_, "Failed") == 0) { + _tmp296_ = _dbus_error.name + 27; + if (strcmp (_tmp296_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp151_, "NoMemory") == 0) { + } else if (strcmp (_tmp296_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp151_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp296_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp151_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp296_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp151_, "NoReply") == 0) { + } else if (strcmp (_tmp296_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp151_, "IOError") == 0) { + } else if (strcmp (_tmp296_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp151_, "BadAddress") == 0) { + } else if (strcmp (_tmp296_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp151_, "NotSupported") == 0) { + } else if (strcmp (_tmp296_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp151_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp296_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp151_, "AccessDenied") == 0) { + } else if (strcmp (_tmp296_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp151_, "AuthFailed") == 0) { + } else if (strcmp (_tmp296_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp151_, "NoServer") == 0) { + } else if (strcmp (_tmp296_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp151_, "Timeout") == 0) { + } else if (strcmp (_tmp296_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp151_, "NoNetwork") == 0) { + } else if (strcmp (_tmp296_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp151_, "AddressInUse") == 0) { + } else if (strcmp (_tmp296_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp151_, "Disconnected") == 0) { + } else if (strcmp (_tmp296_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp151_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp296_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp151_, "FileNotFound") == 0) { + } else if (strcmp (_tmp296_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp151_, "FileExists") == 0) { + } else if (strcmp (_tmp296_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp151_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp296_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp151_, "TimedOut") == 0) { + } else if (strcmp (_tmp296_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp151_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp296_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp151_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp296_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp151_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp296_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp151_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp296_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp151_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp296_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp151_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp296_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp151_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp296_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp151_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp296_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp151_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp296_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp151_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp296_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp151_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp296_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp151_, "RemoteException") == 0) { + } else if (strcmp (_tmp296_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4485,9 +4613,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp150_); + dbus_message_iter_get_basic (&_iter, &_tmp295_); dbus_message_iter_next (&_iter); - _result = _tmp150_; + _result = _tmp295_; dbus_message_unref (_reply); return _result; } @@ -4498,19 +4626,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp152_; + dbus_uint32_t _tmp297_; char* _name; - const char* _tmp153_; + const char* _tmp298_; gboolean _result; - dbus_bool_t _tmp154_; + dbus_bool_t _tmp299_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp152_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp152_); + _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); @@ -4520,78 +4648,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp155_; + const char* _tmp300_; _edomain = DBUS_GERROR; - _tmp155_ = _dbus_error.name + 27; - if (strcmp (_tmp155_, "Failed") == 0) { + _tmp300_ = _dbus_error.name + 27; + if (strcmp (_tmp300_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp155_, "NoMemory") == 0) { + } else if (strcmp (_tmp300_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp155_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp300_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp155_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp300_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp155_, "NoReply") == 0) { + } else if (strcmp (_tmp300_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp155_, "IOError") == 0) { + } else if (strcmp (_tmp300_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp155_, "BadAddress") == 0) { + } else if (strcmp (_tmp300_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp155_, "NotSupported") == 0) { + } else if (strcmp (_tmp300_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp155_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp300_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp155_, "AccessDenied") == 0) { + } else if (strcmp (_tmp300_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp155_, "AuthFailed") == 0) { + } else if (strcmp (_tmp300_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp155_, "NoServer") == 0) { + } else if (strcmp (_tmp300_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp155_, "Timeout") == 0) { + } else if (strcmp (_tmp300_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp155_, "NoNetwork") == 0) { + } else if (strcmp (_tmp300_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp155_, "AddressInUse") == 0) { + } else if (strcmp (_tmp300_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp155_, "Disconnected") == 0) { + } else if (strcmp (_tmp300_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp155_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp300_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp155_, "FileNotFound") == 0) { + } else if (strcmp (_tmp300_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp155_, "FileExists") == 0) { + } else if (strcmp (_tmp300_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp155_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp300_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp155_, "TimedOut") == 0) { + } else if (strcmp (_tmp300_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp155_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp300_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp155_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp300_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp155_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp300_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp155_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp300_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp155_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp300_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp155_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp300_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp155_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp300_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp155_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp300_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp155_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp300_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp155_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp300_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp155_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp300_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp155_, "RemoteException") == 0) { + } else if (strcmp (_tmp300_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4601,13 +4729,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp153_); + dbus_message_iter_get_basic (&_iter, &_tmp298_); dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp153_); + _name = g_strdup (_tmp298_); *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp154_); + dbus_message_iter_get_basic (&_iter, &_tmp299_); dbus_message_iter_next (&_iter); - _result = _tmp154_; + _result = _tmp299_; dbus_message_unref (_reply); return _result; } @@ -4618,19 +4746,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp156_; + dbus_uint32_t _tmp301_; char* _title; - const char* _tmp157_; + const char* _tmp302_; gboolean _result; - dbus_bool_t _tmp158_; + dbus_bool_t _tmp303_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp156_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp156_); + _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); @@ -4640,78 +4768,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp159_; + const char* _tmp304_; _edomain = DBUS_GERROR; - _tmp159_ = _dbus_error.name + 27; - if (strcmp (_tmp159_, "Failed") == 0) { + _tmp304_ = _dbus_error.name + 27; + if (strcmp (_tmp304_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp159_, "NoMemory") == 0) { + } else if (strcmp (_tmp304_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp159_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp304_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp159_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp304_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp159_, "NoReply") == 0) { + } else if (strcmp (_tmp304_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp159_, "IOError") == 0) { + } else if (strcmp (_tmp304_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp159_, "BadAddress") == 0) { + } else if (strcmp (_tmp304_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp159_, "NotSupported") == 0) { + } else if (strcmp (_tmp304_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp159_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp304_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp159_, "AccessDenied") == 0) { + } else if (strcmp (_tmp304_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp159_, "AuthFailed") == 0) { + } else if (strcmp (_tmp304_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp159_, "NoServer") == 0) { + } else if (strcmp (_tmp304_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp159_, "Timeout") == 0) { + } else if (strcmp (_tmp304_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp159_, "NoNetwork") == 0) { + } else if (strcmp (_tmp304_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp159_, "AddressInUse") == 0) { + } else if (strcmp (_tmp304_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp159_, "Disconnected") == 0) { + } else if (strcmp (_tmp304_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp159_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp304_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp159_, "FileNotFound") == 0) { + } else if (strcmp (_tmp304_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp159_, "FileExists") == 0) { + } else if (strcmp (_tmp304_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp159_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp304_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp159_, "TimedOut") == 0) { + } else if (strcmp (_tmp304_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp159_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp304_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp159_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp304_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp159_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp304_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp159_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp304_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp159_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp304_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp159_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp304_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp159_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp304_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp159_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp304_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp159_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp304_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp159_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp304_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp159_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp304_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp159_, "RemoteException") == 0) { + } else if (strcmp (_tmp304_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4721,13 +4849,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp157_); + dbus_message_iter_get_basic (&_iter, &_tmp302_); dbus_message_iter_next (&_iter); - _title = g_strdup (_tmp157_); + _title = g_strdup (_tmp302_); *title = _title; - dbus_message_iter_get_basic (&_iter, &_tmp158_); + dbus_message_iter_get_basic (&_iter, &_tmp303_); dbus_message_iter_next (&_iter); - _result = _tmp158_; + _result = _tmp303_; dbus_message_unref (_reply); return _result; } @@ -4738,25 +4866,25 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp160_; + dbus_uint32_t _tmp305_; DVBTimerInfo _info; - DVBTimerInfo _tmp161_; - DBusMessageIter _tmp162_; - dbus_uint32_t _tmp163_; - dbus_uint32_t _tmp164_; - dbus_bool_t _tmp165_; - const char* _tmp166_; - const char* _tmp167_; + 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 _tmp168_; + dbus_bool_t _tmp313_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp160_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp160_); + _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); @@ -4766,78 +4894,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp169_; + const char* _tmp314_; _edomain = DBUS_GERROR; - _tmp169_ = _dbus_error.name + 27; - if (strcmp (_tmp169_, "Failed") == 0) { + _tmp314_ = _dbus_error.name + 27; + if (strcmp (_tmp314_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp169_, "NoMemory") == 0) { + } else if (strcmp (_tmp314_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp169_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp314_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp169_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp314_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp169_, "NoReply") == 0) { + } else if (strcmp (_tmp314_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp169_, "IOError") == 0) { + } else if (strcmp (_tmp314_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp169_, "BadAddress") == 0) { + } else if (strcmp (_tmp314_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp169_, "NotSupported") == 0) { + } else if (strcmp (_tmp314_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp169_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp314_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp169_, "AccessDenied") == 0) { + } else if (strcmp (_tmp314_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp169_, "AuthFailed") == 0) { + } else if (strcmp (_tmp314_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp169_, "NoServer") == 0) { + } else if (strcmp (_tmp314_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp169_, "Timeout") == 0) { + } else if (strcmp (_tmp314_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp169_, "NoNetwork") == 0) { + } else if (strcmp (_tmp314_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp169_, "AddressInUse") == 0) { + } else if (strcmp (_tmp314_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp169_, "Disconnected") == 0) { + } else if (strcmp (_tmp314_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp169_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp314_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp169_, "FileNotFound") == 0) { + } else if (strcmp (_tmp314_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp169_, "FileExists") == 0) { + } else if (strcmp (_tmp314_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp169_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp314_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp169_, "TimedOut") == 0) { + } else if (strcmp (_tmp314_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp169_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp314_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp169_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp314_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp169_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp314_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp169_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp314_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp169_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp314_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp169_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp314_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp169_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp314_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp169_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp314_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp169_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp314_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp169_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp314_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp169_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp314_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp169_, "RemoteException") == 0) { + } else if (strcmp (_tmp314_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -4847,28 +4975,28 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp162_); - dbus_message_iter_get_basic (&_tmp162_, &_tmp163_); - dbus_message_iter_next (&_tmp162_); - _tmp161_.id = _tmp163_; - dbus_message_iter_get_basic (&_tmp162_, &_tmp164_); - dbus_message_iter_next (&_tmp162_); - _tmp161_.duration = _tmp164_; - dbus_message_iter_get_basic (&_tmp162_, &_tmp165_); - dbus_message_iter_next (&_tmp162_); - _tmp161_.active = _tmp165_; - dbus_message_iter_get_basic (&_tmp162_, &_tmp166_); - dbus_message_iter_next (&_tmp162_); - _tmp161_.channel_name = g_strdup (_tmp166_); - dbus_message_iter_get_basic (&_tmp162_, &_tmp167_); - dbus_message_iter_next (&_tmp162_); - _tmp161_.title = g_strdup (_tmp167_); + 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 = _tmp161_; + _info = _tmp306_; *info = _info; - dbus_message_iter_get_basic (&_iter, &_tmp168_); + dbus_message_iter_get_basic (&_iter, &_tmp313_); dbus_message_iter_next (&_iter); - _result = _tmp168_; + _result = _tmp313_; dbus_message_unref (_reply); return _result; } @@ -4881,13 +5009,13 @@ DBusMessageIter _iter; guint32* _result; int _result_length1; - guint32* _tmp170_; - int _tmp170__length; - int _tmp170__size; - int _tmp170__length1; - DBusMessageIter _tmp171_; + guint32* _tmp315_; + int _tmp315__length; + int _tmp315__size; + int _tmp315__length1; + DBusMessageIter _tmp316_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -4901,78 +5029,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp173_; + const char* _tmp318_; _edomain = DBUS_GERROR; - _tmp173_ = _dbus_error.name + 27; - if (strcmp (_tmp173_, "Failed") == 0) { + _tmp318_ = _dbus_error.name + 27; + if (strcmp (_tmp318_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp173_, "NoMemory") == 0) { + } else if (strcmp (_tmp318_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp173_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp318_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp173_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp318_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp173_, "NoReply") == 0) { + } else if (strcmp (_tmp318_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp173_, "IOError") == 0) { + } else if (strcmp (_tmp318_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp173_, "BadAddress") == 0) { + } else if (strcmp (_tmp318_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp173_, "NotSupported") == 0) { + } else if (strcmp (_tmp318_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp173_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp318_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp173_, "AccessDenied") == 0) { + } else if (strcmp (_tmp318_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp173_, "AuthFailed") == 0) { + } else if (strcmp (_tmp318_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp173_, "NoServer") == 0) { + } else if (strcmp (_tmp318_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp173_, "Timeout") == 0) { + } else if (strcmp (_tmp318_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp173_, "NoNetwork") == 0) { + } else if (strcmp (_tmp318_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp173_, "AddressInUse") == 0) { + } else if (strcmp (_tmp318_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp173_, "Disconnected") == 0) { + } else if (strcmp (_tmp318_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp173_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp318_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp173_, "FileNotFound") == 0) { + } else if (strcmp (_tmp318_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp173_, "FileExists") == 0) { + } else if (strcmp (_tmp318_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp173_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp318_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp173_, "TimedOut") == 0) { + } else if (strcmp (_tmp318_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp173_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp318_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp173_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp318_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp173_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp318_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp173_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp318_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp173_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp318_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp173_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp318_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp173_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp318_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp173_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp318_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp173_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp318_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp173_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp318_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp173_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp318_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp173_, "RemoteException") == 0) { + } else if (strcmp (_tmp318_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -4983,24 +5111,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp170_ = g_new (guint32, 5); - _tmp170__length = 0; - _tmp170__size = 4; - _tmp170__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp171_); - for (; dbus_message_iter_get_arg_type (&_tmp171_); _tmp170__length1++) { - dbus_uint32_t _tmp172_; - if (_tmp170__size == _tmp170__length) { - _tmp170__size = 2 * _tmp170__size; - _tmp170_ = g_renew (guint32, _tmp170_, _tmp170__size + 1); + _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 (&_tmp171_, &_tmp172_); - dbus_message_iter_next (&_tmp171_); - _tmp170_[_tmp170__length++] = _tmp172_; + dbus_message_iter_get_basic (&_tmp316_, &_tmp317_); + dbus_message_iter_next (&_tmp316_); + _tmp315_[_tmp315__length++] = _tmp317_; } - _result_length1 = _tmp170__length1; + _result_length1 = _tmp315__length1; dbus_message_iter_next (&_iter); - _result = _tmp170_; + _result = _tmp315_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -5012,17 +5140,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp174_; + dbus_uint32_t _tmp319_; gboolean _result; - dbus_bool_t _tmp175_; + dbus_bool_t _tmp320_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp174_ = timer_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp174_); + _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); @@ -5032,78 +5160,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp176_; + const char* _tmp321_; _edomain = DBUS_GERROR; - _tmp176_ = _dbus_error.name + 27; - if (strcmp (_tmp176_, "Failed") == 0) { + _tmp321_ = _dbus_error.name + 27; + if (strcmp (_tmp321_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp176_, "NoMemory") == 0) { + } else if (strcmp (_tmp321_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp176_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp321_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp176_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp321_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp176_, "NoReply") == 0) { + } else if (strcmp (_tmp321_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp176_, "IOError") == 0) { + } else if (strcmp (_tmp321_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp176_, "BadAddress") == 0) { + } else if (strcmp (_tmp321_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp176_, "NotSupported") == 0) { + } else if (strcmp (_tmp321_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp176_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp321_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp176_, "AccessDenied") == 0) { + } else if (strcmp (_tmp321_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp176_, "AuthFailed") == 0) { + } else if (strcmp (_tmp321_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp176_, "NoServer") == 0) { + } else if (strcmp (_tmp321_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp176_, "Timeout") == 0) { + } else if (strcmp (_tmp321_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp176_, "NoNetwork") == 0) { + } else if (strcmp (_tmp321_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp176_, "AddressInUse") == 0) { + } else if (strcmp (_tmp321_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp176_, "Disconnected") == 0) { + } else if (strcmp (_tmp321_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp176_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp321_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp176_, "FileNotFound") == 0) { + } else if (strcmp (_tmp321_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp176_, "FileExists") == 0) { + } else if (strcmp (_tmp321_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp176_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp321_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp176_, "TimedOut") == 0) { + } else if (strcmp (_tmp321_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp176_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp321_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp176_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp321_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp176_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp321_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp176_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp321_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp176_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp321_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp176_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp321_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp176_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp321_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp176_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp321_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp176_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp321_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp176_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp321_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp176_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp321_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp176_, "RemoteException") == 0) { + } else if (strcmp (_tmp321_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -5113,9 +5241,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp175_); + dbus_message_iter_get_basic (&_iter, &_tmp320_); dbus_message_iter_next (&_iter); - _result = _tmp175_; + _result = _tmp320_; dbus_message_unref (_reply); return _result; } @@ -5126,32 +5254,32 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp177_; - dbus_uint32_t _tmp178_; - dbus_uint32_t _tmp179_; - dbus_uint32_t _tmp180_; - dbus_uint32_t _tmp181_; - dbus_uint32_t _tmp182_; + 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 _tmp183_; + dbus_bool_t _tmp328_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp177_ = start_year; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp177_); - _tmp178_ = start_month; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp178_); - _tmp179_ = start_day; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp179_); - _tmp180_ = start_hour; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp180_); - _tmp181_ = start_minute; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp181_); - _tmp182_ = duration; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp182_); + _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); @@ -5161,78 +5289,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp184_; + const char* _tmp329_; _edomain = DBUS_GERROR; - _tmp184_ = _dbus_error.name + 27; - if (strcmp (_tmp184_, "Failed") == 0) { + _tmp329_ = _dbus_error.name + 27; + if (strcmp (_tmp329_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp184_, "NoMemory") == 0) { + } else if (strcmp (_tmp329_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp184_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp329_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp184_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp329_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp184_, "NoReply") == 0) { + } else if (strcmp (_tmp329_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp184_, "IOError") == 0) { + } else if (strcmp (_tmp329_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp184_, "BadAddress") == 0) { + } else if (strcmp (_tmp329_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp184_, "NotSupported") == 0) { + } else if (strcmp (_tmp329_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp184_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp329_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp184_, "AccessDenied") == 0) { + } else if (strcmp (_tmp329_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp184_, "AuthFailed") == 0) { + } else if (strcmp (_tmp329_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp184_, "NoServer") == 0) { + } else if (strcmp (_tmp329_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp184_, "Timeout") == 0) { + } else if (strcmp (_tmp329_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp184_, "NoNetwork") == 0) { + } else if (strcmp (_tmp329_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp184_, "AddressInUse") == 0) { + } else if (strcmp (_tmp329_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp184_, "Disconnected") == 0) { + } else if (strcmp (_tmp329_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp184_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp329_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp184_, "FileNotFound") == 0) { + } else if (strcmp (_tmp329_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp184_, "FileExists") == 0) { + } else if (strcmp (_tmp329_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp184_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp329_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp184_, "TimedOut") == 0) { + } else if (strcmp (_tmp329_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp184_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp329_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp184_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp329_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp184_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp329_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp184_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp329_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp184_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp329_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp184_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp329_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp184_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp329_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp184_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp329_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp184_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp329_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp184_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp329_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp184_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp329_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp184_, "RemoteException") == 0) { + } else if (strcmp (_tmp329_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -5242,9 +5370,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp183_); + dbus_message_iter_get_basic (&_iter, &_tmp328_); dbus_message_iter_next (&_iter); - _result = _tmp183_; + _result = _tmp328_; dbus_message_unref (_reply); return _result; } @@ -5255,20 +5383,20 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp185_; - dbus_uint32_t _tmp186_; + dbus_uint32_t _tmp330_; + dbus_uint32_t _tmp331_; DVBOverlapType _result; - dbus_int32_t _tmp187_; + dbus_int32_t _tmp332_; if (((DVBIDBusRecorderDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp185_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp185_); - _tmp186_ = channel_sid; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp186_); + _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); @@ -5278,78 +5406,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp188_; + const char* _tmp333_; _edomain = DBUS_GERROR; - _tmp188_ = _dbus_error.name + 27; - if (strcmp (_tmp188_, "Failed") == 0) { + _tmp333_ = _dbus_error.name + 27; + if (strcmp (_tmp333_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp188_, "NoMemory") == 0) { + } else if (strcmp (_tmp333_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp188_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp333_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp188_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp333_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp188_, "NoReply") == 0) { + } else if (strcmp (_tmp333_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp188_, "IOError") == 0) { + } else if (strcmp (_tmp333_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp188_, "BadAddress") == 0) { + } else if (strcmp (_tmp333_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp188_, "NotSupported") == 0) { + } else if (strcmp (_tmp333_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp188_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp333_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp188_, "AccessDenied") == 0) { + } else if (strcmp (_tmp333_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp188_, "AuthFailed") == 0) { + } else if (strcmp (_tmp333_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp188_, "NoServer") == 0) { + } else if (strcmp (_tmp333_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp188_, "Timeout") == 0) { + } else if (strcmp (_tmp333_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp188_, "NoNetwork") == 0) { + } else if (strcmp (_tmp333_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp188_, "AddressInUse") == 0) { + } else if (strcmp (_tmp333_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp188_, "Disconnected") == 0) { + } else if (strcmp (_tmp333_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp188_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp333_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp188_, "FileNotFound") == 0) { + } else if (strcmp (_tmp333_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp188_, "FileExists") == 0) { + } else if (strcmp (_tmp333_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp188_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp333_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp188_, "TimedOut") == 0) { + } else if (strcmp (_tmp333_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp188_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp333_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp188_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp333_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp188_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp333_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp188_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp333_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp188_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp333_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp188_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp333_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp188_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp333_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp188_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp333_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp188_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp333_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp188_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp333_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp188_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp333_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp188_, "RemoteException") == 0) { + } else if (strcmp (_tmp333_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return 0; } @@ -5359,9 +5487,9 @@ return 0; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp187_); + dbus_message_iter_get_basic (&_iter, &_tmp332_); dbus_message_iter_next (&_iter); - _result = _tmp187_; + _result = _tmp332_; dbus_message_unref (_reply); return _result; } @@ -5396,25 +5524,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); -} - - 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, guint32 arg_1, guint arg_2, gpointer data2); diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusRecordingsStore.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusRecordingsStore.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusRecordingsStore.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusRecordingsStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusRecordingsStore.c generated by valac, the Vala compiler +/* IDBusRecordingsStore.c generated by valac 0.9.7, the Vala compiler * generated from IDBusRecordingsStore.vala, do not modify */ /* @@ -40,9 +40,9 @@ typedef struct _DVBIDBusRecordingsStore DVBIDBusRecordingsStore; typedef struct _DVBIDBusRecordingsStoreIface DVBIDBusRecordingsStoreIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; typedef struct _DVBIDBusRecordingsStoreDBusProxy DVBIDBusRecordingsStoreDBusProxy; typedef DBusGProxyClass DVBIDBusRecordingsStoreDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBRecordingInfo { guint32 id; @@ -68,23 +68,24 @@ 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; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_recording_info_get_type (void); +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); +DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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, char** location, GError** error); gboolean dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, char** name, GError** error); @@ -95,6 +96,8 @@ gboolean dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error); gboolean dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, char** name, GError** error); gboolean dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, 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_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); @@ -111,8 +114,7 @@ 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); -DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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 { @@ -131,8 +133,6 @@ static void dvb_id_bus_recordings_store_dbus_proxy_dvb_id_bus_recordings_store__interface_init (DVBIDBusRecordingsStoreIface* iface); static void dvb_id_bus_recordings_store_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_recordings_store_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -173,64 +173,140 @@ GType dvb_recording_info_get_type (void) { - static GType dvb_recording_info_type_id = 0; - if (dvb_recording_info_type_id == 0) { + static volatile gsize dvb_recording_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_recording_info_type_id__volatile)) { + GType dvb_recording_info_type_id; dvb_recording_info_type_id = g_boxed_type_register_static ("DVBRecordingInfo", (GBoxedCopyFunc) dvb_recording_info_dup, (GBoxedFreeFunc) dvb_recording_info_free); + g_once_init_leave (&dvb_recording_info_type_id__volatile, dvb_recording_info_type_id); } - return dvb_recording_info_type_id; + return dvb_recording_info_type_id__volatile; } +/** + * @returns: A list of ids for all recordings + */ guint32* dvb_id_bus_recordings_store_GetRecordings (DVBIDBusRecordingsStore* self, int* result_length1, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetRecordings (self, result_length1, error); } +/** + * @rec_id: The id of the recording + * @location: The location of the recording on the filesystem + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetLocation (DVBIDBusRecordingsStore* self, guint32 rec_id, char** location, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetLocation (self, rec_id, location, error); } +/** + * @rec_id: The id of the recording + * @name: The name of the recording (e.g. the name of + * a TV show) + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetName (DVBIDBusRecordingsStore* self, guint32 rec_id, char** name, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetName (self, rec_id, name, error); } +/** + * @rec_id: The id of the recording + * @description: A short text describing the recorded item + * (e.g. the description from EPG) + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetDescription (DVBIDBusRecordingsStore* self, guint32 rec_id, char** description, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetDescription (self, rec_id, description, error); } +/** + * @rec_id: The id of the recording + * @start_time: The starting time of the recording + * @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) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetStartTime (self, rec_id, start_time, start_time_length1, error); } +/** + * @rec_id: The id of the recording + * @timestamp: Start time as UNIX timestamp + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetStartTimestamp (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* timestamp, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetStartTimestamp (self, rec_id, timestamp, error); } +/** + * @rec_id: The id of the recording + * @length: The length of the recording in seconds + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetLength (DVBIDBusRecordingsStore* self, guint32 rec_id, gint64* length, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetLength (self, rec_id, length, error); } +/** + * @rec_id: The id of the recording + * @returns: TRUE on success, FALSE otherwises + * + * Delete the recording. This deletes all files in the directory + * created by the Recorder + */ gboolean dvb_id_bus_recordings_store_Delete (DVBIDBusRecordingsStore* self, guint32 rec_id, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->Delete (self, rec_id, error); } +/** + * @rec_id: The id of the recording + * @name: The channel's name or an empty string if + * rec_id doesn't exist + * @returns: TRUE on success + */ gboolean dvb_id_bus_recordings_store_GetChannelName (DVBIDBusRecordingsStore* self, guint32 rec_id, char** name, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetChannelName (self, rec_id, name, error); } +/** + * @rec_id: The id of the recording + * @returns: TRUE on success + * + * This method can be used to retrieve all informations + * about a particular recording at once + */ gboolean dvb_id_bus_recordings_store_GetAllInformations (DVBIDBusRecordingsStore* self, guint32 rec_id, DVBRecordingInfo* infos, GError** error) { return DVB_ID_BUS_RECORDINGS_STORE_GET_INTERFACE (self)->GetAllInformations (self, rec_id, infos, 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_recordings_store_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -1830,6 +1906,9 @@ 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)); } @@ -1837,14 +1916,16 @@ GType dvb_id_bus_recordings_store_get_type (void) { - static GType dvb_id_bus_recordings_store_type_id = 0; - if (dvb_id_bus_recordings_store_type_id == 0) { + 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; + return dvb_id_bus_recordings_store_type_id__volatile; } @@ -1877,20 +1958,20 @@ 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 _tmp43_; + dbus_uint32_t _tmp334_; guint type = 0U; - dbus_uint32_t _tmp44_; + 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, &_tmp43_); + dbus_message_iter_get_basic (&iter, &_tmp334_); dbus_message_iter_next (&iter); - rec_id = _tmp43_; - dbus_message_iter_get_basic (&iter, &_tmp44_); + rec_id = _tmp334_; + dbus_message_iter_get_basic (&iter, &_tmp335_); dbus_message_iter_next (&iter); - type = _tmp44_; + type = _tmp335_; g_signal_emit_by_name (self, "changed", rec_id, type); } @@ -1936,13 +2017,13 @@ DBusMessageIter _iter; guint32* _result; int _result_length1; - guint32* _tmp45_; - int _tmp45__length; - int _tmp45__size; - int _tmp45__length1; - DBusMessageIter _tmp46_; + guint32* _tmp336_; + int _tmp336__length; + int _tmp336__size; + int _tmp336__length1; + DBusMessageIter _tmp337_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1956,78 +2037,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp48_; + const char* _tmp339_; _edomain = DBUS_GERROR; - _tmp48_ = _dbus_error.name + 27; - if (strcmp (_tmp48_, "Failed") == 0) { + _tmp339_ = _dbus_error.name + 27; + if (strcmp (_tmp339_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp48_, "NoMemory") == 0) { + } else if (strcmp (_tmp339_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp48_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp339_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp48_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp339_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp48_, "NoReply") == 0) { + } else if (strcmp (_tmp339_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp48_, "IOError") == 0) { + } else if (strcmp (_tmp339_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp48_, "BadAddress") == 0) { + } else if (strcmp (_tmp339_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp48_, "NotSupported") == 0) { + } else if (strcmp (_tmp339_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp48_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp339_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp48_, "AccessDenied") == 0) { + } else if (strcmp (_tmp339_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp48_, "AuthFailed") == 0) { + } else if (strcmp (_tmp339_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp48_, "NoServer") == 0) { + } else if (strcmp (_tmp339_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp48_, "Timeout") == 0) { + } else if (strcmp (_tmp339_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp48_, "NoNetwork") == 0) { + } else if (strcmp (_tmp339_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp48_, "AddressInUse") == 0) { + } else if (strcmp (_tmp339_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp48_, "Disconnected") == 0) { + } else if (strcmp (_tmp339_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp48_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp339_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp48_, "FileNotFound") == 0) { + } else if (strcmp (_tmp339_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp48_, "FileExists") == 0) { + } else if (strcmp (_tmp339_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp48_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp339_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp48_, "TimedOut") == 0) { + } else if (strcmp (_tmp339_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp48_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp339_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp48_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp339_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp48_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp339_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp48_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp339_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp48_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp339_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp48_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp339_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp48_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp339_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp48_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp339_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp48_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp339_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp48_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp339_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp48_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp339_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp48_, "RemoteException") == 0) { + } else if (strcmp (_tmp339_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2038,24 +2119,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp45_ = g_new (guint32, 5); - _tmp45__length = 0; - _tmp45__size = 4; - _tmp45__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp46_); - for (; dbus_message_iter_get_arg_type (&_tmp46_); _tmp45__length1++) { - dbus_uint32_t _tmp47_; - if (_tmp45__size == _tmp45__length) { - _tmp45__size = 2 * _tmp45__size; - _tmp45_ = g_renew (guint32, _tmp45_, _tmp45__size + 1); - } - dbus_message_iter_get_basic (&_tmp46_, &_tmp47_); - dbus_message_iter_next (&_tmp46_); - _tmp45_[_tmp45__length++] = _tmp47_; + _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 = _tmp45__length1; + _result_length1 = _tmp336__length1; dbus_message_iter_next (&_iter); - _result = _tmp45_; + _result = _tmp336_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2067,19 +2148,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp49_; + dbus_uint32_t _tmp340_; char* _location; - const char* _tmp50_; + const char* _tmp341_; gboolean _result; - dbus_bool_t _tmp51_; + dbus_bool_t _tmp342_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp49_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp49_); + _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); @@ -2089,78 +2170,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp52_; + const char* _tmp343_; _edomain = DBUS_GERROR; - _tmp52_ = _dbus_error.name + 27; - if (strcmp (_tmp52_, "Failed") == 0) { + _tmp343_ = _dbus_error.name + 27; + if (strcmp (_tmp343_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp52_, "NoMemory") == 0) { + } else if (strcmp (_tmp343_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp52_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp343_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp52_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp343_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp52_, "NoReply") == 0) { + } else if (strcmp (_tmp343_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp52_, "IOError") == 0) { + } else if (strcmp (_tmp343_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp52_, "BadAddress") == 0) { + } else if (strcmp (_tmp343_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp52_, "NotSupported") == 0) { + } else if (strcmp (_tmp343_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp52_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp343_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp52_, "AccessDenied") == 0) { + } else if (strcmp (_tmp343_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp52_, "AuthFailed") == 0) { + } else if (strcmp (_tmp343_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp52_, "NoServer") == 0) { + } else if (strcmp (_tmp343_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp52_, "Timeout") == 0) { + } else if (strcmp (_tmp343_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp52_, "NoNetwork") == 0) { + } else if (strcmp (_tmp343_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp52_, "AddressInUse") == 0) { + } else if (strcmp (_tmp343_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp52_, "Disconnected") == 0) { + } else if (strcmp (_tmp343_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp52_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp343_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp52_, "FileNotFound") == 0) { + } else if (strcmp (_tmp343_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp52_, "FileExists") == 0) { + } else if (strcmp (_tmp343_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp52_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp343_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp52_, "TimedOut") == 0) { + } else if (strcmp (_tmp343_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp52_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp343_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp52_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp343_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp52_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp343_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp52_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp343_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp52_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp343_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp52_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp343_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp52_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp343_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp52_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp343_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp52_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp343_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp52_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp343_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp52_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp343_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp52_, "RemoteException") == 0) { + } else if (strcmp (_tmp343_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2170,13 +2251,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp50_); + dbus_message_iter_get_basic (&_iter, &_tmp341_); dbus_message_iter_next (&_iter); - _location = g_strdup (_tmp50_); + _location = g_strdup (_tmp341_); *location = _location; - dbus_message_iter_get_basic (&_iter, &_tmp51_); + dbus_message_iter_get_basic (&_iter, &_tmp342_); dbus_message_iter_next (&_iter); - _result = _tmp51_; + _result = _tmp342_; dbus_message_unref (_reply); return _result; } @@ -2187,19 +2268,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp53_; + dbus_uint32_t _tmp344_; char* _name; - const char* _tmp54_; + const char* _tmp345_; gboolean _result; - dbus_bool_t _tmp55_; + dbus_bool_t _tmp346_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp53_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp53_); + _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); @@ -2209,78 +2290,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp56_; + const char* _tmp347_; _edomain = DBUS_GERROR; - _tmp56_ = _dbus_error.name + 27; - if (strcmp (_tmp56_, "Failed") == 0) { + _tmp347_ = _dbus_error.name + 27; + if (strcmp (_tmp347_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp56_, "NoMemory") == 0) { + } else if (strcmp (_tmp347_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp56_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp347_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp56_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp347_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp56_, "NoReply") == 0) { + } else if (strcmp (_tmp347_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp56_, "IOError") == 0) { + } else if (strcmp (_tmp347_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp56_, "BadAddress") == 0) { + } else if (strcmp (_tmp347_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp56_, "NotSupported") == 0) { + } else if (strcmp (_tmp347_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp56_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp347_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp56_, "AccessDenied") == 0) { + } else if (strcmp (_tmp347_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp56_, "AuthFailed") == 0) { + } else if (strcmp (_tmp347_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp56_, "NoServer") == 0) { + } else if (strcmp (_tmp347_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp56_, "Timeout") == 0) { + } else if (strcmp (_tmp347_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp56_, "NoNetwork") == 0) { + } else if (strcmp (_tmp347_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp56_, "AddressInUse") == 0) { + } else if (strcmp (_tmp347_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp56_, "Disconnected") == 0) { + } else if (strcmp (_tmp347_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp56_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp347_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp56_, "FileNotFound") == 0) { + } else if (strcmp (_tmp347_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp56_, "FileExists") == 0) { + } else if (strcmp (_tmp347_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp56_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp347_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp56_, "TimedOut") == 0) { + } else if (strcmp (_tmp347_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp56_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp347_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp56_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp347_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp56_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp347_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp56_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp347_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp56_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp347_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp56_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp347_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp56_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp347_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp56_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp347_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp56_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp347_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp56_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp347_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp56_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp347_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp56_, "RemoteException") == 0) { + } else if (strcmp (_tmp347_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2290,13 +2371,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp54_); + dbus_message_iter_get_basic (&_iter, &_tmp345_); dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp54_); + _name = g_strdup (_tmp345_); *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp55_); + dbus_message_iter_get_basic (&_iter, &_tmp346_); dbus_message_iter_next (&_iter); - _result = _tmp55_; + _result = _tmp346_; dbus_message_unref (_reply); return _result; } @@ -2307,19 +2388,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp57_; + dbus_uint32_t _tmp348_; char* _description; - const char* _tmp58_; + const char* _tmp349_; gboolean _result; - dbus_bool_t _tmp59_; + dbus_bool_t _tmp350_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp57_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp57_); + _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); @@ -2329,78 +2410,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp60_; + const char* _tmp351_; _edomain = DBUS_GERROR; - _tmp60_ = _dbus_error.name + 27; - if (strcmp (_tmp60_, "Failed") == 0) { + _tmp351_ = _dbus_error.name + 27; + if (strcmp (_tmp351_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp60_, "NoMemory") == 0) { + } else if (strcmp (_tmp351_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp60_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp351_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp60_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp351_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp60_, "NoReply") == 0) { + } else if (strcmp (_tmp351_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp60_, "IOError") == 0) { + } else if (strcmp (_tmp351_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp60_, "BadAddress") == 0) { + } else if (strcmp (_tmp351_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp60_, "NotSupported") == 0) { + } else if (strcmp (_tmp351_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp60_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp351_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp60_, "AccessDenied") == 0) { + } else if (strcmp (_tmp351_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp60_, "AuthFailed") == 0) { + } else if (strcmp (_tmp351_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp60_, "NoServer") == 0) { + } else if (strcmp (_tmp351_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp60_, "Timeout") == 0) { + } else if (strcmp (_tmp351_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp60_, "NoNetwork") == 0) { + } else if (strcmp (_tmp351_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp60_, "AddressInUse") == 0) { + } else if (strcmp (_tmp351_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp60_, "Disconnected") == 0) { + } else if (strcmp (_tmp351_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp60_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp351_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp60_, "FileNotFound") == 0) { + } else if (strcmp (_tmp351_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp60_, "FileExists") == 0) { + } else if (strcmp (_tmp351_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp60_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp351_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp60_, "TimedOut") == 0) { + } else if (strcmp (_tmp351_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp60_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp351_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp60_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp351_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp60_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp351_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp60_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp351_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp60_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp351_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp60_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp351_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp60_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp351_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp60_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp351_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp60_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp351_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp60_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp351_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp60_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp351_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp60_, "RemoteException") == 0) { + } else if (strcmp (_tmp351_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2410,13 +2491,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp58_); + dbus_message_iter_get_basic (&_iter, &_tmp349_); dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp58_); + _description = g_strdup (_tmp349_); *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp59_); + dbus_message_iter_get_basic (&_iter, &_tmp350_); dbus_message_iter_next (&_iter); - _result = _tmp59_; + _result = _tmp350_; dbus_message_unref (_reply); return _result; } @@ -2427,24 +2508,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp61_; + dbus_uint32_t _tmp352_; guint* _start_time; int _start_time_length1; - guint* _tmp62_; - int _tmp62__length; - int _tmp62__size; - int _tmp62__length1; - DBusMessageIter _tmp63_; + guint* _tmp353_; + int _tmp353__length; + int _tmp353__size; + int _tmp353__length1; + DBusMessageIter _tmp354_; gboolean _result; - dbus_bool_t _tmp65_; + dbus_bool_t _tmp356_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp61_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp61_); + _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); @@ -2454,78 +2535,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp66_; + const char* _tmp357_; _edomain = DBUS_GERROR; - _tmp66_ = _dbus_error.name + 27; - if (strcmp (_tmp66_, "Failed") == 0) { + _tmp357_ = _dbus_error.name + 27; + if (strcmp (_tmp357_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp66_, "NoMemory") == 0) { + } else if (strcmp (_tmp357_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp66_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp357_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp66_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp357_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp66_, "NoReply") == 0) { + } else if (strcmp (_tmp357_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp66_, "IOError") == 0) { + } else if (strcmp (_tmp357_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp66_, "BadAddress") == 0) { + } else if (strcmp (_tmp357_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp66_, "NotSupported") == 0) { + } else if (strcmp (_tmp357_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp66_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp357_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp66_, "AccessDenied") == 0) { + } else if (strcmp (_tmp357_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp66_, "AuthFailed") == 0) { + } else if (strcmp (_tmp357_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp66_, "NoServer") == 0) { + } else if (strcmp (_tmp357_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp66_, "Timeout") == 0) { + } else if (strcmp (_tmp357_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp66_, "NoNetwork") == 0) { + } else if (strcmp (_tmp357_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp66_, "AddressInUse") == 0) { + } else if (strcmp (_tmp357_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp66_, "Disconnected") == 0) { + } else if (strcmp (_tmp357_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp66_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp357_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp66_, "FileNotFound") == 0) { + } else if (strcmp (_tmp357_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp66_, "FileExists") == 0) { + } else if (strcmp (_tmp357_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp66_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp357_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp66_, "TimedOut") == 0) { + } else if (strcmp (_tmp357_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp66_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp357_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp66_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp357_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp66_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp357_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp66_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp357_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp66_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp357_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp66_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp357_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp66_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp357_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp66_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp357_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp66_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp357_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp66_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp357_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp66_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp357_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp66_, "RemoteException") == 0) { + } else if (strcmp (_tmp357_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2536,29 +2617,29 @@ } dbus_message_iter_init (_reply, &_iter); _start_time_length1 = 0; - _tmp62_ = g_new (guint, 5); - _tmp62__length = 0; - _tmp62__size = 4; - _tmp62__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp63_); - for (; dbus_message_iter_get_arg_type (&_tmp63_); _tmp62__length1++) { - dbus_uint32_t _tmp64_; - if (_tmp62__size == _tmp62__length) { - _tmp62__size = 2 * _tmp62__size; - _tmp62_ = g_renew (guint, _tmp62_, _tmp62__size + 1); - } - dbus_message_iter_get_basic (&_tmp63_, &_tmp64_); - dbus_message_iter_next (&_tmp63_); - _tmp62_[_tmp62__length++] = _tmp64_; + _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 = _tmp62__length1; + _start_time_length1 = _tmp353__length1; dbus_message_iter_next (&_iter); - _start_time = _tmp62_; + _start_time = _tmp353_; *start_time = _start_time; *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp65_); + dbus_message_iter_get_basic (&_iter, &_tmp356_); dbus_message_iter_next (&_iter); - _result = _tmp65_; + _result = _tmp356_; dbus_message_unref (_reply); return _result; } @@ -2569,19 +2650,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp67_; + dbus_uint32_t _tmp358_; gint64 _timestamp; - dbus_int64_t _tmp68_; + dbus_int64_t _tmp359_; gboolean _result; - dbus_bool_t _tmp69_; + dbus_bool_t _tmp360_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp67_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp67_); + _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); @@ -2591,78 +2672,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp70_; + const char* _tmp361_; _edomain = DBUS_GERROR; - _tmp70_ = _dbus_error.name + 27; - if (strcmp (_tmp70_, "Failed") == 0) { + _tmp361_ = _dbus_error.name + 27; + if (strcmp (_tmp361_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp70_, "NoMemory") == 0) { + } else if (strcmp (_tmp361_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp70_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp361_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp70_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp361_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp70_, "NoReply") == 0) { + } else if (strcmp (_tmp361_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp70_, "IOError") == 0) { + } else if (strcmp (_tmp361_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp70_, "BadAddress") == 0) { + } else if (strcmp (_tmp361_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp70_, "NotSupported") == 0) { + } else if (strcmp (_tmp361_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp70_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp361_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp70_, "AccessDenied") == 0) { + } else if (strcmp (_tmp361_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp70_, "AuthFailed") == 0) { + } else if (strcmp (_tmp361_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp70_, "NoServer") == 0) { + } else if (strcmp (_tmp361_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp70_, "Timeout") == 0) { + } else if (strcmp (_tmp361_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp70_, "NoNetwork") == 0) { + } else if (strcmp (_tmp361_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp70_, "AddressInUse") == 0) { + } else if (strcmp (_tmp361_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp70_, "Disconnected") == 0) { + } else if (strcmp (_tmp361_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp70_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp361_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp70_, "FileNotFound") == 0) { + } else if (strcmp (_tmp361_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp70_, "FileExists") == 0) { + } else if (strcmp (_tmp361_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp70_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp361_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp70_, "TimedOut") == 0) { + } else if (strcmp (_tmp361_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp70_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp361_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp70_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp361_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp70_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp361_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp70_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp361_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp70_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp361_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp70_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp361_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp70_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp361_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp70_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp361_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp70_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp361_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp70_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp361_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp70_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp361_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp70_, "RemoteException") == 0) { + } else if (strcmp (_tmp361_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2672,13 +2753,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp68_); + dbus_message_iter_get_basic (&_iter, &_tmp359_); dbus_message_iter_next (&_iter); - _timestamp = _tmp68_; + _timestamp = _tmp359_; *timestamp = _timestamp; - dbus_message_iter_get_basic (&_iter, &_tmp69_); + dbus_message_iter_get_basic (&_iter, &_tmp360_); dbus_message_iter_next (&_iter); - _result = _tmp69_; + _result = _tmp360_; dbus_message_unref (_reply); return _result; } @@ -2689,19 +2770,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp71_; + dbus_uint32_t _tmp362_; gint64 _length; - dbus_int64_t _tmp72_; + dbus_int64_t _tmp363_; gboolean _result; - dbus_bool_t _tmp73_; + dbus_bool_t _tmp364_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp71_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp71_); + _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); @@ -2711,78 +2792,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp74_; + const char* _tmp365_; _edomain = DBUS_GERROR; - _tmp74_ = _dbus_error.name + 27; - if (strcmp (_tmp74_, "Failed") == 0) { + _tmp365_ = _dbus_error.name + 27; + if (strcmp (_tmp365_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp74_, "NoMemory") == 0) { + } else if (strcmp (_tmp365_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp74_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp365_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp74_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp365_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp74_, "NoReply") == 0) { + } else if (strcmp (_tmp365_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp74_, "IOError") == 0) { + } else if (strcmp (_tmp365_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp74_, "BadAddress") == 0) { + } else if (strcmp (_tmp365_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp74_, "NotSupported") == 0) { + } else if (strcmp (_tmp365_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp74_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp365_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp74_, "AccessDenied") == 0) { + } else if (strcmp (_tmp365_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp74_, "AuthFailed") == 0) { + } else if (strcmp (_tmp365_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp74_, "NoServer") == 0) { + } else if (strcmp (_tmp365_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp74_, "Timeout") == 0) { + } else if (strcmp (_tmp365_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp74_, "NoNetwork") == 0) { + } else if (strcmp (_tmp365_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp74_, "AddressInUse") == 0) { + } else if (strcmp (_tmp365_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp74_, "Disconnected") == 0) { + } else if (strcmp (_tmp365_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp74_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp365_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp74_, "FileNotFound") == 0) { + } else if (strcmp (_tmp365_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp74_, "FileExists") == 0) { + } else if (strcmp (_tmp365_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp74_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp365_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp74_, "TimedOut") == 0) { + } else if (strcmp (_tmp365_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp74_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp365_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp74_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp365_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp74_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp365_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp74_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp365_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp74_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp365_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp74_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp365_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp74_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp365_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp74_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp365_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp74_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp365_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp74_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp365_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp74_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp365_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp74_, "RemoteException") == 0) { + } else if (strcmp (_tmp365_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2792,13 +2873,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp72_); + dbus_message_iter_get_basic (&_iter, &_tmp363_); dbus_message_iter_next (&_iter); - _length = _tmp72_; + _length = _tmp363_; *length = _length; - dbus_message_iter_get_basic (&_iter, &_tmp73_); + dbus_message_iter_get_basic (&_iter, &_tmp364_); dbus_message_iter_next (&_iter); - _result = _tmp73_; + _result = _tmp364_; dbus_message_unref (_reply); return _result; } @@ -2809,17 +2890,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp75_; + dbus_uint32_t _tmp366_; gboolean _result; - dbus_bool_t _tmp76_; + dbus_bool_t _tmp367_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp75_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp75_); + _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); @@ -2829,78 +2910,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp77_; + const char* _tmp368_; _edomain = DBUS_GERROR; - _tmp77_ = _dbus_error.name + 27; - if (strcmp (_tmp77_, "Failed") == 0) { + _tmp368_ = _dbus_error.name + 27; + if (strcmp (_tmp368_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp77_, "NoMemory") == 0) { + } else if (strcmp (_tmp368_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp77_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp368_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp77_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp368_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp77_, "NoReply") == 0) { + } else if (strcmp (_tmp368_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp77_, "IOError") == 0) { + } else if (strcmp (_tmp368_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp77_, "BadAddress") == 0) { + } else if (strcmp (_tmp368_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp77_, "NotSupported") == 0) { + } else if (strcmp (_tmp368_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp77_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp368_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp77_, "AccessDenied") == 0) { + } else if (strcmp (_tmp368_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp77_, "AuthFailed") == 0) { + } else if (strcmp (_tmp368_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp77_, "NoServer") == 0) { + } else if (strcmp (_tmp368_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp77_, "Timeout") == 0) { + } else if (strcmp (_tmp368_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp77_, "NoNetwork") == 0) { + } else if (strcmp (_tmp368_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp77_, "AddressInUse") == 0) { + } else if (strcmp (_tmp368_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp77_, "Disconnected") == 0) { + } else if (strcmp (_tmp368_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp77_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp368_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp77_, "FileNotFound") == 0) { + } else if (strcmp (_tmp368_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp77_, "FileExists") == 0) { + } else if (strcmp (_tmp368_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp77_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp368_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp77_, "TimedOut") == 0) { + } else if (strcmp (_tmp368_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp77_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp368_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp77_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp368_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp77_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp368_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp368_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp368_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp77_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp368_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp77_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp368_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp77_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp368_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp77_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp368_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp77_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp368_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp77_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp368_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp77_, "RemoteException") == 0) { + } else if (strcmp (_tmp368_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2910,9 +2991,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp76_); + dbus_message_iter_get_basic (&_iter, &_tmp367_); dbus_message_iter_next (&_iter); - _result = _tmp76_; + _result = _tmp367_; dbus_message_unref (_reply); return _result; } @@ -2923,19 +3004,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp78_; + dbus_uint32_t _tmp369_; char* _name; - const char* _tmp79_; + const char* _tmp370_; gboolean _result; - dbus_bool_t _tmp80_; + dbus_bool_t _tmp371_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp78_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp78_); + _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); @@ -2945,78 +3026,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp81_; + const char* _tmp372_; _edomain = DBUS_GERROR; - _tmp81_ = _dbus_error.name + 27; - if (strcmp (_tmp81_, "Failed") == 0) { + _tmp372_ = _dbus_error.name + 27; + if (strcmp (_tmp372_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp81_, "NoMemory") == 0) { + } else if (strcmp (_tmp372_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp81_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp372_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp81_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp372_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp81_, "NoReply") == 0) { + } else if (strcmp (_tmp372_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp81_, "IOError") == 0) { + } else if (strcmp (_tmp372_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp81_, "BadAddress") == 0) { + } else if (strcmp (_tmp372_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp81_, "NotSupported") == 0) { + } else if (strcmp (_tmp372_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp81_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp372_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp81_, "AccessDenied") == 0) { + } else if (strcmp (_tmp372_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp81_, "AuthFailed") == 0) { + } else if (strcmp (_tmp372_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp81_, "NoServer") == 0) { + } else if (strcmp (_tmp372_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp81_, "Timeout") == 0) { + } else if (strcmp (_tmp372_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp81_, "NoNetwork") == 0) { + } else if (strcmp (_tmp372_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp81_, "AddressInUse") == 0) { + } else if (strcmp (_tmp372_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp81_, "Disconnected") == 0) { + } else if (strcmp (_tmp372_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp81_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp372_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp81_, "FileNotFound") == 0) { + } else if (strcmp (_tmp372_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp81_, "FileExists") == 0) { + } else if (strcmp (_tmp372_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp81_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp372_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp81_, "TimedOut") == 0) { + } else if (strcmp (_tmp372_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp81_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp372_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp81_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp372_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp81_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp372_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp81_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp372_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp81_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp372_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp81_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp372_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp81_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp372_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp81_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp372_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp81_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp372_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp81_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp372_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp81_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp372_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp81_, "RemoteException") == 0) { + } else if (strcmp (_tmp372_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3026,13 +3107,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp79_); + dbus_message_iter_get_basic (&_iter, &_tmp370_); dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp79_); + _name = g_strdup (_tmp370_); *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp80_); + dbus_message_iter_get_basic (&_iter, &_tmp371_); dbus_message_iter_next (&_iter); - _result = _tmp80_; + _result = _tmp371_; dbus_message_unref (_reply); return _result; } @@ -3043,27 +3124,27 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp82_; + dbus_uint32_t _tmp373_; DVBRecordingInfo _infos; - DVBRecordingInfo _tmp83_; - DBusMessageIter _tmp84_; - dbus_uint32_t _tmp85_; - const char* _tmp86_; - const char* _tmp87_; - dbus_int64_t _tmp88_; - dbus_int64_t _tmp89_; - const char* _tmp90_; - const char* _tmp91_; + 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 _tmp92_; + dbus_bool_t _tmp383_; if (((DVBIDBusRecordingsStoreDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp82_ = rec_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp82_); + _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); @@ -3073,78 +3154,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp93_; + const char* _tmp384_; _edomain = DBUS_GERROR; - _tmp93_ = _dbus_error.name + 27; - if (strcmp (_tmp93_, "Failed") == 0) { + _tmp384_ = _dbus_error.name + 27; + if (strcmp (_tmp384_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp93_, "NoMemory") == 0) { + } else if (strcmp (_tmp384_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp93_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp384_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp93_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp384_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp93_, "NoReply") == 0) { + } else if (strcmp (_tmp384_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp93_, "IOError") == 0) { + } else if (strcmp (_tmp384_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp93_, "BadAddress") == 0) { + } else if (strcmp (_tmp384_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp93_, "NotSupported") == 0) { + } else if (strcmp (_tmp384_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp93_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp384_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp93_, "AccessDenied") == 0) { + } else if (strcmp (_tmp384_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp93_, "AuthFailed") == 0) { + } else if (strcmp (_tmp384_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp93_, "NoServer") == 0) { + } else if (strcmp (_tmp384_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp93_, "Timeout") == 0) { + } else if (strcmp (_tmp384_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp93_, "NoNetwork") == 0) { + } else if (strcmp (_tmp384_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp93_, "AddressInUse") == 0) { + } else if (strcmp (_tmp384_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp93_, "Disconnected") == 0) { + } else if (strcmp (_tmp384_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp93_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp384_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp93_, "FileNotFound") == 0) { + } else if (strcmp (_tmp384_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp93_, "FileExists") == 0) { + } else if (strcmp (_tmp384_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp93_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp384_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp93_, "TimedOut") == 0) { + } else if (strcmp (_tmp384_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp93_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp384_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp93_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp384_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp93_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp384_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp93_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp384_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp93_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp384_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp93_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp384_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp93_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp384_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp93_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp384_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp93_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp384_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp93_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp384_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp93_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp384_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp93_, "RemoteException") == 0) { + } else if (strcmp (_tmp384_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3154,34 +3235,34 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp84_); - dbus_message_iter_get_basic (&_tmp84_, &_tmp85_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.id = _tmp85_; - dbus_message_iter_get_basic (&_tmp84_, &_tmp86_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.name = g_strdup (_tmp86_); - dbus_message_iter_get_basic (&_tmp84_, &_tmp87_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.description = g_strdup (_tmp87_); - dbus_message_iter_get_basic (&_tmp84_, &_tmp88_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.length = _tmp88_; - dbus_message_iter_get_basic (&_tmp84_, &_tmp89_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.start_timestamp = _tmp89_; - dbus_message_iter_get_basic (&_tmp84_, &_tmp90_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.channel = g_strdup (_tmp90_); - dbus_message_iter_get_basic (&_tmp84_, &_tmp91_); - dbus_message_iter_next (&_tmp84_); - _tmp83_.location = g_strdup (_tmp91_); + 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 = _tmp83_; + _infos = _tmp374_; *infos = _infos; - dbus_message_iter_get_basic (&_iter, &_tmp92_); + dbus_message_iter_get_basic (&_iter, &_tmp383_); dbus_message_iter_next (&_iter); - _result = _tmp92_; + _result = _tmp383_; dbus_message_unref (_reply); return _result; } @@ -3209,25 +3290,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); -} - - 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, guint32 arg_1, guint arg_2, gpointer data2); diff -Nru gnome-dvb-daemon-0.1.16/src/dbus/IDBusSchedule.c gnome-dvb-daemon-0.1.21/src/dbus/IDBusSchedule.c --- gnome-dvb-daemon-0.1.16/src/dbus/IDBusSchedule.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/dbus/IDBusSchedule.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* IDBusSchedule.c generated by valac, the Vala compiler +/* IDBusSchedule.c generated by valac 0.9.7, the Vala compiler * generated from IDBusSchedule.vala, do not modify */ /* @@ -40,9 +40,9 @@ typedef struct _DVBIDBusSchedule DVBIDBusSchedule; typedef struct _DVBIDBusScheduleIface DVBIDBusScheduleIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; typedef struct _DVBIDBusScheduleDBusProxy DVBIDBusScheduleDBusProxy; typedef DBusGProxyClass DVBIDBusScheduleDBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBEventInfo { guint32 id; @@ -69,23 +69,24 @@ 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; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType dvb_event_info_get_type (void); +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); +DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); gboolean dvb_id_bus_schedule_GetInformations (DVBIDBusSchedule* self, guint32 event_id, DVBEventInfo* event_info, GError** error); @@ -99,6 +100,8 @@ 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); @@ -118,8 +121,7 @@ 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); -DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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 @@ -140,8 +142,6 @@ static void dvb_id_bus_schedule_dbus_proxy_dvb_id_bus_schedule__interface_init (DVBIDBusScheduleIface* iface); static void dvb_id_bus_schedule_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_schedule_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -177,11 +177,13 @@ GType dvb_event_info_get_type (void) { - static GType dvb_event_info_type_id = 0; - if (dvb_event_info_type_id == 0) { + static volatile gsize dvb_event_info_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_info_type_id__volatile)) { + GType dvb_event_info_type_id; dvb_event_info_type_id = g_boxed_type_register_static ("DVBEventInfo", (GBoxedCopyFunc) dvb_event_info_dup, (GBoxedFreeFunc) dvb_event_info_free); + g_once_init_leave (&dvb_event_info_type_id__volatile, dvb_event_info_type_id); } - return dvb_event_info_type_id; + return dvb_event_info_type_id__volatile; } @@ -200,11 +202,17 @@ } +/** + * @returns: ID of currently running event + */ guint32 dvb_id_bus_schedule_NowPlaying (DVBIDBusSchedule* self, GError** error) { return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->NowPlaying (self, error); } +/** + * @returnns: ID of event that follows the given event + */ guint32 dvb_id_bus_schedule_Next (DVBIDBusSchedule* self, guint32 event_id, GError** error) { return DVB_ID_BUS_SCHEDULE_GET_INTERFACE (self)->Next (self, event_id, error); } @@ -250,6 +258,25 @@ } +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_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -2284,14 +2311,16 @@ GType dvb_id_bus_schedule_get_type (void) { - static GType dvb_id_bus_schedule_type_id = 0; - if (dvb_id_bus_schedule_type_id == 0) { + 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; + return dvb_id_bus_schedule_type_id__volatile; } @@ -2359,13 +2388,13 @@ DBusMessageIter _iter; guint32* _result; int _result_length1; - guint32* _tmp52_; - int _tmp52__length; - int _tmp52__size; - int _tmp52__length1; - DBusMessageIter _tmp53_; + guint32* _tmp385_; + int _tmp385__length; + int _tmp385__size; + int _tmp385__length1; + DBusMessageIter _tmp386_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2379,78 +2408,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp55_; + const char* _tmp388_; _edomain = DBUS_GERROR; - _tmp55_ = _dbus_error.name + 27; - if (strcmp (_tmp55_, "Failed") == 0) { + _tmp388_ = _dbus_error.name + 27; + if (strcmp (_tmp388_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp55_, "NoMemory") == 0) { + } else if (strcmp (_tmp388_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp55_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp388_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp55_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp388_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp55_, "NoReply") == 0) { + } else if (strcmp (_tmp388_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp55_, "IOError") == 0) { + } else if (strcmp (_tmp388_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp55_, "BadAddress") == 0) { + } else if (strcmp (_tmp388_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp55_, "NotSupported") == 0) { + } else if (strcmp (_tmp388_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp55_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp388_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp55_, "AccessDenied") == 0) { + } else if (strcmp (_tmp388_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp55_, "AuthFailed") == 0) { + } else if (strcmp (_tmp388_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp55_, "NoServer") == 0) { + } else if (strcmp (_tmp388_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp55_, "Timeout") == 0) { + } else if (strcmp (_tmp388_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp55_, "NoNetwork") == 0) { + } else if (strcmp (_tmp388_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp55_, "AddressInUse") == 0) { + } else if (strcmp (_tmp388_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp55_, "Disconnected") == 0) { + } else if (strcmp (_tmp388_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp55_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp388_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp55_, "FileNotFound") == 0) { + } else if (strcmp (_tmp388_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp55_, "FileExists") == 0) { + } else if (strcmp (_tmp388_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp55_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp388_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp55_, "TimedOut") == 0) { + } else if (strcmp (_tmp388_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp55_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp388_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp55_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp388_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp55_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp388_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp388_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp55_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp388_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp55_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp388_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp55_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp388_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp55_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp388_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp55_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp388_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp55_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp388_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp55_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp388_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp55_, "RemoteException") == 0) { + } else if (strcmp (_tmp388_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2461,24 +2490,24 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp52_ = g_new (guint32, 5); - _tmp52__length = 0; - _tmp52__size = 4; - _tmp52__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp53_); - for (; dbus_message_iter_get_arg_type (&_tmp53_); _tmp52__length1++) { - dbus_uint32_t _tmp54_; - if (_tmp52__size == _tmp52__length) { - _tmp52__size = 2 * _tmp52__size; - _tmp52_ = g_renew (guint32, _tmp52_, _tmp52__size + 1); - } - dbus_message_iter_get_basic (&_tmp53_, &_tmp54_); - dbus_message_iter_next (&_tmp53_); - _tmp52_[_tmp52__length++] = _tmp54_; + _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 = _tmp52__length1; + _result_length1 = _tmp385__length1; dbus_message_iter_next (&_iter); - _result = _tmp52_; + _result = _tmp385_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2492,13 +2521,13 @@ DBusMessageIter _iter; DVBEventInfo* _result; int _result_length1; - DVBEventInfo* _tmp56_; - int _tmp56__length; - int _tmp56__size; - int _tmp56__length1; - DBusMessageIter _tmp57_; + DVBEventInfo* _tmp389_; + int _tmp389__length; + int _tmp389__size; + int _tmp389__length1; + DBusMessageIter _tmp390_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2512,78 +2541,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp65_; + const char* _tmp398_; _edomain = DBUS_GERROR; - _tmp65_ = _dbus_error.name + 27; - if (strcmp (_tmp65_, "Failed") == 0) { + _tmp398_ = _dbus_error.name + 27; + if (strcmp (_tmp398_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp65_, "NoMemory") == 0) { + } else if (strcmp (_tmp398_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp65_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp398_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp65_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp398_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp65_, "NoReply") == 0) { + } else if (strcmp (_tmp398_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp65_, "IOError") == 0) { + } else if (strcmp (_tmp398_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp65_, "BadAddress") == 0) { + } else if (strcmp (_tmp398_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp65_, "NotSupported") == 0) { + } else if (strcmp (_tmp398_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp65_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp398_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp65_, "AccessDenied") == 0) { + } else if (strcmp (_tmp398_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp65_, "AuthFailed") == 0) { + } else if (strcmp (_tmp398_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp65_, "NoServer") == 0) { + } else if (strcmp (_tmp398_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp65_, "Timeout") == 0) { + } else if (strcmp (_tmp398_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp65_, "NoNetwork") == 0) { + } else if (strcmp (_tmp398_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp65_, "AddressInUse") == 0) { + } else if (strcmp (_tmp398_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp65_, "Disconnected") == 0) { + } else if (strcmp (_tmp398_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp65_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp398_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp65_, "FileNotFound") == 0) { + } else if (strcmp (_tmp398_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp65_, "FileExists") == 0) { + } else if (strcmp (_tmp398_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp65_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp398_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp65_, "TimedOut") == 0) { + } else if (strcmp (_tmp398_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp65_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp398_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp65_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp398_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp65_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp398_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp65_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp398_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp65_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp398_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp65_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp398_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp65_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp398_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp65_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp398_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp65_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp398_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp65_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp398_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp65_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp398_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp65_, "RemoteException") == 0) { + } else if (strcmp (_tmp398_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return NULL; } @@ -2594,45 +2623,45 @@ } dbus_message_iter_init (_reply, &_iter); _result_length1 = 0; - _tmp56_ = g_new (DVBEventInfo, 5); - _tmp56__length = 0; - _tmp56__size = 4; - _tmp56__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp57_); - for (; dbus_message_iter_get_arg_type (&_tmp57_); _tmp56__length1++) { - DVBEventInfo _tmp58_; - DBusMessageIter _tmp59_; - dbus_uint32_t _tmp60_; - dbus_uint32_t _tmp61_; - const char* _tmp62_; - dbus_uint32_t _tmp63_; - const char* _tmp64_; - if (_tmp56__size == _tmp56__length) { - _tmp56__size = 2 * _tmp56__size; - _tmp56_ = g_renew (DVBEventInfo, _tmp56_, _tmp56__size + 1); - } - dbus_message_iter_recurse (&_tmp57_, &_tmp59_); - dbus_message_iter_get_basic (&_tmp59_, &_tmp60_); - dbus_message_iter_next (&_tmp59_); - _tmp58_.id = _tmp60_; - dbus_message_iter_get_basic (&_tmp59_, &_tmp61_); - dbus_message_iter_next (&_tmp59_); - _tmp58_.next = _tmp61_; - dbus_message_iter_get_basic (&_tmp59_, &_tmp62_); - dbus_message_iter_next (&_tmp59_); - _tmp58_.name = g_strdup (_tmp62_); - dbus_message_iter_get_basic (&_tmp59_, &_tmp63_); - dbus_message_iter_next (&_tmp59_); - _tmp58_.duration = _tmp63_; - dbus_message_iter_get_basic (&_tmp59_, &_tmp64_); - dbus_message_iter_next (&_tmp59_); - _tmp58_.short_description = g_strdup (_tmp64_); - dbus_message_iter_next (&_tmp57_); - _tmp56_[_tmp56__length++] = _tmp58_; + _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 = _tmp56__length1; + _result_length1 = _tmp389__length1; dbus_message_iter_next (&_iter); - _result = _tmp56_; + _result = _tmp389_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -2644,25 +2673,25 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp66_; + dbus_uint32_t _tmp399_; DVBEventInfo _event_info; - DVBEventInfo _tmp67_; - DBusMessageIter _tmp68_; - dbus_uint32_t _tmp69_; - dbus_uint32_t _tmp70_; - const char* _tmp71_; - dbus_uint32_t _tmp72_; - const char* _tmp73_; + 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 _tmp74_; + dbus_bool_t _tmp407_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp66_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp66_); + _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); @@ -2672,78 +2701,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp75_; + const char* _tmp408_; _edomain = DBUS_GERROR; - _tmp75_ = _dbus_error.name + 27; - if (strcmp (_tmp75_, "Failed") == 0) { + _tmp408_ = _dbus_error.name + 27; + if (strcmp (_tmp408_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp75_, "NoMemory") == 0) { + } else if (strcmp (_tmp408_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp75_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp408_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp75_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp408_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp75_, "NoReply") == 0) { + } else if (strcmp (_tmp408_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp75_, "IOError") == 0) { + } else if (strcmp (_tmp408_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp75_, "BadAddress") == 0) { + } else if (strcmp (_tmp408_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp75_, "NotSupported") == 0) { + } else if (strcmp (_tmp408_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp75_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp408_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp75_, "AccessDenied") == 0) { + } else if (strcmp (_tmp408_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp75_, "AuthFailed") == 0) { + } else if (strcmp (_tmp408_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp75_, "NoServer") == 0) { + } else if (strcmp (_tmp408_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp75_, "Timeout") == 0) { + } else if (strcmp (_tmp408_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp75_, "NoNetwork") == 0) { + } else if (strcmp (_tmp408_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp75_, "AddressInUse") == 0) { + } else if (strcmp (_tmp408_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp75_, "Disconnected") == 0) { + } else if (strcmp (_tmp408_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp75_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp408_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp75_, "FileNotFound") == 0) { + } else if (strcmp (_tmp408_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp75_, "FileExists") == 0) { + } else if (strcmp (_tmp408_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp75_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp408_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp75_, "TimedOut") == 0) { + } else if (strcmp (_tmp408_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp75_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp408_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp75_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp408_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp75_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp408_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp75_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp408_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp75_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp408_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp75_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp408_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp75_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp408_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp75_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp408_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp75_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp408_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp75_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp408_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp75_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp408_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp75_, "RemoteException") == 0) { + } else if (strcmp (_tmp408_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2753,28 +2782,28 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_recurse (&_iter, &_tmp68_); - dbus_message_iter_get_basic (&_tmp68_, &_tmp69_); - dbus_message_iter_next (&_tmp68_); - _tmp67_.id = _tmp69_; - dbus_message_iter_get_basic (&_tmp68_, &_tmp70_); - dbus_message_iter_next (&_tmp68_); - _tmp67_.next = _tmp70_; - dbus_message_iter_get_basic (&_tmp68_, &_tmp71_); - dbus_message_iter_next (&_tmp68_); - _tmp67_.name = g_strdup (_tmp71_); - dbus_message_iter_get_basic (&_tmp68_, &_tmp72_); - dbus_message_iter_next (&_tmp68_); - _tmp67_.duration = _tmp72_; - dbus_message_iter_get_basic (&_tmp68_, &_tmp73_); - dbus_message_iter_next (&_tmp68_); - _tmp67_.short_description = g_strdup (_tmp73_); + 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 = _tmp67_; + _event_info = _tmp400_; *event_info = _event_info; - dbus_message_iter_get_basic (&_iter, &_tmp74_); + dbus_message_iter_get_basic (&_iter, &_tmp407_); dbus_message_iter_next (&_iter); - _result = _tmp74_; + _result = _tmp407_; dbus_message_unref (_reply); return _result; } @@ -2786,9 +2815,9 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; guint32 _result; - dbus_uint32_t _tmp76_; + dbus_uint32_t _tmp409_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -2802,78 +2831,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp77_; + const char* _tmp410_; _edomain = DBUS_GERROR; - _tmp77_ = _dbus_error.name + 27; - if (strcmp (_tmp77_, "Failed") == 0) { + _tmp410_ = _dbus_error.name + 27; + if (strcmp (_tmp410_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp77_, "NoMemory") == 0) { + } else if (strcmp (_tmp410_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp77_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp410_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp77_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp410_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp77_, "NoReply") == 0) { + } else if (strcmp (_tmp410_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp77_, "IOError") == 0) { + } else if (strcmp (_tmp410_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp77_, "BadAddress") == 0) { + } else if (strcmp (_tmp410_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp77_, "NotSupported") == 0) { + } else if (strcmp (_tmp410_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp77_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp410_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp77_, "AccessDenied") == 0) { + } else if (strcmp (_tmp410_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp77_, "AuthFailed") == 0) { + } else if (strcmp (_tmp410_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp77_, "NoServer") == 0) { + } else if (strcmp (_tmp410_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp77_, "Timeout") == 0) { + } else if (strcmp (_tmp410_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp77_, "NoNetwork") == 0) { + } else if (strcmp (_tmp410_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp77_, "AddressInUse") == 0) { + } else if (strcmp (_tmp410_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp77_, "Disconnected") == 0) { + } else if (strcmp (_tmp410_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp77_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp410_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp77_, "FileNotFound") == 0) { + } else if (strcmp (_tmp410_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp77_, "FileExists") == 0) { + } else if (strcmp (_tmp410_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp77_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp410_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp77_, "TimedOut") == 0) { + } else if (strcmp (_tmp410_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp77_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp410_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp77_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp410_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp77_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp410_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp410_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp77_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp410_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp77_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp410_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp77_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp410_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp77_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp410_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp77_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp410_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp77_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp410_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp77_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp410_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp77_, "RemoteException") == 0) { + } else if (strcmp (_tmp410_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return 0U; } @@ -2883,9 +2912,9 @@ return 0U; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp76_); + dbus_message_iter_get_basic (&_iter, &_tmp409_); dbus_message_iter_next (&_iter); - _result = _tmp76_; + _result = _tmp409_; dbus_message_unref (_reply); return _result; } @@ -2896,17 +2925,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp78_; + dbus_uint32_t _tmp411_; guint32 _result; - dbus_uint32_t _tmp79_; + dbus_uint32_t _tmp412_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp78_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp78_); + _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); @@ -2916,78 +2945,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp80_; + const char* _tmp413_; _edomain = DBUS_GERROR; - _tmp80_ = _dbus_error.name + 27; - if (strcmp (_tmp80_, "Failed") == 0) { + _tmp413_ = _dbus_error.name + 27; + if (strcmp (_tmp413_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp80_, "NoMemory") == 0) { + } else if (strcmp (_tmp413_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp80_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp413_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp80_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp413_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp80_, "NoReply") == 0) { + } else if (strcmp (_tmp413_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp80_, "IOError") == 0) { + } else if (strcmp (_tmp413_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp80_, "BadAddress") == 0) { + } else if (strcmp (_tmp413_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp80_, "NotSupported") == 0) { + } else if (strcmp (_tmp413_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp80_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp413_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp80_, "AccessDenied") == 0) { + } else if (strcmp (_tmp413_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp80_, "AuthFailed") == 0) { + } else if (strcmp (_tmp413_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp80_, "NoServer") == 0) { + } else if (strcmp (_tmp413_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp80_, "Timeout") == 0) { + } else if (strcmp (_tmp413_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp80_, "NoNetwork") == 0) { + } else if (strcmp (_tmp413_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp80_, "AddressInUse") == 0) { + } else if (strcmp (_tmp413_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp80_, "Disconnected") == 0) { + } else if (strcmp (_tmp413_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp80_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp413_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp80_, "FileNotFound") == 0) { + } else if (strcmp (_tmp413_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp80_, "FileExists") == 0) { + } else if (strcmp (_tmp413_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp80_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp413_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp80_, "TimedOut") == 0) { + } else if (strcmp (_tmp413_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp80_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp413_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp80_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp413_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp80_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp413_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp413_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp80_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp413_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp80_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp413_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp80_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp413_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp80_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp413_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp80_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp413_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp80_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp413_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp80_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp413_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp80_, "RemoteException") == 0) { + } else if (strcmp (_tmp413_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return 0U; } @@ -2997,9 +3026,9 @@ return 0U; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp79_); + dbus_message_iter_get_basic (&_iter, &_tmp412_); dbus_message_iter_next (&_iter); - _result = _tmp79_; + _result = _tmp412_; dbus_message_unref (_reply); return _result; } @@ -3010,19 +3039,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp81_; + dbus_uint32_t _tmp414_; char* _name; - const char* _tmp82_; + const char* _tmp415_; gboolean _result; - dbus_bool_t _tmp83_; + dbus_bool_t _tmp416_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp81_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp81_); + _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); @@ -3032,78 +3061,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp84_; + const char* _tmp417_; _edomain = DBUS_GERROR; - _tmp84_ = _dbus_error.name + 27; - if (strcmp (_tmp84_, "Failed") == 0) { + _tmp417_ = _dbus_error.name + 27; + if (strcmp (_tmp417_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp84_, "NoMemory") == 0) { + } else if (strcmp (_tmp417_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp84_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp417_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp84_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp417_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp84_, "NoReply") == 0) { + } else if (strcmp (_tmp417_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp84_, "IOError") == 0) { + } else if (strcmp (_tmp417_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp84_, "BadAddress") == 0) { + } else if (strcmp (_tmp417_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp84_, "NotSupported") == 0) { + } else if (strcmp (_tmp417_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp84_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp417_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp84_, "AccessDenied") == 0) { + } else if (strcmp (_tmp417_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp84_, "AuthFailed") == 0) { + } else if (strcmp (_tmp417_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp84_, "NoServer") == 0) { + } else if (strcmp (_tmp417_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp84_, "Timeout") == 0) { + } else if (strcmp (_tmp417_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp84_, "NoNetwork") == 0) { + } else if (strcmp (_tmp417_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp84_, "AddressInUse") == 0) { + } else if (strcmp (_tmp417_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp84_, "Disconnected") == 0) { + } else if (strcmp (_tmp417_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp84_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp417_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp84_, "FileNotFound") == 0) { + } else if (strcmp (_tmp417_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp84_, "FileExists") == 0) { + } else if (strcmp (_tmp417_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp84_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp417_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp84_, "TimedOut") == 0) { + } else if (strcmp (_tmp417_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp84_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp417_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp84_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp417_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp84_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp417_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp84_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp417_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp84_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp417_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp84_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp417_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp84_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp417_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp84_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp417_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp84_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp417_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp84_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp417_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp84_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp417_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp84_, "RemoteException") == 0) { + } else if (strcmp (_tmp417_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3113,13 +3142,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp82_); + dbus_message_iter_get_basic (&_iter, &_tmp415_); dbus_message_iter_next (&_iter); - _name = g_strdup (_tmp82_); + _name = g_strdup (_tmp415_); *name = _name; - dbus_message_iter_get_basic (&_iter, &_tmp83_); + dbus_message_iter_get_basic (&_iter, &_tmp416_); dbus_message_iter_next (&_iter); - _result = _tmp83_; + _result = _tmp416_; dbus_message_unref (_reply); return _result; } @@ -3130,19 +3159,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp85_; + dbus_uint32_t _tmp418_; char* _description; - const char* _tmp86_; + const char* _tmp419_; gboolean _result; - dbus_bool_t _tmp87_; + dbus_bool_t _tmp420_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp85_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp85_); + _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); @@ -3152,78 +3181,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp88_; + const char* _tmp421_; _edomain = DBUS_GERROR; - _tmp88_ = _dbus_error.name + 27; - if (strcmp (_tmp88_, "Failed") == 0) { + _tmp421_ = _dbus_error.name + 27; + if (strcmp (_tmp421_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp88_, "NoMemory") == 0) { + } else if (strcmp (_tmp421_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp88_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp421_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp88_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp421_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp88_, "NoReply") == 0) { + } else if (strcmp (_tmp421_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp88_, "IOError") == 0) { + } else if (strcmp (_tmp421_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp88_, "BadAddress") == 0) { + } else if (strcmp (_tmp421_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp88_, "NotSupported") == 0) { + } else if (strcmp (_tmp421_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp88_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp421_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp88_, "AccessDenied") == 0) { + } else if (strcmp (_tmp421_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp88_, "AuthFailed") == 0) { + } else if (strcmp (_tmp421_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp88_, "NoServer") == 0) { + } else if (strcmp (_tmp421_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp88_, "Timeout") == 0) { + } else if (strcmp (_tmp421_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp88_, "NoNetwork") == 0) { + } else if (strcmp (_tmp421_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp88_, "AddressInUse") == 0) { + } else if (strcmp (_tmp421_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp88_, "Disconnected") == 0) { + } else if (strcmp (_tmp421_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp88_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp421_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp88_, "FileNotFound") == 0) { + } else if (strcmp (_tmp421_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp88_, "FileExists") == 0) { + } else if (strcmp (_tmp421_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp88_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp421_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp88_, "TimedOut") == 0) { + } else if (strcmp (_tmp421_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp88_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp421_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp88_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp421_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp88_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp421_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp88_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp421_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp88_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp421_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp88_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp421_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp88_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp421_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp88_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp421_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp88_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp421_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp88_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp421_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp88_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp421_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp88_, "RemoteException") == 0) { + } else if (strcmp (_tmp421_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3233,13 +3262,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp86_); + dbus_message_iter_get_basic (&_iter, &_tmp419_); dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp86_); + _description = g_strdup (_tmp419_); *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp87_); + dbus_message_iter_get_basic (&_iter, &_tmp420_); dbus_message_iter_next (&_iter); - _result = _tmp87_; + _result = _tmp420_; dbus_message_unref (_reply); return _result; } @@ -3250,19 +3279,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp89_; + dbus_uint32_t _tmp422_; char* _description; - const char* _tmp90_; + const char* _tmp423_; gboolean _result; - dbus_bool_t _tmp91_; + dbus_bool_t _tmp424_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp89_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp89_); + _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); @@ -3272,78 +3301,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp92_; + const char* _tmp425_; _edomain = DBUS_GERROR; - _tmp92_ = _dbus_error.name + 27; - if (strcmp (_tmp92_, "Failed") == 0) { + _tmp425_ = _dbus_error.name + 27; + if (strcmp (_tmp425_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp92_, "NoMemory") == 0) { + } else if (strcmp (_tmp425_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp92_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp425_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp92_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp425_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp92_, "NoReply") == 0) { + } else if (strcmp (_tmp425_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp92_, "IOError") == 0) { + } else if (strcmp (_tmp425_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp92_, "BadAddress") == 0) { + } else if (strcmp (_tmp425_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp92_, "NotSupported") == 0) { + } else if (strcmp (_tmp425_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp92_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp425_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp92_, "AccessDenied") == 0) { + } else if (strcmp (_tmp425_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp92_, "AuthFailed") == 0) { + } else if (strcmp (_tmp425_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp92_, "NoServer") == 0) { + } else if (strcmp (_tmp425_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp92_, "Timeout") == 0) { + } else if (strcmp (_tmp425_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp92_, "NoNetwork") == 0) { + } else if (strcmp (_tmp425_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp92_, "AddressInUse") == 0) { + } else if (strcmp (_tmp425_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp92_, "Disconnected") == 0) { + } else if (strcmp (_tmp425_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp92_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp425_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp92_, "FileNotFound") == 0) { + } else if (strcmp (_tmp425_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp92_, "FileExists") == 0) { + } else if (strcmp (_tmp425_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp92_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp425_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp92_, "TimedOut") == 0) { + } else if (strcmp (_tmp425_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp92_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp425_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp92_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp425_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp92_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp425_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp92_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp425_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp92_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp425_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp92_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp425_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp92_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp425_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp92_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp425_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp92_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp425_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp92_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp425_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp92_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp425_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp92_, "RemoteException") == 0) { + } else if (strcmp (_tmp425_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3353,13 +3382,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp90_); + dbus_message_iter_get_basic (&_iter, &_tmp423_); dbus_message_iter_next (&_iter); - _description = g_strdup (_tmp90_); + _description = g_strdup (_tmp423_); *description = _description; - dbus_message_iter_get_basic (&_iter, &_tmp91_); + dbus_message_iter_get_basic (&_iter, &_tmp424_); dbus_message_iter_next (&_iter); - _result = _tmp91_; + _result = _tmp424_; dbus_message_unref (_reply); return _result; } @@ -3370,19 +3399,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp93_; + dbus_uint32_t _tmp426_; guint _duration; - dbus_uint32_t _tmp94_; + dbus_uint32_t _tmp427_; gboolean _result; - dbus_bool_t _tmp95_; + dbus_bool_t _tmp428_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp93_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp93_); + _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); @@ -3392,78 +3421,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp96_; + const char* _tmp429_; _edomain = DBUS_GERROR; - _tmp96_ = _dbus_error.name + 27; - if (strcmp (_tmp96_, "Failed") == 0) { + _tmp429_ = _dbus_error.name + 27; + if (strcmp (_tmp429_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp96_, "NoMemory") == 0) { + } else if (strcmp (_tmp429_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp96_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp429_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp96_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp429_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp96_, "NoReply") == 0) { + } else if (strcmp (_tmp429_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp96_, "IOError") == 0) { + } else if (strcmp (_tmp429_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp96_, "BadAddress") == 0) { + } else if (strcmp (_tmp429_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp96_, "NotSupported") == 0) { + } else if (strcmp (_tmp429_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp96_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp429_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp96_, "AccessDenied") == 0) { + } else if (strcmp (_tmp429_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp96_, "AuthFailed") == 0) { + } else if (strcmp (_tmp429_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp96_, "NoServer") == 0) { + } else if (strcmp (_tmp429_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp96_, "Timeout") == 0) { + } else if (strcmp (_tmp429_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp96_, "NoNetwork") == 0) { + } else if (strcmp (_tmp429_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp96_, "AddressInUse") == 0) { + } else if (strcmp (_tmp429_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp96_, "Disconnected") == 0) { + } else if (strcmp (_tmp429_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp96_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp429_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp96_, "FileNotFound") == 0) { + } else if (strcmp (_tmp429_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp96_, "FileExists") == 0) { + } else if (strcmp (_tmp429_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp96_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp429_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp96_, "TimedOut") == 0) { + } else if (strcmp (_tmp429_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp96_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp429_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp96_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp429_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp96_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp429_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp96_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp429_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp96_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp429_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp96_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp429_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp96_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp429_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp96_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp429_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp96_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp429_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp96_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp429_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp96_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp429_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp96_, "RemoteException") == 0) { + } else if (strcmp (_tmp429_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3473,13 +3502,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp94_); + dbus_message_iter_get_basic (&_iter, &_tmp427_); dbus_message_iter_next (&_iter); - _duration = _tmp94_; + _duration = _tmp427_; *duration = _duration; - dbus_message_iter_get_basic (&_iter, &_tmp95_); + dbus_message_iter_get_basic (&_iter, &_tmp428_); dbus_message_iter_next (&_iter); - _result = _tmp95_; + _result = _tmp428_; dbus_message_unref (_reply); return _result; } @@ -3490,24 +3519,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp97_; + dbus_uint32_t _tmp430_; guint* _start_time; int _start_time_length1; - guint* _tmp98_; - int _tmp98__length; - int _tmp98__size; - int _tmp98__length1; - DBusMessageIter _tmp99_; + guint* _tmp431_; + int _tmp431__length; + int _tmp431__size; + int _tmp431__length1; + DBusMessageIter _tmp432_; gboolean _result; - dbus_bool_t _tmp101_; + dbus_bool_t _tmp434_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp97_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp97_); + _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); @@ -3517,78 +3546,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp102_; + const char* _tmp435_; _edomain = DBUS_GERROR; - _tmp102_ = _dbus_error.name + 27; - if (strcmp (_tmp102_, "Failed") == 0) { + _tmp435_ = _dbus_error.name + 27; + if (strcmp (_tmp435_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp102_, "NoMemory") == 0) { + } else if (strcmp (_tmp435_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp102_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp435_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp102_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp435_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp102_, "NoReply") == 0) { + } else if (strcmp (_tmp435_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp102_, "IOError") == 0) { + } else if (strcmp (_tmp435_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp102_, "BadAddress") == 0) { + } else if (strcmp (_tmp435_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp102_, "NotSupported") == 0) { + } else if (strcmp (_tmp435_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp102_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp435_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp102_, "AccessDenied") == 0) { + } else if (strcmp (_tmp435_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp102_, "AuthFailed") == 0) { + } else if (strcmp (_tmp435_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp102_, "NoServer") == 0) { + } else if (strcmp (_tmp435_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp102_, "Timeout") == 0) { + } else if (strcmp (_tmp435_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp102_, "NoNetwork") == 0) { + } else if (strcmp (_tmp435_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp102_, "AddressInUse") == 0) { + } else if (strcmp (_tmp435_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp102_, "Disconnected") == 0) { + } else if (strcmp (_tmp435_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp102_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp435_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp102_, "FileNotFound") == 0) { + } else if (strcmp (_tmp435_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp102_, "FileExists") == 0) { + } else if (strcmp (_tmp435_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp102_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp435_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp102_, "TimedOut") == 0) { + } else if (strcmp (_tmp435_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp102_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp435_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp102_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp435_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp102_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp435_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp102_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp435_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp102_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp435_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp102_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp435_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp102_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp435_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp102_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp435_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp102_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp435_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp102_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp435_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp102_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp435_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp102_, "RemoteException") == 0) { + } else if (strcmp (_tmp435_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3599,29 +3628,29 @@ } dbus_message_iter_init (_reply, &_iter); _start_time_length1 = 0; - _tmp98_ = g_new (guint, 5); - _tmp98__length = 0; - _tmp98__size = 4; - _tmp98__length1 = 0; - dbus_message_iter_recurse (&_iter, &_tmp99_); - for (; dbus_message_iter_get_arg_type (&_tmp99_); _tmp98__length1++) { - dbus_uint32_t _tmp100_; - if (_tmp98__size == _tmp98__length) { - _tmp98__size = 2 * _tmp98__size; - _tmp98_ = g_renew (guint, _tmp98_, _tmp98__size + 1); - } - dbus_message_iter_get_basic (&_tmp99_, &_tmp100_); - dbus_message_iter_next (&_tmp99_); - _tmp98_[_tmp98__length++] = _tmp100_; + _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 = _tmp98__length1; + _start_time_length1 = _tmp431__length1; dbus_message_iter_next (&_iter); - _start_time = _tmp98_; + _start_time = _tmp431_; *start_time = _start_time; *start_time_length1 = _start_time_length1; - dbus_message_iter_get_basic (&_iter, &_tmp101_); + dbus_message_iter_get_basic (&_iter, &_tmp434_); dbus_message_iter_next (&_iter); - _result = _tmp101_; + _result = _tmp434_; dbus_message_unref (_reply); return _result; } @@ -3632,19 +3661,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp103_; + dbus_uint32_t _tmp436_; gint64 _timestamp; - dbus_int64_t _tmp104_; + dbus_int64_t _tmp437_; gboolean _result; - dbus_bool_t _tmp105_; + dbus_bool_t _tmp438_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp103_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp103_); + _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); @@ -3654,78 +3683,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp106_; + const char* _tmp439_; _edomain = DBUS_GERROR; - _tmp106_ = _dbus_error.name + 27; - if (strcmp (_tmp106_, "Failed") == 0) { + _tmp439_ = _dbus_error.name + 27; + if (strcmp (_tmp439_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp106_, "NoMemory") == 0) { + } else if (strcmp (_tmp439_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp106_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp439_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp106_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp439_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp106_, "NoReply") == 0) { + } else if (strcmp (_tmp439_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp106_, "IOError") == 0) { + } else if (strcmp (_tmp439_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp106_, "BadAddress") == 0) { + } else if (strcmp (_tmp439_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp106_, "NotSupported") == 0) { + } else if (strcmp (_tmp439_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp106_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp439_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp106_, "AccessDenied") == 0) { + } else if (strcmp (_tmp439_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp106_, "AuthFailed") == 0) { + } else if (strcmp (_tmp439_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp106_, "NoServer") == 0) { + } else if (strcmp (_tmp439_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp106_, "Timeout") == 0) { + } else if (strcmp (_tmp439_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp106_, "NoNetwork") == 0) { + } else if (strcmp (_tmp439_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp106_, "AddressInUse") == 0) { + } else if (strcmp (_tmp439_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp106_, "Disconnected") == 0) { + } else if (strcmp (_tmp439_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp106_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp439_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp106_, "FileNotFound") == 0) { + } else if (strcmp (_tmp439_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp106_, "FileExists") == 0) { + } else if (strcmp (_tmp439_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp106_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp439_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp106_, "TimedOut") == 0) { + } else if (strcmp (_tmp439_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp106_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp439_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp106_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp439_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp106_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp439_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp106_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp439_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp106_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp439_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp106_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp439_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp106_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp439_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp106_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp439_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp106_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp439_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp106_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp439_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp106_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp439_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp106_, "RemoteException") == 0) { + } else if (strcmp (_tmp439_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3735,13 +3764,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp104_); + dbus_message_iter_get_basic (&_iter, &_tmp437_); dbus_message_iter_next (&_iter); - _timestamp = _tmp104_; + _timestamp = _tmp437_; *timestamp = _timestamp; - dbus_message_iter_get_basic (&_iter, &_tmp105_); + dbus_message_iter_get_basic (&_iter, &_tmp438_); dbus_message_iter_next (&_iter); - _result = _tmp105_; + _result = _tmp438_; dbus_message_unref (_reply); return _result; } @@ -3752,19 +3781,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp107_; + dbus_uint32_t _tmp440_; gboolean _running; - dbus_bool_t _tmp108_; + dbus_bool_t _tmp441_; gboolean _result; - dbus_bool_t _tmp109_; + dbus_bool_t _tmp442_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp107_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp107_); + _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); @@ -3774,78 +3803,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp110_; + const char* _tmp443_; _edomain = DBUS_GERROR; - _tmp110_ = _dbus_error.name + 27; - if (strcmp (_tmp110_, "Failed") == 0) { + _tmp443_ = _dbus_error.name + 27; + if (strcmp (_tmp443_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp110_, "NoMemory") == 0) { + } else if (strcmp (_tmp443_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp110_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp443_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp110_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp443_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp110_, "NoReply") == 0) { + } else if (strcmp (_tmp443_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp110_, "IOError") == 0) { + } else if (strcmp (_tmp443_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp110_, "BadAddress") == 0) { + } else if (strcmp (_tmp443_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp110_, "NotSupported") == 0) { + } else if (strcmp (_tmp443_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp110_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp443_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp110_, "AccessDenied") == 0) { + } else if (strcmp (_tmp443_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp110_, "AuthFailed") == 0) { + } else if (strcmp (_tmp443_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp110_, "NoServer") == 0) { + } else if (strcmp (_tmp443_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp110_, "Timeout") == 0) { + } else if (strcmp (_tmp443_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp110_, "NoNetwork") == 0) { + } else if (strcmp (_tmp443_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp110_, "AddressInUse") == 0) { + } else if (strcmp (_tmp443_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp110_, "Disconnected") == 0) { + } else if (strcmp (_tmp443_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp110_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp443_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp110_, "FileNotFound") == 0) { + } else if (strcmp (_tmp443_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp110_, "FileExists") == 0) { + } else if (strcmp (_tmp443_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp110_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp443_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp110_, "TimedOut") == 0) { + } else if (strcmp (_tmp443_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp110_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp443_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp110_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp443_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp110_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp443_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp110_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp443_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp110_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp443_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp110_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp443_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp110_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp443_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp110_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp443_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp110_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp443_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp110_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp443_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp110_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp443_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp110_, "RemoteException") == 0) { + } else if (strcmp (_tmp443_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3855,13 +3884,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp108_); + dbus_message_iter_get_basic (&_iter, &_tmp441_); dbus_message_iter_next (&_iter); - _running = _tmp108_; + _running = _tmp441_; *running = _running; - dbus_message_iter_get_basic (&_iter, &_tmp109_); + dbus_message_iter_get_basic (&_iter, &_tmp442_); dbus_message_iter_next (&_iter); - _result = _tmp109_; + _result = _tmp442_; dbus_message_unref (_reply); return _result; } @@ -3872,19 +3901,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp111_; + dbus_uint32_t _tmp444_; gboolean _scrambled; - dbus_bool_t _tmp112_; + dbus_bool_t _tmp445_; gboolean _result; - dbus_bool_t _tmp113_; + dbus_bool_t _tmp446_; if (((DVBIDBusScheduleDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "IsScrambled"); dbus_message_iter_init_append (_message, &_iter); - _tmp111_ = event_id; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp111_); + _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); @@ -3894,78 +3923,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp114_; + const char* _tmp447_; _edomain = DBUS_GERROR; - _tmp114_ = _dbus_error.name + 27; - if (strcmp (_tmp114_, "Failed") == 0) { + _tmp447_ = _dbus_error.name + 27; + if (strcmp (_tmp447_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp114_, "NoMemory") == 0) { + } else if (strcmp (_tmp447_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp114_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp447_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp114_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp447_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp114_, "NoReply") == 0) { + } else if (strcmp (_tmp447_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp114_, "IOError") == 0) { + } else if (strcmp (_tmp447_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp114_, "BadAddress") == 0) { + } else if (strcmp (_tmp447_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp114_, "NotSupported") == 0) { + } else if (strcmp (_tmp447_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp114_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp447_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp114_, "AccessDenied") == 0) { + } else if (strcmp (_tmp447_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp114_, "AuthFailed") == 0) { + } else if (strcmp (_tmp447_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp114_, "NoServer") == 0) { + } else if (strcmp (_tmp447_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp114_, "Timeout") == 0) { + } else if (strcmp (_tmp447_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp114_, "NoNetwork") == 0) { + } else if (strcmp (_tmp447_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp114_, "AddressInUse") == 0) { + } else if (strcmp (_tmp447_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp114_, "Disconnected") == 0) { + } else if (strcmp (_tmp447_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp114_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp447_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp114_, "FileNotFound") == 0) { + } else if (strcmp (_tmp447_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp114_, "FileExists") == 0) { + } else if (strcmp (_tmp447_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp114_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp447_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp114_, "TimedOut") == 0) { + } else if (strcmp (_tmp447_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp114_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp447_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp114_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp447_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp114_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp447_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp114_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp447_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp114_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp447_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp114_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp447_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp114_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp447_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp114_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp447_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp114_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp447_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp114_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp447_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp114_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp447_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp114_, "RemoteException") == 0) { + } else if (strcmp (_tmp447_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -3975,13 +4004,13 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp112_); + dbus_message_iter_get_basic (&_iter, &_tmp445_); dbus_message_iter_next (&_iter); - _scrambled = _tmp112_; + _scrambled = _tmp445_; *scrambled = _scrambled; - dbus_message_iter_get_basic (&_iter, &_tmp113_); + dbus_message_iter_get_basic (&_iter, &_tmp446_); dbus_message_iter_next (&_iter); - _result = _tmp113_; + _result = _tmp446_; dbus_message_unref (_reply); return _result; } @@ -4012,24 +4041,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/Device.c gnome-dvb-daemon-0.1.21/src/Device.c --- gnome-dvb-daemon-0.1.16/src/Device.c 2009-11-14 12:05:23.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Device.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Device.c generated by valac, the Vala compiler +/* Device.c generated by valac 0.9.7, the Vala compiler * generated from Device.vala, do not modify */ /* @@ -57,6 +57,10 @@ #define _gst_message_unref0(var) ((var == NULL) ? NULL : (var = (gst_message_unref (var), NULL))) typedef enum { + DVB_DEVICE_ERROR_UNKNOWN_TYPE +} DVBDeviceError; +#define DVB_DEVICE_ERROR dvb_device_error_quark () +typedef enum { DVB_ADAPTER_TYPE_UNKNOWN, DVB_ADAPTER_TYPE_DVB_T, DVB_ADAPTER_TYPE_DVB_S, @@ -84,9 +88,10 @@ static gpointer dvb_device_parent_class = NULL; -GType dvb_adapter_type_get_type (void); -GType dvb_device_get_type (void); -GType dvb_channel_list_get_type (void); +GQuark dvb_device_error_quark (void); +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; +GType dvb_device_get_type (void) G_GNUC_CONST; +GType dvb_channel_list_get_type (void) G_GNUC_CONST; #define DVB_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_DEVICE, DVBDevicePrivate)) enum { DVB_DEVICE_DUMMY_PROPERTY, @@ -98,21 +103,24 @@ DVB_DEVICE_RECORDINGS_DIRECTORY }; #define DVB_DEVICE_PRIME 31 -static gboolean dvb_device_setAdapterTypeAndName (DVBDevice* self, guint adapter, gboolean get_type); -DVBDevice* dvb_device_new (guint adapter, guint frontend, gboolean get_type_and_name); -DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend, gboolean get_type_and_name); -void dvb_device_set_Channels (DVBDevice* self, DVBChannelList* value); +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); void dvb_device_set_RecordingsDirectory (DVBDevice* self, GFile* value); -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, DVBChannelList* channels, GFile* recordings_dir); +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); +gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); guint dvb_device_get_Adapter (DVBDevice* self); guint dvb_device_get_Frontend (DVBDevice* self); -gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); -guint dvb_device_hash_without_device (guint adapter, guint frontend); guint dvb_device_hash (DVBDevice* device); +guint dvb_device_hash_without_device (guint adapter, guint frontend); gboolean dvb_device_is_busy (DVBDevice* self); static void dvb_device_set_Adapter (DVBDevice* self, guint value); static void dvb_device_set_Frontend (DVBDevice* self, guint value); -DVBAdapterType dvb_device_get_Type (DVBDevice* self); const char* dvb_device_get_Name (DVBDevice* self); DVBChannelList* dvb_device_get_Channels (DVBDevice* self); GFile* dvb_device_get_RecordingsDirectory (DVBDevice* self); @@ -123,45 +131,78 @@ +GQuark dvb_device_error_quark (void) { + return g_quark_from_static_string ("dvb_device_error-quark"); +} + GType dvb_adapter_type_get_type (void) { - static GType dvb_adapter_type_type_id = 0; - if (G_UNLIKELY (dvb_adapter_type_type_id == 0)) { + static volatile gsize dvb_adapter_type_type_id__volatile = 0; + if (g_once_init_enter (&dvb_adapter_type_type_id__volatile)) { static const GEnumValue values[] = {{DVB_ADAPTER_TYPE_UNKNOWN, "DVB_ADAPTER_TYPE_UNKNOWN", "unknown"}, {DVB_ADAPTER_TYPE_DVB_T, "DVB_ADAPTER_TYPE_DVB_T", "dvb-t"}, {DVB_ADAPTER_TYPE_DVB_S, "DVB_ADAPTER_TYPE_DVB_S", "dvb-s"}, {DVB_ADAPTER_TYPE_DVB_C, "DVB_ADAPTER_TYPE_DVB_C", "dvb-c"}, {0, NULL, NULL}}; + GType dvb_adapter_type_type_id; dvb_adapter_type_type_id = g_enum_register_static ("DVBAdapterType", values); + g_once_init_leave (&dvb_adapter_type_type_id__volatile, dvb_adapter_type_type_id); } - return dvb_adapter_type_type_id; + return dvb_adapter_type_type_id__volatile; } -DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend, gboolean get_type_and_name) { +DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend) { DVBDevice * self; self = (DVBDevice*) g_object_new (object_type, "Adapter", adapter, "Frontend", frontend, NULL); - dvb_device_setAdapterTypeAndName (self, adapter, get_type_and_name); return self; } -DVBDevice* dvb_device_new (guint adapter, guint frontend, gboolean get_type_and_name) { - return dvb_device_construct (DVB_TYPE_DEVICE, adapter, frontend, get_type_and_name); +DVBDevice* dvb_device_new (guint adapter, guint frontend) { + return dvb_device_construct (DVB_TYPE_DEVICE, adapter, frontend); +} + + +DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend) { + DVBDevice* result = NULL; + DVBDevice* device; + device = dvb_device_new (adapter, frontend); + dvb_device_setAdapterTypeAndName (device, adapter, frontend); + result = device; + return result; } -DVBDevice* dvb_device_new_full (guint adapter, guint frontend, DVBChannelList* channels, GFile* recordings_dir) { - DVBDevice* result; - DVBDevice* dev; - g_return_val_if_fail (channels != NULL, NULL); +DVBDevice* dvb_device_new_full (guint adapter, guint frontend, GFile* channels_conf, GFile* recordings_dir, guint group_id, GError** error) { + DVBDevice* result = NULL; + DVBDevice* device; + DVBChannelList* _tmp0_; + GError * _inner_error_ = NULL; + g_return_val_if_fail (channels_conf != NULL, NULL); g_return_val_if_fail (recordings_dir != NULL, NULL); - dev = dvb_device_new (adapter, frontend, TRUE); - dvb_device_set_Channels (dev, channels); - dvb_device_set_RecordingsDirectory (dev, recordings_dir); - result = dev; + device = dvb_device_new_with_type (adapter, frontend); + if (dvb_device_get_Type (device) == DVB_ADAPTER_TYPE_UNKNOWN) { + _inner_error_ = g_error_new (DVB_DEVICE_ERROR, DVB_DEVICE_ERROR_UNKNOWN_TYPE, "device %u,%u has unknown type", adapter, frontend); + { + if (_inner_error_->domain == DVB_DEVICE_ERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (device); + return NULL; + } else { + _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); + g_clear_error (&_inner_error_); + return NULL; + } + } + } + dvb_device_set_RecordingsDirectory (device, recordings_dir); + dvb_device_set_Channels (device, _tmp0_ = dvb_channel_list_new (channels_conf)); + _g_object_unref0 (_tmp0_); + result = device; return result; } gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2) { - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; if (dev1 == NULL) { @@ -184,7 +225,7 @@ guint dvb_device_hash (DVBDevice* device) { - guint result; + guint result = 0U; if (device == NULL) { result = (guint) 0; return result; @@ -195,7 +236,7 @@ guint dvb_device_hash_without_device (guint adapter, guint frontend) { - guint result; + guint result = 0U; result = ((2 * DVB_DEVICE_PRIME) + (DVB_DEVICE_PRIME * adapter)) + frontend; return result; } @@ -207,7 +248,7 @@ gboolean dvb_device_is_busy (DVBDevice* self) { - gboolean result; + gboolean result = FALSE; GstElement* dvbsrc; GstElement* pipeline; GstBus* bus; @@ -215,7 +256,7 @@ g_return_val_if_fail (self != NULL, FALSE); dvbsrc = gst_element_factory_make ("dvbsrc", "text_dvbsrc"); if (dvbsrc == NULL) { - g_critical ("Device.vala:83: Could not create dvbsrc element"); + g_critical ("Device.vala:106: Could not create dvbsrc element"); result = TRUE; _gst_object_unref0 (dvbsrc); return result; @@ -242,50 +283,47 @@ if (_tmp0_) { GError* gerror; char* debug_text; - char* _tmp4_; - char* _tmp3_ = NULL; - GError* _tmp2_; GError* _tmp1_ = NULL; + GError* _tmp2_; + char* _tmp3_ = NULL; + char* _tmp4_; gerror = NULL; debug_text = NULL; (gst_message_parse_error (msg, &_tmp1_, &_tmp3_), gerror = (_tmp2_ = _tmp1_, _g_error_free0 (gerror), _tmp2_)); debug_text = (_tmp4_ = _tmp3_, _g_free0 (debug_text), _tmp4_); - g_debug ("Device.vala:105: Error tuning: %s; %s", gerror->message, debug_text); + g_debug ("Device.vala:128: Error tuning: %s; %s", gerror->message, debug_text); busy_val = TRUE; - _g_error_free0 (gerror); _g_free0 (debug_text); + _g_error_free0 (gerror); } _gst_message_unref0 (msg); } gst_element_set_state (pipeline, GST_STATE_NULL); result = busy_val; - _gst_object_unref0 (dvbsrc); - _gst_object_unref0 (pipeline); _gst_object_unref0 (bus); + _gst_object_unref0 (pipeline); + _gst_object_unref0 (dvbsrc); return result; } -static gboolean dvb_device_setAdapterTypeAndName (DVBDevice* self, guint adapter, gboolean get_type) { - gboolean result; +static gboolean dvb_device_setAdapterTypeAndName (DVBDevice* self, guint adapter, guint frontend) { + gboolean result = FALSE; GstElement* dvbsrc; GstElement* pipeline; GstBus* bus; gboolean success; char* adapter_type; g_return_val_if_fail (self != NULL, FALSE); - if (!get_type) { - result = TRUE; - return result; - } dvbsrc = gst_element_factory_make ("dvbsrc", "test_dvbsrc"); if (dvbsrc == NULL) { - g_critical ("Device.vala:121: Could not create dvbsrc element"); + g_critical ("Device.vala:142: 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); pipeline = (GstElement*) ((GstPipeline*) gst_pipeline_new ("type_name")); gst_bin_add (GST_BIN (pipeline), _gst_object_ref0 (dvbsrc)); gst_element_set_state (pipeline, GST_STATE_READY); @@ -306,7 +344,7 @@ } if (_tmp0_) { const GstStructure* structure; - structure = msg->structure; + structure = gst_message_get_structure (msg); if (_vala_strcmp0 (gst_structure_get_name (structure), "dvb-adapter") == 0) { char* _tmp1_; char* _tmp2_; @@ -320,17 +358,17 @@ if (msg->type == GST_MESSAGE_ERROR) { GError* gerror; char* debug; - char* _tmp6_; - char* _tmp5_ = NULL; - GError* _tmp4_; GError* _tmp3_ = NULL; + GError* _tmp4_; + char* _tmp5_ = NULL; + char* _tmp6_; gerror = NULL; debug = NULL; (gst_message_parse_error (msg, &_tmp3_, &_tmp5_), gerror = (_tmp4_ = _tmp3_, _g_error_free0 (gerror), _tmp4_)); debug = (_tmp6_ = _tmp5_, _g_free0 (debug), _tmp6_); - g_critical ("Device.vala:151: %s %s", gerror->message, debug); - _g_error_free0 (gerror); + g_warning ("Device.vala:173: %s %s", gerror->message, debug); _g_free0 (debug); + _g_error_free0 (gerror); } } _gst_message_unref0 (msg); @@ -350,10 +388,10 @@ } } result = success; - _gst_object_unref0 (dvbsrc); - _gst_object_unref0 (pipeline); - _gst_object_unref0 (bus); _g_free0 (adapter_type); + _gst_object_unref0 (bus); + _gst_object_unref0 (pipeline); + _gst_object_unref0 (dvbsrc); return result; } @@ -472,12 +510,14 @@ GType dvb_device_get_type (void) { - static GType dvb_device_type_id = 0; - if (dvb_device_type_id == 0) { + static volatile gsize dvb_device_type_id__volatile = 0; + if (g_once_init_enter (&dvb_device_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBDeviceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_device_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBDevice), 0, (GInstanceInitFunc) dvb_device_instance_init, NULL }; + GType dvb_device_type_id; dvb_device_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBDevice", &g_define_type_info, 0); + g_once_init_leave (&dvb_device_type_id__volatile, dvb_device_type_id); } - return dvb_device_type_id; + return dvb_device_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/DeviceGroup.c gnome-dvb-daemon-0.1.21/src/DeviceGroup.c --- gnome-dvb-daemon-0.1.16/src/DeviceGroup.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/DeviceGroup.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* DeviceGroup.c generated by valac, the Vala compiler +/* DeviceGroup.c generated by valac 0.9.7, the Vala compiler * generated from DeviceGroup.vala, do not modify */ /* @@ -143,6 +143,7 @@ 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))) +typedef struct _DBusObjectVTable _DBusObjectVTable; #define DVB_TYPE_SCHEDULE (dvb_schedule_get_type ()) #define DVB_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SCHEDULE, DVBSchedule)) @@ -153,7 +154,6 @@ typedef struct _DVBSchedule DVBSchedule; typedef struct _DVBScheduleClass DVBScheduleClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBIDBusDeviceGroupIface { GTypeInterface parent_iface; @@ -235,6 +235,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -252,12 +253,13 @@ static DVBIDBusDeviceGroupIface* dvb_device_group_dvb_id_bus_device_group_parent_iface = NULL; static GeeIterableIface* dvb_device_group_gee_iterable_parent_iface = NULL; -GType dvb_id_bus_device_group_get_type (void); -GType dvb_device_group_get_type (void); -GType dvb_device_get_type (void); -GType dvb_recorder_get_type (void); -GType dvb_epg_scanner_get_type (void); -GType dvb_channel_factory_get_type (void); +DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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; +GType dvb_recorder_get_type (void) G_GNUC_CONST; +GType dvb_epg_scanner_get_type (void) G_GNUC_CONST; +GType dvb_channel_factory_get_type (void) G_GNUC_CONST; #define DVB_DEVICE_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_DEVICE_GROUP, DVBDeviceGroupPrivate)) enum { DVB_DEVICE_GROUP_DUMMY_PROPERTY, @@ -273,85 +275,92 @@ DVB_DEVICE_GROUP_REFERENCE_DEVICE, DVB_DEVICE_GROUP_ELEMENT_TYPE }; -GType dvb_channel_list_get_type (void); -void dvb_channel_list_set_GroupId (DVBChannelList* self, guint value); +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); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_get_Channels (DVBDevice* self); +void dvb_channel_list_set_GroupId (DVBChannelList* self, guint value); DVBEPGScanner* dvb_epg_scanner_new (DVBDeviceGroup* device); DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device); gboolean dvb_device_group_register_channel_list (DVBDeviceGroup* self); gboolean dvb_device_group_register_recorder (DVBDeviceGroup* 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_destroy (DVBDeviceGroup* self); guint dvb_device_group_get_Id (DVBDeviceGroup* self); -void dvb_epg_scanner_stop (DVBEPGScanner* self); +void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self); void dvb_recorder_stop (DVBRecorder* self); void dvb_channel_factory_destroy (DVBChannelFactory* self); -void dvb_device_group_destroy (DVBDeviceGroup* self); -DVBDevice* dvb_device_new (guint adapter, guint frontend, gboolean get_type_and_name); -DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend, gboolean get_type_and_name); -gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device); +void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self); +gboolean dvb_epg_scanner_start (DVBEPGScanner* self); +void dvb_epg_scanner_stop (DVBEPGScanner* self); void dvb_device_group_create_and_add_device (DVBDeviceGroup* self, guint adapter, guint frontend); -GType dvb_adapter_type_get_type (void); +DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend); +gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device); +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; DVBAdapterType dvb_device_get_Type (DVBDevice* self); DVBAdapterType dvb_device_group_get_Type (DVBDeviceGroup* self); void dvb_device_set_Channels (DVBDevice* self, DVBChannelList* value); GFile* dvb_device_get_RecordingsDirectory (DVBDevice* self); void dvb_device_set_RecordingsDirectory (DVBDevice* self, GFile* value); +gboolean dvb_device_group_add_and_emit (DVBDeviceGroup* self, DVBDevice* device); +guint dvb_device_get_Adapter (DVBDevice* self); +guint dvb_device_get_Frontend (DVBDevice* self); gboolean dvb_device_group_contains (DVBDeviceGroup* self, DVBDevice* device); gboolean dvb_device_group_remove (DVBDeviceGroup* self, DVBDevice* device); -gboolean dvb_device_is_busy (DVBDevice* self); +gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); +void dvb_device_group_set_reference_device (DVBDeviceGroup* self, DVBDevice* value); +gboolean dvb_device_group_remove_and_emit (DVBDeviceGroup* self, DVBDevice* device); DVBDevice* dvb_device_group_get_next_free_device (DVBDeviceGroup* self); -static char* dvb_device_group_real_GetType (DVBIDBusDeviceGroup* base); -GType dvb_manager_get_type (void); +gboolean dvb_device_is_busy (DVBDevice* self); +static char* dvb_device_group_real_GetType (DVBIDBusDeviceGroup* base, GError** error); +static gboolean dvb_device_group_real_AddDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error); +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); GQuark dvb_database_sql_error_quark (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (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); gboolean dvb_database_config_store_add_device_to_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); -static gboolean dvb_device_group_real_AddDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error); -#define DVB_CONSTANTS_DBUS_RECORDER_PATH "/org/gnome/DVB/DeviceGroup/%u/Recorder" 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); -DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self); +static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); +static void _vala_dbus_unregister_object (gpointer connection, GObject* object); +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); gboolean dvb_database_config_store_remove_device_from_group (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gint dvb_device_group_get_size (DVBDeviceGroup* self); -gboolean dvb_epg_scanner_start (DVBEPGScanner* self); -static gboolean dvb_device_group_real_RemoveDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error); -const char* dvb_device_group_get_Name (DVBDeviceGroup* self); static char* dvb_device_group_real_GetName (DVBIDBusDeviceGroup* base, GError** error); +const char* dvb_device_group_get_Name (DVBDeviceGroup* self); +static gboolean dvb_device_group_real_SetName (DVBIDBusDeviceGroup* base, const char* name, GError** error); void dvb_device_group_set_Name (DVBDeviceGroup* self, const char* value); gboolean dvb_database_config_store_update_from_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); -static gboolean dvb_device_group_real_SetName (DVBIDBusDeviceGroup* base, const char* name, GError** error); -#define DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH "/org/gnome/DVB/DeviceGroup/%u/ChannelList" 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); -#define DVB_CONSTANTS_DVB_DEVICE_PATH "/dev/dvb/adapter%u/frontend%u" -guint dvb_device_get_Adapter (DVBDevice* self); -guint dvb_device_get_Frontend (DVBDevice* self); static char** 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); gboolean dvb_channel_list_contains (DVBChannelList* self, guint sid); #define DVB_CONSTANTS_DBUS_SCHEDULE_PATH "/org/gnome/DVB/DeviceGroup/%u/Schedule/%u" DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); -GType dvb_schedule_get_type (void); +GType dvb_schedule_get_type (void) G_GNUC_CONST; DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self); -static gboolean dvb_device_group_real_GetSchedule (DVBIDBusDeviceGroup* base, guint channel_sid, char** opath, GError** error); -GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self); static char* dvb_device_group_real_GetRecordingsDirectory (DVBIDBusDeviceGroup* base, GError** error); -void dvb_device_group_set_RecordingsDirectory (DVBDeviceGroup* self, GFile* value); +GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self); static gboolean dvb_device_group_real_SetRecordingsDirectory (DVBIDBusDeviceGroup* base, const char* location, GError** error); +void dvb_device_group_set_RecordingsDirectory (DVBDeviceGroup* self, GFile* value); static GeeIterator* dvb_device_group_real_iterator (GeeIterable* base); static void dvb_device_group_update_all_devices (DVBDeviceGroup* self); static void dvb_device_group_set_Id (DVBDeviceGroup* self, guint value); +DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self); DVBChannelFactory* dvb_device_group_get_channel_factory (DVBDeviceGroup* self); -static void dvb_device_group_set_reference_device (DVBDeviceGroup* self, DVBDevice* value); guint dvb_device_hash (DVBDevice* device); static guint _dvb_device_hash_ghash_func (void* key); -gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); static gboolean _dvb_device_equal_gequal_func (void* a, void* b); DVBChannelFactory* dvb_channel_factory_new (DVBDeviceGroup* devgroup); DVBChannelFactory* dvb_channel_factory_construct (GType object_type, DVBDeviceGroup* devgroup); @@ -367,13 +376,17 @@ static void dvb_device_group_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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; +/** + * @id: ID of group + * @reference_device: All devices of this group will inherit + * the settings from this device + * @with_epg_scanner: Whether to provide an EPG scanner + */ DVBDeviceGroup* dvb_device_group_construct (GType object_type, guint id, DVBDevice* reference_device, gboolean with_epg_scanner) { DVBDeviceGroup * self; g_return_val_if_fail (reference_device != NULL, NULL); @@ -398,125 +411,261 @@ void dvb_device_group_destroy (DVBDeviceGroup* self) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_debug ("DeviceGroup.vala:100: Destroying group %u", self->priv->_Id); - if (self->priv->_epgscanner != NULL) { - dvb_epg_scanner_stop (self->priv->_epgscanner); - } + g_debug ("DeviceGroup.vala:104: Destroying group %u", self->priv->_Id); + 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); - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - gee_collection_clear ((GeeCollection*) self->priv->devices); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + gee_collection_clear ((GeeCollection*) self->priv->devices); + } + __finally49: + { + 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; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); } +void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self) { + g_return_if_fail (self != NULL); + if (self->priv->_epgscanner != NULL) { + dvb_epg_scanner_start (self->priv->_epgscanner); + } +} + + +void dvb_device_group_stop_epg_scanner (DVBDeviceGroup* self) { + g_return_if_fail (self != NULL); + if (self->priv->_epgscanner != NULL) { + dvb_epg_scanner_stop (self->priv->_epgscanner); + } +} + + +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * + * Creates a new device first and adds it to the group. + * The new device inherits the settings from the reference + * device. + */ void dvb_device_group_create_and_add_device (DVBDeviceGroup* self, guint adapter, guint frontend) { DVBDevice* new_dev; g_return_if_fail (self != NULL); - new_dev = dvb_device_new (adapter, frontend, TRUE); + new_dev = dvb_device_new_with_type (adapter, frontend); dvb_device_group_add (self, new_dev); _g_object_unref0 (new_dev); } +/** + * Add device to group. The device's settings will be overridden + * with those of the reference device. + */ gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device) { - gboolean result; + gboolean result = FALSE; gboolean _result_ = FALSE; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); if (dvb_device_get_Type (device) != dvb_device_group_get_Type (self)) { - g_warning ("DeviceGroup.vala:131: Cannot add device, because it is not of same typ" \ + g_warning ("DeviceGroup.vala:143: Cannot add device, because it is not of same typ" \ "e"); result = FALSE; return result; } - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - dvb_device_set_Channels (device, dvb_device_get_Channels (self->priv->_reference_device)); - dvb_device_set_RecordingsDirectory (device, dvb_device_get_RecordingsDirectory (self->priv->_reference_device)); - _result_ = gee_collection_add ((GeeCollection*) self->priv->devices, device); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + dvb_device_set_Channels (device, dvb_device_get_Channels (self->priv->_reference_device)); + dvb_device_set_RecordingsDirectory (device, dvb_device_get_RecordingsDirectory (self->priv->_reference_device)); + _result_ = gee_collection_add ((GeeCollection*) self->priv->devices, device); + } + __finally50: + { + 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; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } +gboolean dvb_device_group_add_and_emit (DVBDeviceGroup* self, DVBDevice* device) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (device != NULL, FALSE); + if (dvb_device_group_add (self, device)) { + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", dvb_device_get_Adapter (device), dvb_device_get_Frontend (device)); + result = TRUE; + return result; + } + result = FALSE; + return result; +} + + gboolean dvb_device_group_contains (DVBDeviceGroup* self, DVBDevice* device) { - gboolean result; + gboolean result = FALSE; gboolean _result_ = FALSE; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - _result_ = gee_collection_contains ((GeeCollection*) self->priv->devices, device); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + _result_ = gee_collection_contains ((GeeCollection*) self->priv->devices, device); + } + __finally51: + { + 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; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } gboolean dvb_device_group_remove (DVBDeviceGroup* self, DVBDevice* device) { - gboolean result; + gboolean result = FALSE; gboolean _result_ = FALSE; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - _result_ = gee_collection_remove ((GeeCollection*) self->priv->devices, device); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + _result_ = gee_collection_remove ((GeeCollection*) self->priv->devices, device); + if (dvb_device_equal (device, self->priv->_reference_device)) { + { + GeeIterator* _dev_it; + _dev_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); + while (TRUE) { + DVBDevice* dev; + if (!gee_iterator_next (_dev_it)) { + break; + } + dev = (DVBDevice*) gee_iterator_get (_dev_it); + 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); + } + } + } + __finally52: + { + 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; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } +gboolean dvb_device_group_remove_and_emit (DVBDeviceGroup* self, DVBDevice* device) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (device != NULL, FALSE); + if (dvb_device_group_remove (self, device)) { + g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", dvb_device_get_Adapter (device), dvb_device_get_Frontend (device)); + result = TRUE; + return result; + } + result = FALSE; + return result; +} + + +/** + * Get first device that isn't busy. + * If all devices are busy NULL is returned. + */ static gpointer _g_object_ref0 (gpointer self) { return self ? g_object_ref (self) : NULL; } DVBDevice* dvb_device_group_get_next_free_device (DVBDeviceGroup* self) { - DVBDevice* result; + DVBDevice* result = NULL; DVBDevice* _result_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _dev_it; - _dev_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - while (TRUE) { - DVBDevice* dev; - if (!gee_iterator_next (_dev_it)) { - break; - } - dev = (DVBDevice*) gee_iterator_get (_dev_it); - if (!dvb_device_is_busy (dev)) { - DVBDevice* _tmp0_; - _result_ = (_tmp0_ = _g_object_ref0 (dev), _g_object_unref0 (_result_), _tmp0_); + { + GeeIterator* _dev_it; + _dev_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); + while (TRUE) { + DVBDevice* dev; + if (!gee_iterator_next (_dev_it)) { + break; + } + dev = (DVBDevice*) gee_iterator_get (_dev_it); + if (!dvb_device_is_busy (dev)) { + DVBDevice* _tmp0_; + _result_ = (_tmp0_ = _g_object_ref0 (dev), _g_object_unref0 (_result_), _tmp0_); + _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); + } + 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); + g_clear_error (&_inner_error_); + return NULL; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } -static char* dvb_device_group_real_GetType (DVBIDBusDeviceGroup* base) { +/** + * @returns: Name of adapter type the group holds + * or an empty string when group with given id doesn't exist. + */ +static char* dvb_device_group_real_GetType (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; - char* result; + char* result = NULL; char* type_str; self = (DVBDeviceGroup*) base; type_str = NULL; @@ -551,16 +700,24 @@ } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @returns: TRUE when the device has been registered successfully + * + * Creates a new device and adds it to the DeviceGroup. + * The new device will inherit all settings from the group's + * reference device. + */ static gboolean dvb_device_group_real_AddDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error) { DVBDeviceGroup * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBDevice* device; DVBManager* manager; guint group_id; + GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; - _inner_error_ = NULL; - device = dvb_device_new (adapter, frontend, TRUE); + device = dvb_device_new_with_type (adapter, frontend); if (device == NULL) { result = FALSE; _g_object_unref0 (device); @@ -570,52 +727,54 @@ if (dvb_manager_device_is_in_any_group (manager, device)) { g_debug ("Device with adapter %u, frontend %u is" "already part of a group", adapter, frontend); result = FALSE; - _g_object_unref0 (device); _g_object_unref0 (manager); + _g_object_unref0 (device); return result; } group_id = self->priv->_Id; - g_debug ("DeviceGroup.vala:220: Adding device with adapter %u, frontend %u to gr" \ + g_debug ("DeviceGroup.vala:255: Adding device with adapter %u, frontend %u to gr" \ "oup %u", adapter, frontend, group_id); if (dvb_device_group_add (self, device)) { { - dvb_database_config_store_add_device_to_group (dvb_factory_get_config_store (), device, self, &_inner_error_); + DVBdatabaseConfigStore* _tmp0_; + dvb_database_config_store_add_device_to_group (_tmp0_ = dvb_factory_get_config_store (), device, self, &_inner_error_); + _g_object_unref0 (_tmp0_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch14_dvb_database_sql_error; + goto __catch54_dvb_database_sql_error; } - _g_object_unref0 (device); _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 __finally14; - __catch14_dvb_database_sql_error: + goto __finally54; + __catch54_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("DeviceGroup.vala:228: %s", e->message); + g_critical ("DeviceGroup.vala:263: %s", e->message); result = FALSE; _g_error_free0 (e); - _g_object_unref0 (device); _g_object_unref0 (manager); + _g_object_unref0 (device); return result; } } - __finally14: + __finally54: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (device); _g_object_unref0 (manager); + _g_object_unref0 (device); return FALSE; } else { - _g_object_unref0 (device); _g_object_unref0 (manager); + _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); g_clear_error (&_inner_error_); return FALSE; @@ -623,20 +782,25 @@ } g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-added", adapter, frontend); result = TRUE; - _g_object_unref0 (device); _g_object_unref0 (manager); + _g_object_unref0 (device); return result; } result = FALSE; - _g_object_unref0 (device); _g_object_unref0 (manager); + _g_object_unref0 (device); return result; } +/** + * @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; + char* result = NULL; char* _tmp0_; char* _tmp1_; self = (DVBDeviceGroup*) base; @@ -645,50 +809,75 @@ } +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); +} + + gboolean dvb_device_group_register_recorder (DVBDeviceGroup* self) { - gboolean result; + gboolean result = FALSE; DVBRecorder* recorder; DBusGConnection* conn; char* path; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("DeviceGroup.vala:251: Creating new Recorder D-Bus service for group %u", self->priv->_Id); + g_debug ("DeviceGroup.vala:286: Creating new Recorder D-Bus service for group %u", self->priv->_Id); recorder = _g_object_ref0 (dvb_device_group_get_recorder (self)); conn = dvb_utils_get_dbus_connection (); if (conn == NULL) { result = FALSE; - _g_object_unref0 (recorder); _dbus_g_connection_unref0 (conn); + _g_object_unref0 (recorder); return result; } path = g_strdup_printf (DVB_CONSTANTS_DBUS_RECORDER_PATH, self->priv->_Id); _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) recorder); result = TRUE; - _g_object_unref0 (recorder); - _dbus_g_connection_unref0 (conn); _g_free0 (path); + _dbus_g_connection_unref0 (conn); + _g_object_unref0 (recorder); return result; } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @returns: TRUE when device has been removed successfully + * + * Removes the device from the group. If the group contains + * no devices after the removal it's removed as well. + */ static gboolean dvb_device_group_real_RemoveDevice (DVBIDBusDeviceGroup* base, guint adapter, guint frontend, GError** error) { DVBDeviceGroup * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBDevice* dev; + GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; - _inner_error_ = NULL; - dev = dvb_device_new (adapter, frontend, FALSE); + dev = dvb_device_new (adapter, frontend); if (dvb_device_group_contains (self, dev)) { if (dvb_device_group_remove (self, dev)) { - gboolean _tmp0_ = FALSE; - if (dvb_device_group_get_epgscanner (self) != NULL) { - dvb_epg_scanner_stop (dvb_device_group_get_epgscanner (self)); - } + dvb_device_group_stop_epg_scanner (self); { - dvb_database_config_store_remove_device_from_group (dvb_factory_get_config_store (), dev, self, &_inner_error_); + DVBdatabaseConfigStore* _tmp0_; + dvb_database_config_store_remove_device_from_group (_tmp0_ = dvb_factory_get_config_store (), dev, self, &_inner_error_); + _g_object_unref0 (_tmp0_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch15_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); @@ -696,21 +885,21 @@ return FALSE; } } - goto __finally15; - __catch15_dvb_database_sql_error: + goto __finally55; + __catch55_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("DeviceGroup.vala:288: %s", e->message); + g_critical ("DeviceGroup.vala:323: %s", e->message); result = FALSE; _g_error_free0 (e); _g_object_unref0 (dev); return result; } } - __finally15: + __finally55: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -724,12 +913,7 @@ } } if (dvb_device_group_get_size (self) > 0) { - _tmp0_ = dvb_device_group_get_epgscanner (self) != NULL; - } else { - _tmp0_ = FALSE; - } - if (_tmp0_) { - dvb_epg_scanner_start (dvb_device_group_get_epgscanner (self)); + dvb_device_group_start_epg_scanner (self); } g_signal_emit_by_name ((DVBIDBusDeviceGroup*) self, "device-removed", adapter, frontend); result = TRUE; @@ -743,31 +927,37 @@ } +/** + * @returns: Name of the device group + */ static char* dvb_device_group_real_GetName (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; - char* result; + char* result = NULL; self = (DVBDeviceGroup*) base; result = g_strdup (self->priv->_Name); return result; } +/** + * @name: Name of the group + * @returns: TRUE on success + */ static gboolean dvb_device_group_real_SetName (DVBIDBusDeviceGroup* base, const char* name, GError** error) { DVBDeviceGroup * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; + GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; g_return_val_if_fail (name != NULL, FALSE); - _inner_error_ = NULL; dvb_device_group_set_Name (self, name); { DVBdatabaseConfigStore* config; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); 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 __catch16_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); @@ -776,20 +966,20 @@ } _g_object_unref0 (config); } - goto __finally16; - __catch16_dvb_database_sql_error: + goto __finally56; + __catch56_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("DeviceGroup.vala:323: %s", e->message); + g_critical ("DeviceGroup.vala:358: %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally16: + __finally56: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -805,9 +995,12 @@ } +/** + * @returns: Object path to the ChannelList service for this device + */ static char* dvb_device_group_real_GetChannelList (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; - char* result; + char* result = NULL; char* _tmp0_; char* _tmp1_; self = (DVBDeviceGroup*) base; @@ -817,73 +1010,100 @@ gboolean dvb_device_group_register_channel_list (DVBDeviceGroup* self) { - gboolean result; + gboolean result = FALSE; DVBChannelList* channels; DBusGConnection* conn; char* path; g_return_val_if_fail (self != NULL, FALSE); - g_debug ("DeviceGroup.vala:338: Creating new ChannelList D-Bus service for group" \ + g_debug ("DeviceGroup.vala:373: Creating new ChannelList D-Bus service for group" \ " %u", self->priv->_Id); channels = _g_object_ref0 (dvb_device_group_get_Channels (self)); conn = dvb_utils_get_dbus_connection (); if (conn == NULL) { result = FALSE; - _g_object_unref0 (channels); _dbus_g_connection_unref0 (conn); + _g_object_unref0 (channels); return result; } path = g_strdup_printf (DVB_CONSTANTS_DBUS_CHANNEL_LIST_PATH, self->priv->_Id); _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) channels); result = TRUE; - _g_object_unref0 (channels); - _dbus_g_connection_unref0 (conn); _g_free0 (path); + _dbus_g_connection_unref0 (conn); + _g_object_unref0 (channels); return result; } +/** + * @returns: List of paths to the devices that are part of + * the group (e.g. /dev/dvb/adapter0/frontend0) + */ static char** dvb_device_group_real_GetMembers (DVBIDBusDeviceGroup* base, int* result_length1, GError** error) { DVBDeviceGroup * self; - char** result; - char** _tmp1_; - gint groupdevs_size; + char** result = NULL; gint groupdevs_length1; + gint _groupdevs_size_; + char** _tmp1_; gint _tmp0_; char** groupdevs; gint i; char** _tmp3_; + GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; - groupdevs = (_tmp1_ = g_new0 (char*, (_tmp0_ = dvb_device_group_get_size (self)) + 1), groupdevs_length1 = _tmp0_, groupdevs_size = groupdevs_length1, _tmp1_); + groupdevs = (_tmp1_ = g_new0 (char*, (_tmp0_ = dvb_device_group_get_size (self)) + 1), groupdevs_length1 = _tmp0_, _groupdevs_size_ = groupdevs_length1, _tmp1_); i = 0; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _dev_it; - _dev_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - while (TRUE) { - DVBDevice* dev; - char* _tmp2_; - if (!gee_iterator_next (_dev_it)) { - break; + { + GeeIterator* _dev_it; + _dev_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); + while (TRUE) { + DVBDevice* dev; + char* _tmp2_; + if (!gee_iterator_next (_dev_it)) { + break; + } + dev = (DVBDevice*) gee_iterator_get (_dev_it); + groupdevs[i] = (_tmp2_ = g_strdup_printf (DVB_CONSTANTS_DVB_DEVICE_PATH, dvb_device_get_Adapter (dev), dvb_device_get_Frontend (dev)), _g_free0 (groupdevs[i]), _tmp2_); + i++; + _g_object_unref0 (dev); } - dev = (DVBDevice*) gee_iterator_get (_dev_it); - groupdevs[i] = (_tmp2_ = g_strdup_printf (DVB_CONSTANTS_DVB_DEVICE_PATH, dvb_device_get_Adapter (dev), dvb_device_get_Frontend (dev)), _g_free0 (groupdevs[i]), _tmp2_); - i++; - _g_object_unref0 (dev); + _g_object_unref0 (_dev_it); + } + } + __finally57: + { + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + groupdevs = (_vala_array_free (groupdevs, groupdevs_length1, (GDestroyNotify) g_free), NULL); + return NULL; + } else { + groupdevs = (_vala_array_free (groupdevs, groupdevs_length1, (GDestroyNotify) g_free), 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_object_unref0 (_dev_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = (_tmp3_ = groupdevs, *result_length1 = groupdevs_length1, _tmp3_); return result; groupdevs = (_vala_array_free (groupdevs, groupdevs_length1, (GDestroyNotify) g_free), NULL); } +/** + * @channel_sid: ID of the channel + * @opath: Device group's DBus path + * @returns: TRUE on success + */ static gboolean dvb_device_group_real_GetSchedule (DVBIDBusDeviceGroup* base, guint channel_sid, char** opath, GError** error) { DVBDeviceGroup * self; - gboolean result; + gboolean result = FALSE; char* _tmp4_; self = (DVBDeviceGroup*) base; if (opath != NULL) { @@ -907,8 +1127,8 @@ schedule = (_tmp2_ = _g_object_ref0 (dvb_channel_get_Schedule (_tmp1_ = dvb_channel_list_get_channel (dvb_device_group_get_Channels (self), channel_sid))), _g_object_unref0 (_tmp1_), _tmp2_); _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) schedule); gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->schedules, path); - _dbus_g_connection_unref0 (conn); _g_object_unref0 (schedule); + _dbus_g_connection_unref0 (conn); } *opath = (_tmp3_ = g_strdup (path), _g_free0 (*opath), _tmp3_); result = TRUE; @@ -921,33 +1141,39 @@ } +/** + * @returns: Location of the recordings directory + */ static char* dvb_device_group_real_GetRecordingsDirectory (DVBIDBusDeviceGroup* base, GError** error) { DVBDeviceGroup * self; - char* result; + char* result = NULL; self = (DVBDeviceGroup*) base; result = g_file_get_path (dvb_device_group_get_RecordingsDirectory (self)); return result; } +/** + * @location: Location of the recordings directory + * @returns: TRUE on success + */ static gboolean dvb_device_group_real_SetRecordingsDirectory (DVBIDBusDeviceGroup* base, const char* location, GError** error) { DVBDeviceGroup * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; GFile* _tmp0_; + GError * _inner_error_ = NULL; self = (DVBDeviceGroup*) base; g_return_val_if_fail (location != NULL, FALSE); - _inner_error_ = NULL; dvb_device_group_set_RecordingsDirectory (self, _tmp0_ = g_file_new_for_path (location)); _g_object_unref0 (_tmp0_); { DVBdatabaseConfigStore* config; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); 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 __catch17_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); @@ -956,20 +1182,20 @@ } _g_object_unref0 (config); } - goto __finally17; - __catch17_dvb_database_sql_error: + goto __finally58; + __catch58_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("DeviceGroup.vala:420: %s", e->message); + g_critical ("DeviceGroup.vala:455: %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally17: + __finally58: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -987,35 +1213,50 @@ static GeeIterator* dvb_device_group_real_iterator (GeeIterable* base) { DVBDeviceGroup * self; - GeeIterator* result; + GeeIterator* result = NULL; self = (DVBDeviceGroup*) base; result = gee_iterable_iterator ((GeeIterable*) self->priv->devices); return result; } +/** + * Set RecordingsDirectory property of all + * devices to the values of the reference device + */ static void dvb_device_group_update_all_devices (DVBDeviceGroup* self) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeIterator* _device_it; - _device_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); - while (TRUE) { - DVBDevice* device; - if (!gee_iterator_next (_device_it)) { - break; - } - device = (DVBDevice*) gee_iterator_get (_device_it); - if (device != self->priv->_reference_device) { - dvb_device_set_RecordingsDirectory (device, dvb_device_get_RecordingsDirectory (self->priv->_reference_device)); + { + GeeIterator* _device_it; + _device_it = gee_iterable_iterator ((GeeIterable*) self->priv->devices); + while (TRUE) { + DVBDevice* device; + if (!gee_iterator_next (_device_it)) { + break; + } + device = (DVBDevice*) gee_iterator_get (_device_it); + if (device != self->priv->_reference_device) { + dvb_device_set_RecordingsDirectory (device, dvb_device_get_RecordingsDirectory (self->priv->_reference_device)); + } + _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); + } + 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; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); } @@ -1122,7 +1363,7 @@ } -static void dvb_device_group_set_reference_device (DVBDeviceGroup* self, DVBDevice* value) { +void dvb_device_group_set_reference_device (DVBDeviceGroup* self, DVBDevice* value) { DVBDevice* _tmp0_; g_return_if_fail (self != NULL); self->priv->_reference_device = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_reference_device), _tmp0_); @@ -1140,12 +1381,16 @@ static guint _dvb_device_hash_ghash_func (void* key) { - return dvb_device_hash (key); + guint result; + result = dvb_device_hash (key); + return result; } static gboolean _dvb_device_equal_gequal_func (void* a, void* b) { - return dvb_device_equal (a, b); + gboolean result; + result = dvb_device_equal (a, b); + return result; } @@ -1245,7 +1490,7 @@ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUP_EPGSCANNER, g_param_spec_object ("epgscanner", "epgscanner", "epgscanner", DVB_TYPE_EPG_SCANNER, 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_GROUP_CHANNEL_FACTORY, g_param_spec_object ("channel-factory", "channel-factory", "channel-factory", DVB_TYPE_CHANNEL_FACTORY, 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_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_ONLY)); + 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)); } @@ -1295,17 +1540,23 @@ } +/** + * A group of devices that share the same settings + * (list of channels, recordings dir) + */ GType dvb_device_group_get_type (void) { - static GType dvb_device_group_type_id = 0; - if (dvb_device_group_type_id == 0) { + static volatile gsize dvb_device_group_type_id__volatile = 0; + if (g_once_init_enter (&dvb_device_group_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBDeviceGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_device_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBDeviceGroup), 0, (GInstanceInitFunc) dvb_device_group_instance_init, NULL }; static const GInterfaceInfo dvb_id_bus_device_group_info = { (GInterfaceInitFunc) dvb_device_group_dvb_id_bus_device_group_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; static const GInterfaceInfo gee_iterable_info = { (GInterfaceInitFunc) dvb_device_group_gee_iterable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_device_group_type_id; dvb_device_group_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBDeviceGroup", &g_define_type_info, 0); g_type_add_interface_static (dvb_device_group_type_id, DVB_TYPE_ID_BUS_DEVICE_GROUP, &dvb_id_bus_device_group_info); g_type_add_interface_static (dvb_device_group_type_id, GEE_TYPE_ITERABLE, &gee_iterable_info); + g_once_init_leave (&dvb_device_group_type_id__volatile, dvb_device_group_type_id); } - return dvb_device_group_type_id; + return dvb_device_group_type_id__volatile; } @@ -1394,24 +1645,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/DeviceGroup.vala gnome-dvb-daemon-0.1.21/src/DeviceGroup.vala --- gnome-dvb-daemon-0.1.16/src/DeviceGroup.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/DeviceGroup.vala 2010-05-10 20:35:42.000000000 +0000 @@ -58,7 +58,10 @@ public string Name {get; set;} // All settings are copied from this one - public Device reference_device {get; construct;} + public Device reference_device { + get; + construct set; + } private Set devices; private Recorder _recorder; @@ -85,8 +88,9 @@ */ public DeviceGroup (uint id, Device reference_device, bool with_epg_scanner=true) { - base (Id: id, reference_device: reference_device); + Object (Id: id, reference_device: reference_device); this.reference_device.Channels.GroupId = id; + if (with_epg_scanner) { this._epgscanner = new EPGScanner (this); } else { @@ -98,9 +102,7 @@ public void destroy () { debug ("Destroying group %u", this.Id); - if (this._epgscanner != null) { - this._epgscanner.stop (); - } + this.stop_epg_scanner (); this._recorder.stop (); this._channelfactory.destroy (); this.schedules.clear (); @@ -108,6 +110,16 @@ this.devices.clear (); } } + + public void start_epg_scanner () { + if (this._epgscanner != null) + this._epgscanner.start (); + } + + public void stop_epg_scanner () { + if (this._epgscanner != null) + this._epgscanner.stop (); + } /** * @adapter: Number of the device's adapter @@ -118,7 +130,7 @@ * device. */ public void create_and_add_device (uint adapter, uint frontend) { - Device new_dev = new Device (adapter, frontend); + Device new_dev = Device.new_with_type (adapter, frontend); this.add (new_dev); } @@ -142,6 +154,14 @@ } return result; } + + public bool add_and_emit (Device device) { + if (this.add (device)) { + this.device_added (device.Adapter, device.Frontend); + return true; + } + return false; + } public bool contains (Device device) { bool result; @@ -155,9 +175,24 @@ 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"); + this.reference_device = dev; + break; + } + } } return result; } + + public bool remove_and_emit (Device device) { + if (this.remove (device)) { + this.device_removed (device.Adapter, device.Frontend); + return true; + } + return false; + } /** * Get first device that isn't busy. @@ -201,11 +236,11 @@ * 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 DBus.Error { // When the device is already registered we // might see some errors if the device is // currently in use - Device device = new Device (adapter, frontend); + Device device = Device.new_with_type (adapter, frontend); if (device == null) return false; @@ -273,13 +308,13 @@ * no devices after the removal it's removed as well. */ public bool RemoveDevice (uint adapter, uint frontend) throws DBus.Error { - Device dev = new Device (adapter, frontend, false); + Device dev = new Device (adapter, frontend); if (this.contains (dev)) { if (this.remove (dev)) { // Stop epgscanner, because it might use the // device we want to unregister - if (this.epgscanner != null) this.epgscanner.stop (); + this.stop_epg_scanner (); try { Factory.get_config_store ().remove_device_from_group ( @@ -289,9 +324,9 @@ return false; } // Group has no devices anymore, delete it - if (this.size > 0 && this.epgscanner != null) { + if (this.size > 0) { // We still have a device, start EPG scanner again - this.epgscanner.start (); + this.start_epg_scanner (); } this.device_removed (adapter, frontend); diff -Nru gnome-dvb-daemon-0.1.16/src/Device.vala gnome-dvb-daemon-0.1.21/src/Device.vala --- gnome-dvb-daemon-0.1.16/src/Device.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Device.vala 2010-08-17 13:15:42.000000000 +0000 @@ -21,6 +21,10 @@ using Gst; namespace DVB { + errordomain DeviceError { + UNKNOWN_TYPE + } + public enum AdapterType { UNKNOWN, DVB_T, @@ -46,18 +50,37 @@ private string adapter_name; private AdapterType adapter_type; - public Device (uint adapter, uint frontend, bool get_type_and_name=true) { + public Device (uint adapter, uint frontend) { base (Adapter: adapter, Frontend: frontend); + } + + public static Device new_with_type (uint adapter, uint frontend) { + var device = new Device (adapter, frontend); + + device.setAdapterTypeAndName(adapter, frontend); - setAdapterTypeAndName(adapter, get_type_and_name); + return device; } - public static Device new_full (uint adapter, uint frontend, - ChannelList channels, File recordings_dir) { - var dev = new Device (adapter, frontend); - dev.Channels = channels; - dev.RecordingsDirectory = recordings_dir; - return dev; + public static Device? new_full (uint adapter, uint frontend, + File channels_conf, File recordings_dir, uint group_id) + throws DeviceError + { + Device device = Device.new_with_type (adapter, frontend); + + /* The type of the device is checked in creation of + * Device class. If the device does not exist the type + * will be AdapterType.UNKNOWN + */ + if (device.Type == AdapterType.UNKNOWN) + throw new DeviceError.UNKNOWN_TYPE ( + "device %u,%u has unknown type", adapter, frontend); + + device.RecordingsDirectory = recordings_dir; + + device.Channels = new ChannelList (channels_conf); + + return device; } public static bool equal (Device* dev1, Device* dev2) { @@ -90,7 +113,7 @@ ((Bin)pipeline).add (dvbsrc); pipeline.set_state (State.READY); - Bus bus = pipeline.get_bus(); + Gst.Bus bus = pipeline.get_bus(); bool busy_val = false; @@ -113,21 +136,20 @@ return busy_val; } - private bool setAdapterTypeAndName (uint adapter, bool get_type) { - if (!get_type) return true; - + private bool setAdapterTypeAndName (uint adapter, uint frontend) { Element dvbsrc = ElementFactory.make ("dvbsrc", "test_dvbsrc"); if (dvbsrc == null) { critical ("Could not create dvbsrc element"); return false; } dvbsrc.set ("adapter", adapter); + dvbsrc.set ("frontend", frontend); Element pipeline = new Pipeline ("type_name"); ((Bin)pipeline).add (dvbsrc); pipeline.set_state (State.READY); - Bus bus = pipeline.get_bus(); + Gst.Bus bus = pipeline.get_bus(); bool success = false; string adapter_type = null; @@ -136,7 +158,7 @@ Message msg = bus.pop(); if (msg.type == MessageType.ELEMENT && msg.src == dvbsrc) { - weak Structure structure = msg.structure; + weak Structure structure = msg.get_structure (); if (structure.get_name() == "dvb-adapter") { adapter_type = "%s".printf (structure.get_string("type")); @@ -148,7 +170,7 @@ Error gerror; string debug; msg.parse_error (out gerror, out debug); - critical ("%s %s", gerror.message, debug); + warning ("%s %s", gerror.message, debug); } } diff -Nru gnome-dvb-daemon-0.1.16/src/EPGScanner.c gnome-dvb-daemon-0.1.21/src/EPGScanner.c --- gnome-dvb-daemon-0.1.16/src/EPGScanner.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/EPGScanner.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* EPGScanner.c generated by valac, the Vala compiler +/* EPGScanner.c generated by valac 0.9.7, the Vala compiler * generated from EPGScanner.vala, do not modify */ /* @@ -23,9 +23,9 @@ #include #include #include +#include #include #include -#include #include @@ -59,11 +59,22 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; + +#define DVB_TYPE_EVENT (dvb_event_get_type ()) +#define DVB_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT, DVBEvent)) +#define DVB_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_EVENT, DVBEventClass)) +#define DVB_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_EVENT)) +#define DVB_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_EVENT)) +#define DVB_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_EVENT, DVBEventClass)) + +typedef struct _DVBEvent DVBEvent; +typedef struct _DVBEventClass DVBEventClass; #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))) #define _g_main_context_unref0(var) ((var == NULL) ? NULL : (var = (g_main_context_unref (var), NULL))) #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_SETTINGS (dvb_settings_get_type ()) #define DVB_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SETTINGS, DVBSettings)) @@ -74,7 +85,6 @@ typedef struct _DVBSettings DVBSettings; typedef struct _DVBSettingsClass DVBSettingsClass; -#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_TYPE_CHANNEL_LIST (dvb_channel_list_get_type ()) @@ -107,16 +117,7 @@ typedef struct _DVBSchedule DVBSchedule; typedef struct _DVBScheduleClass DVBScheduleClass; - -#define DVB_TYPE_EVENT (dvb_event_get_type ()) -#define DVB_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT, DVBEvent)) -#define DVB_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_EVENT, DVBEventClass)) -#define DVB_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_EVENT)) -#define DVB_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_EVENT)) -#define DVB_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_EVENT, DVBEventClass)) - -typedef struct _DVBEvent DVBEvent; -typedef struct _DVBEventClass DVBEventClass; +#define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) typedef struct _DVBEventPrivate DVBEventPrivate; #define DVB_EVENT_TYPE_AUDIO_COMPONENT (dvb_event_audio_component_get_type ()) @@ -148,12 +149,6 @@ typedef struct _DVBEventTeletextComponent DVBEventTeletextComponent; typedef struct _DVBEventTeletextComponentClass DVBEventTeletextComponentClass; -typedef struct _DVBEventAudioComponentPrivate DVBEventAudioComponentPrivate; -#define _dvb_event_audio_component_unref0(var) ((var == NULL) ? NULL : (var = (dvb_event_audio_component_unref (var), NULL))) -typedef struct _DVBEventVideoComponentPrivate DVBEventVideoComponentPrivate; -#define _dvb_event_video_component_unref0(var) ((var == NULL) ? NULL : (var = (dvb_event_video_component_unref (var), NULL))) -typedef struct _DVBEventTeletextComponentPrivate DVBEventTeletextComponentPrivate; -#define _dvb_event_teletext_component_unref0(var) ((var == NULL) ? NULL : (var = (dvb_event_teletext_component_unref (var), NULL))) #define _dvb_event_unref0(var) ((var == NULL) ? NULL : (var = (dvb_event_unref (var), NULL))) struct _DVBEPGScanner { @@ -177,6 +172,8 @@ GMainLoop* loop; GThread* worker_thread; guint bus_watch_id; + GeeHashMap* channel_events; + GStaticRecMutex __lock_channel_events; }; struct _DVBEvent { @@ -206,52 +203,21 @@ void (*finalize) (DVBEvent *self); }; -struct _DVBEventAudioComponent { - GTypeInstance parent_instance; - volatile int ref_count; - DVBEventAudioComponentPrivate * priv; - char* type; -}; - -struct _DVBEventAudioComponentClass { - GTypeClass parent_class; - void (*finalize) (DVBEventAudioComponent *self); -}; - -struct _DVBEventVideoComponent { - GTypeInstance parent_instance; - volatile int ref_count; - DVBEventVideoComponentPrivate * priv; - gboolean high_definition; - char* aspect_ratio; - gint frequency; -}; - -struct _DVBEventVideoComponentClass { - GTypeClass parent_class; - void (*finalize) (DVBEventVideoComponent *self); -}; - -struct _DVBEventTeletextComponent { - GTypeInstance parent_instance; - volatile int ref_count; - DVBEventTeletextComponentPrivate * priv; - char* type; -}; - -struct _DVBEventTeletextComponentClass { - GTypeClass parent_class; - void (*finalize) (DVBEventTeletextComponent *self); -}; - static gint dvb_epg_scanner_CHECK_EIT_INTERVAL; static gint dvb_epg_scanner_CHECK_EIT_INTERVAL = 0; static gpointer dvb_epg_scanner_parent_class = NULL; -GType dvb_epg_scanner_get_type (void); -GType dvb_device_group_get_type (void); -GType dvb_channel_get_type (void); +GType dvb_epg_scanner_get_type (void) G_GNUC_CONST; +GType dvb_device_group_get_type (void) G_GNUC_CONST; +GType dvb_channel_get_type (void) G_GNUC_CONST; +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); +void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); +gpointer dvb_value_get_event (const GValue* value); +GType dvb_event_get_type (void) G_GNUC_CONST; #define DVB_EPG_SCANNER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_EPG_SCANNER, DVBEPGScannerPrivate)) enum { DVB_EPG_SCANNER_DUMMY_PROPERTY @@ -259,22 +225,23 @@ #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" -GType dvb_settings_get_type (void); +DVBEPGScanner* dvb_epg_scanner_new (DVBDeviceGroup* device); +DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device); +GType dvb_settings_get_type (void) G_GNUC_CONST; DVBSettings* dvb_factory_get_settings (void); gint dvb_settings_get_integer (DVBSettings* self, const char* group_name, const char* key, GError** error); #define DVB_SETTINGS_EPG_SECTION "epg" #define DVB_SETTINGS_SCAN_INTERVAL "scan_interval" -DVBEPGScanner* dvb_epg_scanner_new (DVBDeviceGroup* device); -DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device); +void dvb_epg_scanner_stop (DVBEPGScanner* self); 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); -void dvb_epg_scanner_stop (DVBEPGScanner* self); static void* dvb_epg_scanner_worker (DVBEPGScanner* self); +gboolean dvb_epg_scanner_start (DVBEPGScanner* self); static void* _dvb_epg_scanner_worker_gthread_func (gpointer self); -GType dvb_channel_list_get_type (void); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); -GType dvb_device_get_type (void); +GType dvb_device_get_type (void) G_GNUC_CONST; DVBDevice* dvb_device_group_get_next_free_device (DVBDeviceGroup* self); guint dvb_device_get_Adapter (DVBDevice* self); guint dvb_device_get_Frontend (DVBDevice* self); @@ -282,75 +249,68 @@ static gboolean _dvb_epg_scanner_bus_watch_func_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self); static gboolean dvb_epg_scanner_scan_new_frequency (DVBEPGScanner* self); static gboolean _dvb_epg_scanner_scan_new_frequency_gsource_func (gpointer self); -gboolean dvb_epg_scanner_start (DVBEPGScanner* self); -static gboolean _dvb_epg_scanner_start_gsource_func (gpointer self); -GType dvb_schedule_get_type (void); +DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); +const char* dvb_channel_get_Name (DVBChannel* self); +GType dvb_schedule_get_type (void) G_GNUC_CONST; DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self); +void dvb_schedule_add_all (DVBSchedule* self, GeeCollection* new_events); +static gboolean _dvb_epg_scanner_start_gsource_func (gpointer self); 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 char* name); -DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); DVBEvent* dvb_event_new (void); DVBEvent* dvb_event_construct (GType object_type); -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); -void dvb_value_set_event (GValue* value, gpointer v_object); -gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); gpointer dvb_event_audio_component_ref (gpointer instance); void dvb_event_audio_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_audio_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_audio_component (GValue* value, gpointer v_object); +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_audio_component (const GValue* value); -GType dvb_event_audio_component_get_type (void); +GType dvb_event_audio_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_video_component_ref (gpointer instance); void dvb_event_video_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_video_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_video_component (GValue* value, gpointer v_object); +void dvb_event_value_take_video_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_video_component (const GValue* value); -GType dvb_event_video_component_get_type (void); +GType dvb_event_video_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_teletext_component_ref (gpointer instance); void dvb_event_teletext_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_teletext_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_teletext_component (GValue* value, gpointer v_object); +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); -DVBEventAudioComponent* dvb_event_audio_component_new (void); -DVBEventAudioComponent* dvb_event_audio_component_construct (GType object_type); -DVBEventVideoComponent* dvb_event_video_component_new (void); -DVBEventVideoComponent* dvb_event_video_component_construct (GType object_type); -DVBEventTeletextComponent* dvb_event_teletext_component_new (void); -DVBEventTeletextComponent* dvb_event_teletext_component_construct (GType object_type); -void dvb_schedule_add (DVBSchedule* self, DVBEvent* event); +GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; +static guint dvb_epg_scanner_get_uint_val (const GstStructure* structure, const char* name); +gboolean dvb_event_has_expired (DVBEvent* self); +guint dvb_event_hash (DVBEvent* event); +static guint _dvb_event_hash_ghash_func (void* key); +gboolean dvb_event_equal (DVBEvent* event1, DVBEvent* event2); +static gboolean _dvb_event_equal_gequal_func (void* a, void* b); static GObject * dvb_epg_scanner_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); static void dvb_epg_scanner_finalize (GObject* obj); static int _vala_strcmp0 (const char * str1, const char * str2); -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - +/** + * @device: The device where EPG should be collected from + */ DVBEPGScanner* dvb_epg_scanner_construct (GType object_type, DVBDeviceGroup* device) { - GError * _inner_error_; DVBEPGScanner * self; + GError * _inner_error_ = NULL; g_return_val_if_fail (device != NULL, NULL); - _inner_error_ = NULL; - self = g_object_newv (object_type, 0, NULL); + self = (DVBEPGScanner*) g_object_new (object_type, NULL); self->priv->DeviceGroup = device; if (dvb_epg_scanner_CHECK_EIT_INTERVAL == (-1)) { DVBSettings* settings; - settings = _g_object_ref0 (dvb_factory_get_settings ()); + settings = dvb_factory_get_settings (); { gint _tmp0_; _tmp0_ = dvb_settings_get_integer (settings, DVB_SETTINGS_EPG_SECTION, DVB_SETTINGS_SCAN_INTERVAL, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch18_g_key_file_error; + goto __catch60_g_key_file_error; } _g_object_unref0 (settings); 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); @@ -359,19 +319,19 @@ } dvb_epg_scanner_CHECK_EIT_INTERVAL = _tmp0_ * 60; } - goto __finally18; - __catch18_g_key_file_error: + goto __finally60; + __catch60_g_key_file_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("EPGScanner.vala:66: %s", e->message); + g_critical ("EPGScanner.vala:68: %s", e->message); dvb_epg_scanner_CHECK_EIT_INTERVAL = 15 * 60; _g_error_free0 (e); } } - __finally18: + __finally60: if (_inner_error_ != NULL) { _g_object_unref0 (settings); 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); @@ -389,9 +349,12 @@ } +/** + * Stop collecting EPG data + */ void dvb_epg_scanner_stop (DVBEPGScanner* self) { g_return_if_fail (self != NULL); - g_debug ("EPGScanner.vala:76: Stopping EPG scan for group %u (%d)", dvb_device_group_get_Id (self->priv->DeviceGroup), self->priv->stop_counter); + g_debug ("EPGScanner.vala:78: Stopping EPG scan for group %u (%d)", dvb_device_group_get_Id (self->priv->DeviceGroup), self->priv->stop_counter); if (self->priv->stop_counter == 0) { dvb_epg_scanner_remove_timeouts (self); dvb_epg_scanner_reset (self); @@ -423,7 +386,7 @@ static void* dvb_epg_scanner_worker (DVBEPGScanner* self) { - void* result; + void* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_main_loop_run (self->priv->loop); result = NULL; @@ -438,24 +401,35 @@ static void dvb_epg_scanner_reset (DVBEPGScanner* self) { DVBChannel* c; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - if (self->priv->pipeline != NULL) { - GSource* bus_watch_source; - GstElement* _tmp0_; - bus_watch_source = _g_source_ref0 (g_main_context_find_source_by_id (self->priv->context, self->priv->bus_watch_id)); - if (bus_watch_source != NULL) { - g_source_destroy (bus_watch_source); - self->priv->bus_watch_id = (guint) 0; + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + if (self->priv->pipeline != NULL) { + GSource* bus_watch_source; + GstElement* _tmp0_; + bus_watch_source = _g_source_ref0 (g_main_context_find_source_by_id (self->priv->context, self->priv->bus_watch_id)); + if (bus_watch_source != NULL) { + g_source_destroy (bus_watch_source); + self->priv->bus_watch_id = (guint) 0; + } + gst_element_set_state (self->priv->pipeline, GST_STATE_NULL); + gst_element_get_state (self->priv->pipeline, NULL, NULL, (GstClockTime) (-1)); + self->priv->pipeline = (_tmp0_ = NULL, _gst_object_unref0 (self->priv->pipeline), _tmp0_); + _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)); - self->priv->pipeline = (_tmp0_ = NULL, _gst_object_unref0 (self->priv->pipeline), _tmp0_); - _g_source_unref0 (bus_watch_source); + } + __finally61: + { + 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; } } - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); c = NULL; while (TRUE) { DVBChannel* _tmp1_; @@ -464,57 +438,71 @@ } } g_queue_clear (self->priv->channels); + gee_abstract_map_clear ((GeeAbstractMap*) self->priv->channel_events); _g_object_unref0 (c); } +/** + * Start collection EPG data for all channels + */ static void* _dvb_epg_scanner_worker_gthread_func (gpointer self) { - return dvb_epg_scanner_worker (self); + void* result; + result = dvb_epg_scanner_worker (self); + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; } static gboolean _dvb_epg_scanner_bus_watch_func_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self) { - return dvb_epg_scanner_bus_watch_func (self, bus, message); + gboolean result; + result = dvb_epg_scanner_bus_watch_func (self, bus, message); + return result; } static gboolean _dvb_epg_scanner_scan_new_frequency_gsource_func (gpointer self) { - return dvb_epg_scanner_scan_new_frequency (self); + gboolean result; + result = dvb_epg_scanner_scan_new_frequency (self); + return result; } gboolean dvb_epg_scanner_start (DVBEPGScanner* self) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; GMainLoop* _tmp0_; DVBDevice* device; GSource* _tmp6_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; - g_debug ("EPGScanner.vala:137: Starting EPG scan for group %u (%d)", dvb_device_group_get_Id (self->priv->DeviceGroup), self->priv->stop_counter); + g_debug ("EPGScanner.vala:140: Starting EPG scan for group %u (%d)", dvb_device_group_get_Id (self->priv->DeviceGroup), self->priv->stop_counter); self->priv->loop = (_tmp0_ = g_main_loop_new (self->priv->context, FALSE), _g_main_loop_unref0 (self->priv->loop), _tmp0_); { GThread* _tmp1_; _tmp1_ = g_thread_create (_dvb_epg_scanner_worker_gthread_func, self, TRUE, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch19_g_error; + goto __catch62_g_error; } self->priv->worker_thread = _tmp1_; } - goto __finally19; - __catch19_g_error: + goto __finally62; + __catch62_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("EPGScanner.vala:143: Could not create thread: %s", e->message); + g_critical ("EPGScanner.vala:146: Could not create thread: %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally19: + __finally62: 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_); @@ -546,46 +534,63 @@ _g_object_unref0 (device); return result; } - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - GstBus* bus; + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - char* _tmp2_; - GstElement* _tmp3_; - GstElement* _tmp4_; - GstElement* _tmp5_; - _tmp4_ = (_tmp3_ = gst_parse_launch (_tmp2_ = g_strdup_printf (DVB_EPG_SCANNER_PIPELINE_TEMPLATE, dvb_device_get_Adapter (device), dvb_device_get_Frontend (device)), &_inner_error_), _g_free0 (_tmp2_), _tmp3_); - if (_inner_error_ != NULL) { - goto __catch20_g_error; + GstBus* bus; + { + char* _tmp2_; + GstElement* _tmp3_; + GstElement* _tmp4_; + GstElement* _tmp5_; + _tmp4_ = (_tmp3_ = gst_parse_launch (_tmp2_ = g_strdup_printf (DVB_EPG_SCANNER_PIPELINE_TEMPLATE, dvb_device_get_Adapter (device), dvb_device_get_Frontend (device)), &_inner_error_), _g_free0 (_tmp2_), _tmp3_); + if (_inner_error_ != NULL) { + goto __catch64_g_error; + } + self->priv->pipeline = (_tmp5_ = _tmp4_, _gst_object_unref0 (self->priv->pipeline), _tmp5_); } - self->priv->pipeline = (_tmp5_ = _tmp4_, _gst_object_unref0 (self->priv->pipeline), _tmp5_); - } - goto __finally20; - __catch20_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; + goto __finally64; + __catch64_g_error: { - g_error ("EPGScanner.vala:163: Could not create pipeline: %s", e->message); - result = FALSE; - _g_error_free0 (e); + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("EPGScanner.vala:166: 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; + } + } + __finally64: + if (_inner_error_ != NULL) { + { + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); + } _g_object_unref0 (device); - return result; + 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; } + bus = gst_element_get_bus (self->priv->pipeline); + self->priv->bus_watch_id = gst_bus_add_watch_context (bus, _dvb_epg_scanner_bus_watch_func_gst_bus_func, self, self->priv->context); + _gst_object_unref0 (bus); + } + __finally63: + { + g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); } - __finally20: 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); g_clear_error (&_inner_error_); return FALSE; } - bus = gst_element_get_bus (self->priv->pipeline); - self->priv->bus_watch_id = gst_bus_add_watch_context (bus, _dvb_epg_scanner_bus_watch_func_gst_bus_func, self, self->priv->context); - _gst_object_unref0 (bus); } - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); self->priv->scan_source = (_tmp6_ = g_timeout_source_new_seconds ((guint) DVB_EPG_SCANNER_WAIT_FOR_EIT_DURATION), _g_source_unref0 (self->priv->scan_source), _tmp6_); 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); @@ -595,20 +600,68 @@ } +/** + * Scan the next frequency for EPG data + */ static gboolean _dvb_epg_scanner_start_gsource_func (gpointer self) { - return dvb_epg_scanner_start (self); + gboolean result; + result = dvb_epg_scanner_start (self); + return result; } static gboolean dvb_epg_scanner_scan_new_frequency (DVBEPGScanner* self) { - gboolean result; + gboolean result = FALSE; DVBChannel* channel; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); + { + g_static_rec_mutex_lock (&self->priv->__lock_channel_events); + { + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _sid_it; + _sid_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->channel_events))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint sid; + DVBChannel* channel; + GeeHashSet* list; + if (!gee_iterator_next (_sid_it)) { + break; + } + sid = GPOINTER_TO_UINT (gee_iterator_get (_sid_it)); + channel = dvb_channel_list_get_channel (dvb_device_group_get_Channels (self->priv->DeviceGroup), sid); + if (channel == NULL) { + g_warning ("EPGScanner.vala:190: Could not find channel %u for this device", sid); + _g_object_unref0 (channel); + continue; + } + list = (GeeHashSet*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid)); + g_debug ("EPGScanner.vala:195: Adding %d events of channel %s (%u)", gee_collection_get_size ((GeeCollection*) list), dvb_channel_get_Name (channel), sid); + dvb_schedule_add_all (dvb_channel_get_Schedule (channel), (GeeCollection*) list); + _g_object_unref0 (list); + _g_object_unref0 (channel); + } + _g_object_unref0 (_sid_it); + } + gee_abstract_map_clear ((GeeAbstractMap*) self->priv->channel_events); + } + __finally65: + { + 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; + } + } if (g_queue_is_empty (self->priv->channels)) { - GSource* _tmp0_; - g_debug ("EPGScanner.vala:184: Finished EPG scan for group %u", dvb_device_group_get_Id (self->priv->DeviceGroup)); + GSource* _tmp2_; + g_debug ("EPGScanner.vala:203: Finished EPG scan for group %u", dvb_device_group_get_Id (self->priv->DeviceGroup)); dvb_epg_scanner_reset (self); - self->priv->queue_source = (_tmp0_ = g_timeout_source_new_seconds ((guint) dvb_epg_scanner_CHECK_EIT_INTERVAL), _g_source_unref0 (self->priv->queue_source), _tmp0_); + self->priv->queue_source = (_tmp2_ = g_timeout_source_new_seconds ((guint) dvb_epg_scanner_CHECK_EIT_INTERVAL), _g_source_unref0 (self->priv->queue_source), _tmp2_); 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); result = FALSE; @@ -616,57 +669,76 @@ } channel = (DVBChannel*) g_queue_pop_head (self->priv->channels); dvb_schedule_remove_expired_events (dvb_channel_get_Schedule (channel)); - g_static_rec_mutex_lock (&self->priv->__lock_pipeline); { - GstElement* dvbsrc; - gst_element_set_state (self->priv->pipeline, GST_STATE_READY); - dvbsrc = gst_bin_get_by_name (GST_BIN (self->priv->pipeline), "dvbsrc"); - dvb_channel_setup_dvb_source (channel, dvbsrc); - gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); - _gst_object_unref0 (dvbsrc); + g_static_rec_mutex_lock (&self->priv->__lock_pipeline); + { + GstElement* dvbsrc; + gst_element_set_state (self->priv->pipeline, GST_STATE_READY); + dvbsrc = gst_bin_get_by_name (GST_BIN (self->priv->pipeline), "dvbsrc"); + dvb_channel_setup_dvb_source (channel, dvbsrc); + gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING); + _gst_object_unref0 (dvbsrc); + } + __finally66: + { + 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); + g_clear_error (&_inner_error_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_pipeline); result = TRUE; _g_object_unref0 (channel); return result; } +static gpointer _gst_structure_copy0 (gpointer self) { + return self ? gst_structure_copy (self) : NULL; +} + + static gboolean dvb_epg_scanner_bus_watch_func (DVBEPGScanner* self, GstBus* bus, GstMessage* message) { - gboolean result; + gboolean result = FALSE; 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) { case GST_MESSAGE_ELEMENT: { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "dvb-read-failure") == 0) { - g_critical ("EPGScanner.vala:214: Could not read from DVB device"); + GstStructure* structure; + structure = _gst_structure_copy0 (gst_message_get_structure (message)); + if (_vala_strcmp0 (gst_structure_get_name (structure), "dvb-read-failure") == 0) { + g_critical ("EPGScanner.vala:235: Could not read from DVB device"); dvb_epg_scanner_stop (self); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "eit") == 0) { - dvb_epg_scanner_on_eit_structure (self, message->structure); + if (_vala_strcmp0 (gst_structure_get_name (structure), "eit") == 0) { + dvb_epg_scanner_on_eit_structure (self, structure); } } + _gst_structure_free0 (structure); break; } case GST_MESSAGE_ERROR: { GError* gerror; char* debug; - char* _tmp3_; - char* _tmp2_ = NULL; - GError* _tmp1_; GError* _tmp0_ = NULL; + GError* _tmp1_; + char* _tmp2_ = NULL; + char* _tmp3_; gerror = NULL; debug = NULL; (gst_message_parse_error (message, &_tmp0_, &_tmp2_), gerror = (_tmp1_ = _tmp0_, _g_error_free0 (gerror), _tmp1_)); debug = (_tmp3_ = _tmp2_, _g_free0 (debug), _tmp3_); - g_critical ("EPGScanner.vala:225: %s %s", gerror->message, debug); + g_critical ("EPGScanner.vala:246: %s %s", gerror->message, debug); dvb_epg_scanner_stop (self); result = FALSE; - _g_error_free0 (gerror); _g_free0 (debug); + _g_error_free0 (gerror); return result; } default: @@ -679,18 +751,17 @@ } -static gpointer _dvb_event_audio_component_ref0 (gpointer self) { - return self ? dvb_event_audio_component_ref (self) : NULL; -} - - -static gpointer _dvb_event_video_component_ref0 (gpointer self) { - return self ? dvb_event_video_component_ref (self) : NULL; +static guint _dvb_event_hash_ghash_func (void* key) { + guint result; + result = dvb_event_hash (key); + return result; } -static gpointer _dvb_event_teletext_component_ref0 (gpointer self) { - return self ? dvb_event_teletext_component_ref (self) : NULL; +static gboolean _dvb_event_equal_gequal_func (void* a, void* b) { + gboolean result; + result = dvb_event_equal (a, b); + return result; } @@ -699,6 +770,7 @@ guint size; GValue val = {0}; const GstStructure* event; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); events = *gst_structure_get_value (structure, "events"); @@ -708,154 +780,112 @@ size = gst_value_list_get_size (&events); event = NULL; { - guint i; - i = (guint) 0; + g_static_rec_mutex_lock (&self->priv->__lock_channel_events); { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - guint sid; - DVBChannel* channel; - guint event_id; - DVBEvent* event_class; - char* name; - gboolean _tmp1_ = FALSE; - char* desc; - gboolean _tmp3_ = FALSE; - char* ext_desc; - gboolean _tmp5_ = FALSE; - gboolean free_ca = FALSE; - GValue components; - guint components_len; - GValue comp_val = {0}; - const GstStructure* component; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < size)) { - break; - } - val = *gst_value_list_get_value (&events, i); - event = gst_value_get_structure (&val); - sid = dvb_epg_scanner_get_uint_val (structure, "service-id"); - channel = dvb_channel_list_get_channel (dvb_device_group_get_Channels (self->priv->DeviceGroup), sid); - if (channel == NULL) { - g_warning ("EPGScanner.vala:252: Could not find channel %u for this device", sid); - _g_object_unref0 (channel); - return; - } - event_id = dvb_epg_scanner_get_uint_val (event, "event-id"); - event_class = dvb_event_new (); - event_class->id = event_id; - event_class->year = dvb_epg_scanner_get_uint_val (event, "year"); - event_class->month = dvb_epg_scanner_get_uint_val (event, "month"); - event_class->day = dvb_epg_scanner_get_uint_val (event, "day"); - event_class->hour = dvb_epg_scanner_get_uint_val (event, "hour"); - event_class->minute = dvb_epg_scanner_get_uint_val (event, "minute"); - event_class->second = dvb_epg_scanner_get_uint_val (event, "second"); - event_class->duration = dvb_epg_scanner_get_uint_val (event, "duration"); - event_class->running_status = dvb_epg_scanner_get_uint_val (event, "running-status"); - name = g_strdup (gst_structure_get_string (event, "name")); - if (name != NULL) { - _tmp1_ = g_utf8_validate (name, -1, NULL); - } else { - _tmp1_ = FALSE; - } - if (_tmp1_) { - char* _tmp2_; - event_class->name = (_tmp2_ = g_strdup (name), _g_free0 (event_class->name), _tmp2_); - } - desc = g_strdup (gst_structure_get_string (event, "description")); - if (desc != NULL) { - _tmp3_ = g_utf8_validate (desc, -1, NULL); - } else { - _tmp3_ = FALSE; - } - if (_tmp3_) { - char* _tmp4_; - event_class->description = (_tmp4_ = g_strdup (desc), _g_free0 (event_class->description), _tmp4_); - } - ext_desc = g_strdup (gst_structure_get_string (event, "extended-text")); - if (ext_desc != NULL) { - _tmp5_ = g_utf8_validate (ext_desc, -1, NULL); - } else { - _tmp5_ = FALSE; - } - if (_tmp5_) { - char* _tmp6_; - event_class->extended_description = (_tmp6_ = g_strdup (ext_desc), _g_free0 (event_class->extended_description), _tmp6_); - } - gst_structure_get_boolean (event, "free-ca-mode", &free_ca); - event_class->free_ca_mode = free_ca; - components = *gst_structure_get_value (event, "components"); - components_len = gst_value_list_get_size (&components); - component = NULL; + { + guint i; + i = (guint) 0; { - guint j; - j = (guint) 0; - { - gboolean _tmp7_; - _tmp7_ = TRUE; - while (TRUE) { - if (!_tmp7_) { - j++; - } - _tmp7_ = FALSE; - if (!(j < components_len)) { - break; - } - comp_val = *gst_value_list_get_value (&components, j); - component = gst_value_get_structure (&comp_val); - if (_vala_strcmp0 (gst_structure_get_name (component), "audio") == 0) { - DVBEventAudioComponent* audio; - char* _tmp8_; - audio = dvb_event_audio_component_new (); - audio->type = (_tmp8_ = g_strdup (gst_structure_get_string (component, "type")), _g_free0 (audio->type), _tmp8_); - event_class->audio_components = g_slist_append (event_class->audio_components, _dvb_event_audio_component_ref0 (audio)); - _dvb_event_audio_component_unref0 (audio); - } else { - if (_vala_strcmp0 (gst_structure_get_name (component), "video") == 0) { - DVBEventVideoComponent* video; - gboolean highdef = FALSE; - char* _tmp9_; - gint freq = 0; - video = dvb_event_video_component_new (); - gst_structure_get_boolean (component, "high-definition", &highdef); - video->high_definition = highdef; - video->aspect_ratio = (_tmp9_ = g_strdup (gst_structure_get_string (component, "high-definition")), _g_free0 (video->aspect_ratio), _tmp9_); - gst_structure_get_int (component, "frequency", &freq); - video->frequency = freq; - event_class->video_components = g_slist_append (event_class->video_components, _dvb_event_video_component_ref0 (video)); - _dvb_event_video_component_unref0 (video); - } else { - if (_vala_strcmp0 (gst_structure_get_name (component), "teletext") == 0) { - DVBEventTeletextComponent* teletext; - char* _tmp10_; - teletext = dvb_event_teletext_component_new (); - teletext->type = (_tmp10_ = g_strdup (gst_structure_get_string (component, "type")), _g_free0 (teletext->type), _tmp10_); - event_class->teletext_components = g_slist_append (event_class->teletext_components, _dvb_event_teletext_component_ref0 (teletext)); - _dvb_event_teletext_component_unref0 (teletext); - } - } - } + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + DVBEvent* event_class; + char* name; + gboolean _tmp1_ = FALSE; + char* desc; + gboolean _tmp3_ = FALSE; + char* ext_desc; + gboolean _tmp5_ = FALSE; + gboolean free_ca = FALSE; + guint sid; + GeeHashSet* list; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < size)) { + break; + } + val = *gst_value_list_get_value (&events, i); + event = gst_value_get_structure (&val); + event_class = dvb_event_new (); + event_class->id = dvb_epg_scanner_get_uint_val (event, "event-id"); + event_class->year = dvb_epg_scanner_get_uint_val (event, "year"); + event_class->month = dvb_epg_scanner_get_uint_val (event, "month"); + event_class->day = dvb_epg_scanner_get_uint_val (event, "day"); + event_class->hour = dvb_epg_scanner_get_uint_val (event, "hour"); + event_class->minute = dvb_epg_scanner_get_uint_val (event, "minute"); + event_class->second = dvb_epg_scanner_get_uint_val (event, "second"); + event_class->duration = dvb_epg_scanner_get_uint_val (event, "duration"); + if (dvb_event_has_expired (event_class)) { + _dvb_event_unref0 (event_class); + continue; + } + event_class->running_status = dvb_epg_scanner_get_uint_val (event, "running-status"); + name = g_strdup (gst_structure_get_string (event, "name")); + if (name != NULL) { + _tmp1_ = g_utf8_validate (name, -1, NULL); + } else { + _tmp1_ = FALSE; + } + if (_tmp1_) { + char* _tmp2_; + event_class->name = (_tmp2_ = g_strdup (name), _g_free0 (event_class->name), _tmp2_); } + desc = g_strdup (gst_structure_get_string (event, "description")); + if (desc != NULL) { + _tmp3_ = g_utf8_validate (desc, -1, NULL); + } else { + _tmp3_ = FALSE; + } + if (_tmp3_) { + char* _tmp4_; + event_class->description = (_tmp4_ = g_strdup (desc), _g_free0 (event_class->description), _tmp4_); + } + ext_desc = g_strdup (gst_structure_get_string (event, "extended-text")); + if (ext_desc != NULL) { + _tmp5_ = g_utf8_validate (ext_desc, -1, NULL); + } else { + _tmp5_ = FALSE; + } + if (_tmp5_) { + char* _tmp6_; + event_class->extended_description = (_tmp6_ = g_strdup (ext_desc), _g_free0 (event_class->extended_description), _tmp6_); + } + gst_structure_get_boolean (event, "free-ca-mode", &free_ca); + event_class->free_ca_mode = free_ca; + sid = dvb_epg_scanner_get_uint_val (structure, "service-id"); + if (!gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid))) { + GeeHashSet* _tmp7_; + gee_abstract_map_set ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid), _tmp7_ = gee_hash_set_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, _dvb_event_hash_ghash_func, _dvb_event_equal_gequal_func)); + _g_object_unref0 (_tmp7_); + } + list = (GeeHashSet*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->channel_events, GUINT_TO_POINTER (sid)); + 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); } } - dvb_schedule_add (dvb_channel_get_Schedule (channel), event_class); - _g_object_unref0 (channel); - _dvb_event_unref0 (event_class); - _g_free0 (name); - _g_free0 (desc); - _g_free0 (ext_desc); } } + __finally67: + { + 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; + } } } static guint dvb_epg_scanner_get_uint_val (const GstStructure* structure, const char* name) { - guint result; + guint result = 0U; guint val = 0U; g_return_val_if_fail (structure != NULL, 0U); g_return_val_if_fail (name != NULL, 0U); @@ -875,9 +905,11 @@ { GQueue* _tmp0_; GMainContext* _tmp1_; + GeeHashMap* _tmp2_; self->priv->channels = (_tmp0_ = g_queue_new (), _g_queue_free0 (self->priv->channels), _tmp0_); self->priv->stop_counter = 0; self->priv->context = (_tmp1_ = g_main_context_new (), _g_main_context_unref0 (self->priv->context), _tmp1_); + self->priv->channel_events = (_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), _tmp2_); } return obj; } @@ -895,6 +927,7 @@ static void dvb_epg_scanner_instance_init (DVBEPGScanner * self) { self->priv = DVB_EPG_SCANNER_GET_PRIVATE (self); g_static_rec_mutex_init (&self->priv->__lock_pipeline); + g_static_rec_mutex_init (&self->priv->__lock_channel_events); } @@ -908,17 +941,21 @@ _g_source_unref0 (self->priv->queue_source); _g_main_context_unref0 (self->priv->context); _g_main_loop_unref0 (self->priv->loop); + g_static_rec_mutex_free (&self->priv->__lock_channel_events); + _g_object_unref0 (self->priv->channel_events); G_OBJECT_CLASS (dvb_epg_scanner_parent_class)->finalize (obj); } GType dvb_epg_scanner_get_type (void) { - static GType dvb_epg_scanner_type_id = 0; - if (dvb_epg_scanner_type_id == 0) { + static volatile gsize dvb_epg_scanner_type_id__volatile = 0; + if (g_once_init_enter (&dvb_epg_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBEPGScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_epg_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEPGScanner), 0, (GInstanceInitFunc) dvb_epg_scanner_instance_init, NULL }; + GType dvb_epg_scanner_type_id; dvb_epg_scanner_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBEPGScanner", &g_define_type_info, 0); + g_once_init_leave (&dvb_epg_scanner_type_id__volatile, dvb_epg_scanner_type_id); } - return dvb_epg_scanner_type_id; + return dvb_epg_scanner_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/EPGScanner.vala gnome-dvb-daemon-0.1.21/src/EPGScanner.vala --- gnome-dvb-daemon-0.1.16/src/EPGScanner.vala 2010-02-18 20:05:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/EPGScanner.vala 2010-08-09 13:33:48.000000000 +0000 @@ -44,11 +44,13 @@ private MainLoop loop; private unowned Thread worker_thread; private uint bus_watch_id; + private HashMap> channel_events; construct { this.channels = new GLib.Queue (); this.stop_counter = 0; this.context = new MainContext (); + this.channel_events = new HashMap> (); } /** @@ -128,6 +130,7 @@ // Vala unref's Channel instances for us } this.channels.clear (); + this.channel_events.clear (); } /** @@ -160,7 +163,7 @@ this.pipeline = Gst.parse_launch (PIPELINE_TEMPLATE.printf ( device.Adapter, device.Frontend)); } catch (Error e) { - error ("Could not create pipeline: %s", e.message); + critical ("Could not create pipeline: %s", e.message); return false; } @@ -180,6 +183,22 @@ * Scan the next frequency for EPG data */ private bool scan_new_frequency () { + lock (this.channel_events) { + foreach (uint sid in this.channel_events.keys) { + Channel channel = this.DeviceGroup.Channels.get_channel (sid); + if (channel == null) { + warning ("Could not find channel %u for this device", sid); + continue; + } + HashSet list = this.channel_events.get (sid); + + debug ("Adding %d events of channel %s (%u)", + list.size, channel.Name, sid); + channel.Schedule.add_all (list); + } + this.channel_events.clear (); + } + if (this.channels.is_empty ()) { debug ("Finished EPG scan for group %u", this.DeviceGroup.Id); @@ -193,9 +212,10 @@ Channel channel = this.channels.pop_head (); channel.Schedule.remove_expired_events (); - - //debug ("Scanning channel %s", channel.to_string ()); - +/* + debug ("Scanning channel %s (%u left)", + channel.Name, this.channels.get_length ()); +*/ lock (this.pipeline) { this.pipeline.set_state (Gst.State.READY); Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc"); @@ -210,11 +230,12 @@ private bool bus_watch_func (Gst.Bus bus, Gst.Message message) { switch (message.type) { case Gst.MessageType.ELEMENT: - if (message.structure.get_name() == "dvb-read-failure") { + Gst.Structure structure = message.get_structure (); + if (structure.get_name() == "dvb-read-failure") { critical ("Could not read from DVB device"); this.stop (); - } else if (message.structure.get_name() == "eit") { - this.on_eit_structure (message.structure); + } else if (structure.get_name() == "eit") { + this.on_eit_structure (structure); } break; @@ -242,83 +263,93 @@ Gst.Value val; weak Gst.Structure event; // Iterate over events - for (uint i=0; i (Event.hash, Event.equal)); + } + HashSet list = this.channel_events.get (sid); + + list.add (event_class); } + } + } +/* + private static void add_components (Gst.Value components, Event event_class) { + uint components_len = components.list_get_size (); - uint event_id = get_uint_val (event, "event-id"); - - var event_class = new Event (); - event_class.id = event_id; - event_class.year = get_uint_val (event, "year"); - event_class.month = get_uint_val (event, "month"); - event_class.day = get_uint_val (event, "day"); - event_class.hour = get_uint_val (event, "hour"); - event_class.minute = get_uint_val (event, "minute"); - event_class.second = get_uint_val (event, "second"); - event_class.duration = get_uint_val (event, "duration"); - event_class.running_status = get_uint_val (event, "running-status"); - string name = event.get_string ("name"); - if (name != null && name.validate ()) - event_class.name = name; - string desc = event.get_string ("description"); - if (desc != null && desc.validate ()) - event_class.description = desc; - string ext_desc = event.get_string ("extended-text"); - if (ext_desc != null && ext_desc.validate ()) - event_class.extended_description = ext_desc; - bool free_ca; - event.get_boolean ("free-ca-mode", out free_ca); - event_class.free_ca_mode = free_ca; - - Gst.Value components = event.get_value ("components"); - uint components_len = components.list_get_size (); + Gst.Value comp_val; + weak Gst.Structure component; + for (uint j=0; jid; + return result; +} + + DVBEventAudioComponent* dvb_event_audio_component_construct (GType object_type) { DVBEventAudioComponent* self; self = (DVBEventAudioComponent*) g_type_create_instance (object_type); @@ -584,6 +614,23 @@ } +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object) { + DVBEventAudioComponent* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_EVENT_TYPE_AUDIO_COMPONENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_EVENT_TYPE_AUDIO_COMPONENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_event_audio_component_unref (old); + } +} + + static void dvb_event_audio_component_class_init (DVBEventAudioComponentClass * klass) { dvb_event_audio_component_parent_class = g_type_class_peek_parent (klass); DVB_EVENT_AUDIO_COMPONENT_CLASS (klass)->finalize = dvb_event_audio_component_finalize; @@ -603,14 +650,16 @@ GType dvb_event_audio_component_get_type (void) { - static GType dvb_event_audio_component_type_id = 0; - if (dvb_event_audio_component_type_id == 0) { + static volatile gsize dvb_event_audio_component_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_audio_component_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_event_value_audio_component_init, dvb_event_value_audio_component_free_value, dvb_event_value_audio_component_copy_value, dvb_event_value_audio_component_peek_pointer, "p", dvb_event_value_audio_component_collect_value, "p", dvb_event_value_audio_component_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBEventAudioComponentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_event_audio_component_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEventAudioComponent), 0, (GInstanceInitFunc) dvb_event_audio_component_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_event_audio_component_type_id; dvb_event_audio_component_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBEventAudioComponent", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_event_audio_component_type_id__volatile, dvb_event_audio_component_type_id); } - return dvb_event_audio_component_type_id; + return dvb_event_audio_component_type_id__volatile; } @@ -737,6 +786,23 @@ } +void dvb_event_value_take_video_component (GValue* value, gpointer v_object) { + DVBEventVideoComponent* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_EVENT_TYPE_VIDEO_COMPONENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_EVENT_TYPE_VIDEO_COMPONENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_event_video_component_unref (old); + } +} + + static void dvb_event_video_component_class_init (DVBEventVideoComponentClass * klass) { dvb_event_video_component_parent_class = g_type_class_peek_parent (klass); DVB_EVENT_VIDEO_COMPONENT_CLASS (klass)->finalize = dvb_event_video_component_finalize; @@ -756,14 +822,16 @@ GType dvb_event_video_component_get_type (void) { - static GType dvb_event_video_component_type_id = 0; - if (dvb_event_video_component_type_id == 0) { + static volatile gsize dvb_event_video_component_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_video_component_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_event_value_video_component_init, dvb_event_value_video_component_free_value, dvb_event_value_video_component_copy_value, dvb_event_value_video_component_peek_pointer, "p", dvb_event_value_video_component_collect_value, "p", dvb_event_value_video_component_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBEventVideoComponentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_event_video_component_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEventVideoComponent), 0, (GInstanceInitFunc) dvb_event_video_component_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_event_video_component_type_id; dvb_event_video_component_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBEventVideoComponent", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_event_video_component_type_id__volatile, dvb_event_video_component_type_id); } - return dvb_event_video_component_type_id; + return dvb_event_video_component_type_id__volatile; } @@ -890,6 +958,23 @@ } +void dvb_event_value_take_teletext_component (GValue* value, gpointer v_object) { + DVBEventTeletextComponent* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_EVENT_TYPE_TELETEXT_COMPONENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_EVENT_TYPE_TELETEXT_COMPONENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_event_teletext_component_unref (old); + } +} + + static void dvb_event_teletext_component_class_init (DVBEventTeletextComponentClass * klass) { dvb_event_teletext_component_parent_class = g_type_class_peek_parent (klass); DVB_EVENT_TELETEXT_COMPONENT_CLASS (klass)->finalize = dvb_event_teletext_component_finalize; @@ -909,14 +994,16 @@ GType dvb_event_teletext_component_get_type (void) { - static GType dvb_event_teletext_component_type_id = 0; - if (dvb_event_teletext_component_type_id == 0) { + static volatile gsize dvb_event_teletext_component_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_teletext_component_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_event_value_teletext_component_init, dvb_event_value_teletext_component_free_value, dvb_event_value_teletext_component_copy_value, dvb_event_value_teletext_component_peek_pointer, "p", dvb_event_value_teletext_component_collect_value, "p", dvb_event_value_teletext_component_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBEventTeletextComponentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_event_teletext_component_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEventTeletextComponent), 0, (GInstanceInitFunc) dvb_event_teletext_component_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_event_teletext_component_type_id; dvb_event_teletext_component_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBEventTeletextComponent", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_event_teletext_component_type_id__volatile, dvb_event_teletext_component_type_id); } - return dvb_event_teletext_component_type_id; + return dvb_event_teletext_component_type_id__volatile; } @@ -1031,6 +1118,23 @@ } +void dvb_value_take_event (GValue* value, gpointer v_object) { + DVBEvent* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_TYPE_EVENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_TYPE_EVENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_event_unref (old); + } +} + + static void dvb_event_class_init (DVBEventClass * klass) { dvb_event_parent_class = g_type_class_peek_parent (klass); DVB_EVENT_CLASS (klass)->finalize = dvb_event_finalize; @@ -1054,15 +1158,20 @@ } +/** + * Represents an EPG event (i.e. a show with all its information) + */ GType dvb_event_get_type (void) { - static GType dvb_event_type_id = 0; - if (dvb_event_type_id == 0) { + static volatile gsize dvb_event_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_value_event_init, dvb_value_event_free_value, dvb_value_event_copy_value, dvb_value_event_peek_pointer, "p", dvb_value_event_collect_value, "p", dvb_value_event_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBEventClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_event_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEvent), 0, (GInstanceInitFunc) dvb_event_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_event_type_id; dvb_event_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBEvent", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_event_type_id__volatile, dvb_event_type_id); } - return dvb_event_type_id; + return dvb_event_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Event.vala gnome-dvb-daemon-0.1.21/src/Event.vala --- gnome-dvb-daemon-0.1.16/src/Event.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Event.vala 2010-05-19 19:17:51.000000000 +0000 @@ -32,7 +32,7 @@ public static const uint RUNNING_STATUS_STARTS_SOON = 2; public static const uint RUNNING_STATUS_PAUSING = 3; public static const uint RUNNING_STATUS_RUNNING = 4; - + public uint id; /* Time is stored in UTC */ public uint year; @@ -133,7 +133,7 @@ /** * @returns: UNIX time stamp */ - private time_t get_end_timestamp () { + public time_t get_end_timestamp () { Time end_time = Utils.create_utc_time ((int)this.year, (int)this.month, (int)this.day, (int)this.hour, (int)this.minute, (int)this.second); @@ -179,6 +179,10 @@ return (event1->id == event2->id); } + + public static uint hash (Event* event) { + return event->id; + } public class AudioComponent { public string type; diff -Nru gnome-dvb-daemon-0.1.16/src/Factory.c gnome-dvb-daemon-0.1.21/src/Factory.c --- gnome-dvb-daemon-0.1.16/src/Factory.c 2010-02-23 13:10:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Factory.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Factory.c generated by valac, the Vala compiler +/* Factory.c generated by valac 0.9.7, the Vala compiler * generated from Factory.vala, do not modify */ /* @@ -67,8 +67,6 @@ typedef struct _DVBSettings DVBSettings; typedef struct _DVBSettingsClass DVBSettingsClass; -#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_DATABASE_TYPE_TIMERS_STORE (dvb_database_timers_store_get_type ()) #define DVB_DATABASE_TIMERS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_TIMERS_STORE, DVBdatabaseTimersStore)) @@ -97,6 +95,8 @@ typedef struct _DVBTimer DVBTimer; typedef struct _DVBTimerClass DVBTimerClass; +#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_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)) @@ -202,6 +202,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -215,6 +216,7 @@ gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -235,49 +237,54 @@ static GStaticRecMutex dvb_factory_settings_mutex = {0}; void dvb_factory_free (DVBFactory* self); -GType dvb_database_sqlite_sqlite_database_get_type (void); -GType dvb_database_sqlite_sqlite_config_timers_store_get_type (void); -GType dvb_database_sqlite_sqlite_epg_store_get_type (void); -GType dvb_settings_get_type (void); +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; +GType dvb_settings_get_type (void) G_GNUC_CONST; +GType dvb_device_group_get_type (void) G_GNUC_CONST; +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); DVBdatabasesqliteSqliteConfigTimersStore* dvb_database_sqlite_sqlite_config_timers_store_new (void); DVBdatabasesqliteSqliteConfigTimersStore* dvb_database_sqlite_sqlite_config_timers_store_construct (GType object_type); -GQuark dvb_database_sql_error_quark (void); void dvb_database_sqlite_sqlite_database_open (DVBdatabasesqliteSqliteDatabase* self, GError** error); -GType dvb_device_group_get_type (void); -GType dvb_timer_get_type (void); -GType dvb_database_timers_store_get_type (void); -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); -GType dvb_device_get_type (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (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); -DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_new (void); -DVBdatabasesqliteSqliteEPGStore* dvb_database_sqlite_sqlite_epg_store_construct (GType object_type); 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); -GType dvb_database_epg_store_get_type (void); +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); +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_settings_new (void); DVBSettings* dvb_settings_construct (GType object_type); gboolean dvb_settings_load (DVBSettings* self); -DVBSettings* dvb_factory_get_settings (void); -gboolean dvb_settings_save (DVBSettings* self); void dvb_factory_shutdown (void); +gboolean dvb_settings_save (DVBSettings* self); DVBFactory* dvb_factory_new (void); DVBFactory* dvb_factory_new (void); static void dvb_factory_instance_init (DVBFactory * self); +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + DVBdatabaseTimersStore* dvb_factory_get_timers_store (void) { - DVBdatabaseTimersStore* result; - GError * _inner_error_; - _inner_error_ = NULL; + DVBdatabaseTimersStore* result = NULL; + GError * _inner_error_ = NULL; g_static_rec_mutex_lock (&dvb_factory_store_mutex); if (dvb_factory_store == NULL) { DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_; @@ -286,15 +293,15 @@ 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 __catch21_dvb_database_sql_error; + goto __catch68_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; } } - goto __finally21; - __catch21_dvb_database_sql_error: + goto __finally68; + __catch68_dvb_database_sql_error: { GError * e; e = _inner_error_; @@ -306,7 +313,7 @@ _g_error_free0 (e); } } - __finally21: + __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_); @@ -314,15 +321,14 @@ } } g_static_rec_mutex_unlock (&dvb_factory_store_mutex); - result = (DVBdatabaseTimersStore*) dvb_factory_store; + result = _g_object_ref0 ((DVBdatabaseTimersStore*) dvb_factory_store); return result; } DVBdatabaseConfigStore* dvb_factory_get_config_store (void) { - DVBdatabaseConfigStore* result; - GError * _inner_error_; - _inner_error_ = NULL; + DVBdatabaseConfigStore* result = NULL; + GError * _inner_error_ = NULL; g_static_rec_mutex_lock (&dvb_factory_store_mutex); if (dvb_factory_store == NULL) { DVBdatabasesqliteSqliteConfigTimersStore* _tmp0_; @@ -331,15 +337,15 @@ 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 __catch22_dvb_database_sql_error; + goto __catch69_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; } } - goto __finally22; - __catch22_dvb_database_sql_error: + goto __finally69; + __catch69_dvb_database_sql_error: { GError * e; e = _inner_error_; @@ -351,7 +357,7 @@ _g_error_free0 (e); } } - __finally22: + __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_); @@ -359,15 +365,14 @@ } } g_static_rec_mutex_unlock (&dvb_factory_store_mutex); - result = (DVBdatabaseConfigStore*) dvb_factory_store; + result = _g_object_ref0 ((DVBdatabaseConfigStore*) dvb_factory_store); return result; } DVBdatabaseEPGStore* dvb_factory_get_epg_store (void) { - DVBdatabaseEPGStore* result; - GError * _inner_error_; - _inner_error_ = NULL; + DVBdatabaseEPGStore* result = NULL; + GError * _inner_error_ = NULL; g_static_rec_mutex_lock (&dvb_factory_epgstore_mutex); if (dvb_factory_epgstore == NULL) { DVBdatabasesqliteSqliteEPGStore* _tmp0_; @@ -376,15 +381,15 @@ 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 __catch23_dvb_database_sql_error; + goto __catch70_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; } } - goto __finally23; - __catch23_dvb_database_sql_error: + goto __finally70; + __catch70_dvb_database_sql_error: { GError * e; e = _inner_error_; @@ -396,7 +401,7 @@ _g_error_free0 (e); } } - __finally23: + __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_); @@ -404,13 +409,13 @@ } } g_static_rec_mutex_unlock (&dvb_factory_epgstore_mutex); - result = (DVBdatabaseEPGStore*) dvb_factory_epgstore; + result = _g_object_ref0 ((DVBdatabaseEPGStore*) dvb_factory_epgstore); return result; } DVBSettings* dvb_factory_get_settings (void) { - DVBSettings* result; + DVBSettings* result = NULL; g_static_rec_mutex_lock (&dvb_factory_settings_mutex); if (dvb_factory_settings == NULL) { DVBSettings* _tmp0_; @@ -418,7 +423,7 @@ dvb_settings_load (dvb_factory_settings); } g_static_rec_mutex_unlock (&dvb_factory_settings_mutex); - result = dvb_factory_settings; + result = _g_object_ref0 (dvb_factory_settings); return result; } diff -Nru gnome-dvb-daemon-0.1.16/src/Factory.vala gnome-dvb-daemon-0.1.21/src/Factory.vala --- gnome-dvb-daemon-0.1.16/src/Factory.vala 2009-09-24 14:00:40.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Factory.vala 2010-05-07 16:11:33.000000000 +0000 @@ -33,7 +33,7 @@ private static DVB.Settings settings; private static StaticRecMutex settings_mutex = StaticRecMutex (); - public static weak TimersStore get_timers_store () { + public static TimersStore get_timers_store () { store_mutex.lock (); if (store == null) { store = new SqliteConfigTimersStore (); @@ -48,7 +48,7 @@ return store; } - public static weak ConfigStore get_config_store () { + public static ConfigStore get_config_store () { store_mutex.lock (); if (store == null) { store = new SqliteConfigTimersStore (); @@ -63,7 +63,7 @@ return store; } - public static weak EPGStore get_epg_store () { + public static EPGStore get_epg_store () { epgstore_mutex.lock (); if (epgstore == null) { epgstore = new SqliteEPGStore (); @@ -78,7 +78,7 @@ return epgstore; } - public static weak DVB.Settings get_settings () { + public static DVB.Settings get_settings () { settings_mutex.lock (); if (settings == null) { settings = new DVB.Settings (); diff -Nru gnome-dvb-daemon-0.1.16/src/io/ChannelListReader.c gnome-dvb-daemon-0.1.21/src/io/ChannelListReader.c --- gnome-dvb-daemon-0.1.16/src/io/ChannelListReader.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/ChannelListReader.c 2010-08-21 20:42:32.000000000 +0000 @@ -0,0 +1,875 @@ +/* ChannelListReader.c generated by valac 0.9.7, the Vala compiler + * generated from ChannelListReader.vala, do not modify */ + +/* + * Copyright (C) 2008-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 + + +#define DVB_IO_TYPE_CHANNEL_LIST_READER (dvb_io_channel_list_reader_get_type ()) +#define DVB_IO_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReader)) +#define DVB_IO_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReaderClass)) +#define DVB_IO_IS_CHANNEL_LIST_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER)) +#define DVB_IO_IS_CHANNEL_LIST_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_CHANNEL_LIST_READER)) +#define DVB_IO_CHANNEL_LIST_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReaderClass)) + +typedef struct _DVBioChannelListReader DVBioChannelListReader; +typedef struct _DVBioChannelListReaderClass DVBioChannelListReaderClass; +typedef struct _DVBioChannelListReaderPrivate DVBioChannelListReaderPrivate; + +#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_ADAPTER_TYPE (dvb_adapter_type_get_type ()) +#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_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 DVB_TYPE_TERRESTRIAL_CHANNEL (dvb_terrestrial_channel_get_type ()) +#define DVB_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannel)) +#define DVB_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) +#define DVB_IS_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL)) +#define DVB_IS_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL)) +#define DVB_TERRESTRIAL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) + +typedef struct _DVBTerrestrialChannel DVBTerrestrialChannel; +typedef struct _DVBTerrestrialChannelClass DVBTerrestrialChannelClass; + +#define DVB_TYPE_SATELLITE_CHANNEL (dvb_satellite_channel_get_type ()) +#define DVB_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannel)) +#define DVB_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) +#define DVB_IS_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SATELLITE_CHANNEL)) +#define DVB_IS_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SATELLITE_CHANNEL)) +#define DVB_SATELLITE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) + +typedef struct _DVBSatelliteChannel DVBSatelliteChannel; +typedef struct _DVBSatelliteChannelClass DVBSatelliteChannelClass; + +#define DVB_TYPE_CABLE_CHANNEL (dvb_cable_channel_get_type ()) +#define DVB_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannel)) +#define DVB_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) +#define DVB_IS_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CABLE_CHANNEL)) +#define DVB_IS_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CABLE_CHANNEL)) +#define DVB_CABLE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) + +typedef struct _DVBCableChannel DVBCableChannel; +typedef struct _DVBCableChannelClass DVBCableChannelClass; + +#define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) + +#define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) + +#define DVB_TYPE_DVB_SRC_CODE_RATE (dvb_dvb_src_code_rate_get_type ()) + +#define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) + +#define DVB_TYPE_DVB_SRC_TRANSMISSION_MODE (dvb_dvb_src_transmission_mode_get_type ()) + +#define DVB_TYPE_DVB_SRC_GUARD (dvb_dvb_src_guard_get_type ()) + +#define DVB_TYPE_DVB_SRC_HIERARCHY (dvb_dvb_src_hierarchy_get_type ()) + +struct _DVBioChannelListReader { + GObject parent_instance; + DVBioChannelListReaderPrivate * priv; +}; + +struct _DVBioChannelListReaderClass { + GObjectClass parent_class; +}; + +typedef enum { + DVB_ADAPTER_TYPE_UNKNOWN, + DVB_ADAPTER_TYPE_DVB_T, + DVB_ADAPTER_TYPE_DVB_S, + DVB_ADAPTER_TYPE_DVB_C +} DVBAdapterType; + +struct _DVBioChannelListReaderPrivate { + DVBChannelList* _channels; + DVBAdapterType _Type; +}; + +typedef enum { + DVB_DVB_SRC_INVERSION_INVERSION_OFF, + DVB_DVB_SRC_INVERSION_INVERSION_ON, + DVB_DVB_SRC_INVERSION_INVERSION_AUTO +} DVBDvbSrcInversion; + +typedef enum { + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO +} DVBDvbSrcBandwidth; + +typedef enum { + DVB_DVB_SRC_CODE_RATE_FEC_NONE, + DVB_DVB_SRC_CODE_RATE_FEC_1_2, + DVB_DVB_SRC_CODE_RATE_FEC_2_3, + DVB_DVB_SRC_CODE_RATE_FEC_3_4, + DVB_DVB_SRC_CODE_RATE_FEC_4_5, + DVB_DVB_SRC_CODE_RATE_FEC_5_6, + DVB_DVB_SRC_CODE_RATE_FEC_6_7, + DVB_DVB_SRC_CODE_RATE_FEC_7_8, + DVB_DVB_SRC_CODE_RATE_FEC_8_9, + DVB_DVB_SRC_CODE_RATE_FEC_AUTO +} DVBDvbSrcCodeRate; + +typedef enum { + DVB_DVB_SRC_MODULATION_QPSK, + DVB_DVB_SRC_MODULATION_QAM_16, + DVB_DVB_SRC_MODULATION_QAM_32, + DVB_DVB_SRC_MODULATION_QAM_64, + DVB_DVB_SRC_MODULATION_QAM_128, + DVB_DVB_SRC_MODULATION_QAM_256, + DVB_DVB_SRC_MODULATION_QAM_AUTO +} DVBDvbSrcModulation; + +typedef enum { + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K, + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K, + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO +} DVBDvbSrcTransmissionMode; + +typedef enum { + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO +} DVBDvbSrcGuard; + +typedef enum { + DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_1, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_2, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_4, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO +} DVBDvbSrcHierarchy; + + +static gpointer dvb_io_channel_list_reader_parent_class = NULL; + +GType dvb_io_channel_list_reader_get_type (void) G_GNUC_CONST; +GType dvb_channel_list_get_type (void) G_GNUC_CONST; +GType dvb_adapter_type_get_type (void) G_GNUC_CONST; +#define DVB_IO_CHANNEL_LIST_READER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_IO_TYPE_CHANNEL_LIST_READER, DVBioChannelListReaderPrivate)) +enum { + DVB_IO_CHANNEL_LIST_READER_DUMMY_PROPERTY, + DVB_IO_CHANNEL_LIST_READER_CHANNELS, + DVB_IO_CHANNEL_LIST_READER_TYPE +}; +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); +DVBChannelList* dvb_io_channel_list_reader_get_channels (DVBioChannelListReader* self); +GFile* dvb_channel_list_get_channels_file (DVBChannelList* self); +GType dvb_channel_get_type (void) G_GNUC_CONST; +static DVBChannel* dvb_io_channel_list_reader_parse_line (DVBioChannelListReader* self, const char* line); +void dvb_channel_list_add (DVBChannelList* self, DVBChannel* channel); +DVBAdapterType dvb_io_channel_list_reader_get_Type (DVBioChannelListReader* self); +GType dvb_terrestrial_channel_get_type (void) G_GNUC_CONST; +static DVBTerrestrialChannel* dvb_io_channel_list_reader_parse_terrestrial_channel (DVBioChannelListReader* self, const char* line); +GType dvb_satellite_channel_get_type (void) G_GNUC_CONST; +static DVBSatelliteChannel* dvb_io_channel_list_reader_parse_satellite_channel (DVBioChannelListReader* self, const char* line); +GType dvb_cable_channel_get_type (void) G_GNUC_CONST; +static DVBCableChannel* dvb_io_channel_list_reader_parse_cable_channel (DVBioChannelListReader* self, const char* line); +gboolean dvb_channel_is_valid (DVBChannel* self); +guint dvb_channel_list_get_GroupId (DVBChannelList* self); +void dvb_channel_set_GroupId (DVBChannel* self, guint value); +char* dvb_channel_to_string (DVBChannel* self); +DVBTerrestrialChannel* dvb_terrestrial_channel_new (void); +DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type); +void dvb_channel_set_Name (DVBChannel* self, const char* value); +void dvb_channel_set_Frequency (DVBChannel* self, guint value); +static gboolean dvb_io_channel_list_reader_get_value_with_prefix (GType enumtype, const char* name, const char* prefix, gint* val); +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_Inversion (DVBTerrestrialChannel* self, DVBDvbSrcInversion value); +GType dvb_dvb_src_bandwidth_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_Bandwidth (DVBTerrestrialChannel* self, DVBDvbSrcBandwidth value); +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_CodeRateHP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); +void dvb_terrestrial_channel_set_CodeRateLP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_Constellation (DVBTerrestrialChannel* self, DVBDvbSrcModulation value); +GType dvb_dvb_src_transmission_mode_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_TransmissionMode (DVBTerrestrialChannel* self, DVBDvbSrcTransmissionMode value); +GType dvb_dvb_src_guard_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_GuardInterval (DVBTerrestrialChannel* self, DVBDvbSrcGuard value); +GType dvb_dvb_src_hierarchy_get_type (void) G_GNUC_CONST; +void dvb_terrestrial_channel_set_Hierarchy (DVBTerrestrialChannel* self, DVBDvbSrcHierarchy value); +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); +void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const char* 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); +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); +void dvb_cable_channel_set_Modulation (DVBCableChannel* self, DVBDvbSrcModulation value); +gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const char* name, gint* evalue); +static void dvb_io_channel_list_reader_set_channels (DVBioChannelListReader* self, DVBChannelList* value); +static void dvb_io_channel_list_reader_set_Type (DVBioChannelListReader* self, DVBAdapterType value); +static void dvb_io_channel_list_reader_finalize (GObject* obj); +static void dvb_io_channel_list_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void dvb_io_channel_list_reader_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 gint _vala_array_length (gpointer array); + + + +DVBioChannelListReader* dvb_io_channel_list_reader_construct (GType object_type, DVBChannelList* channels, DVBAdapterType type) { + DVBioChannelListReader * self; + g_return_val_if_fail (channels != NULL, NULL); + self = (DVBioChannelListReader*) g_object_new (object_type, "channels", channels, "Type", type, NULL); + return self; +} + + +DVBioChannelListReader* dvb_io_channel_list_reader_new (DVBChannelList* channels, DVBAdapterType type) { + return dvb_io_channel_list_reader_construct (DVB_IO_TYPE_CHANNEL_LIST_READER, channels, type); +} + + +void dvb_io_channel_list_reader_read_into (DVBioChannelListReader* self, GError** error) { + GFileInputStream* _tmp0_; + GFileInputStream* _tmp1_; + GDataInputStream* _tmp2_; + GDataInputStream* reader; + char* line; + gsize len = 0UL; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (dvb_channel_list_get_channels_file (self->priv->_channels) != NULL); + _tmp0_ = g_file_read (dvb_channel_list_get_channels_file (self->priv->_channels), NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + return; + } + reader = (_tmp2_ = g_data_input_stream_new ((GInputStream*) (_tmp1_ = _tmp0_)), _g_object_unref0 (_tmp1_), _tmp2_); + line = NULL; + while (TRUE) { + char* _tmp3_; + char* _tmp4_; + _tmp3_ = g_data_input_stream_read_line (reader, &len, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (line); + _g_object_unref0 (reader); + return; + } + if (!((line = (_tmp4_ = _tmp3_, _g_free0 (line), _tmp4_)) != NULL)) { + break; + } + if (len > 0) { + DVBChannel* c; + c = dvb_io_channel_list_reader_parse_line (self, line); + if (c != NULL) { + dvb_channel_list_add (self->priv->_channels, c); + } else { + g_warning ("ChannelListReader.vala:47: Could not parse channel"); + } + _g_object_unref0 (c); + } + } + g_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (line); + _g_object_unref0 (reader); + return; + } + _g_free0 (line); + _g_object_unref0 (reader); +} + + +static DVBChannel* dvb_io_channel_list_reader_parse_line (DVBioChannelListReader* self, const char* line) { + DVBChannel* result = NULL; + DVBChannel* c; + gboolean _tmp3_ = FALSE; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (line != NULL, NULL); + c = NULL; + switch (self->priv->_Type) { + case DVB_ADAPTER_TYPE_DVB_T: + { + DVBChannel* _tmp0_; + c = (_tmp0_ = (DVBChannel*) dvb_io_channel_list_reader_parse_terrestrial_channel (self, line), _g_object_unref0 (c), _tmp0_); + break; + } + case DVB_ADAPTER_TYPE_DVB_S: + { + DVBChannel* _tmp1_; + c = (_tmp1_ = (DVBChannel*) dvb_io_channel_list_reader_parse_satellite_channel (self, line), _g_object_unref0 (c), _tmp1_); + break; + } + case DVB_ADAPTER_TYPE_DVB_C: + { + DVBChannel* _tmp2_; + c = (_tmp2_ = (DVBChannel*) dvb_io_channel_list_reader_parse_cable_channel (self, line), _g_object_unref0 (c), _tmp2_); + break; + } + default: + { + g_critical ("ChannelListReader.vala:69: Unknown adapter type"); + break; + } + } + if (c != NULL) { + _tmp3_ = dvb_channel_is_valid (c); + } else { + _tmp3_ = FALSE; + } + if (_tmp3_) { + dvb_channel_set_GroupId (c, dvb_channel_list_get_GroupId (self->priv->_channels)); + result = c; + return result; + } else { + char* _tmp4_; + char* val; + _tmp4_ = NULL; + if (c == NULL) { + char* _tmp5_; + _tmp4_ = (_tmp5_ = g_strdup ("(null)"), _g_free0 (_tmp4_), _tmp5_); + } else { + char* _tmp6_; + _tmp4_ = (_tmp6_ = dvb_channel_to_string (c), _g_free0 (_tmp4_), _tmp6_); + } + val = g_strdup (_tmp4_); + g_warning ("ChannelListReader.vala:78: Channel is not valid: %s", val); + result = NULL; + _g_free0 (val); + _g_free0 (_tmp4_); + _g_object_unref0 (c); + return result; + } + _g_object_unref0 (c); +} + + +/** + * @line: The line to parse + * @returns: #TerrestrialChannel representing that line + * + * A line looks like + * 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 + */ +static DVBTerrestrialChannel* dvb_io_channel_list_reader_parse_terrestrial_channel (DVBioChannelListReader* self, const char* line) { + DVBTerrestrialChannel* result = NULL; + DVBTerrestrialChannel* channel; + gint fields_length1; + gint _fields_size_; + char** _tmp1_; + char** _tmp0_; + char** fields; + gint i; + char* val; + gboolean failed; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (line != NULL, NULL); + channel = dvb_terrestrial_channel_new (); + fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), _fields_size_ = fields_length1, _tmp1_); + i = 0; + val = NULL; + failed = FALSE; + while (TRUE) { + char* _tmp2_; + if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { + break; + } + if (i == 0) { + if (g_utf8_validate (val, -1, NULL)) { + dvb_channel_set_Name ((DVBChannel*) channel, val); + } else { + g_warning ("ChannelListReader.vala:103: Bad UTF-8 encoded channel name"); + dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + } + } else { + if (i == 1) { + dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) atoi (val)); + } else { + if (i == 2) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &eval)) { + dvb_terrestrial_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 3) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, val, "DVB_DVB_SRC_BANDWIDTH_", &eval)) { + dvb_terrestrial_channel_set_Bandwidth (channel, (DVBDvbSrcBandwidth) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 4) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { + dvb_terrestrial_channel_set_CodeRateHP (channel, (DVBDvbSrcCodeRate) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 5) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { + dvb_terrestrial_channel_set_CodeRateLP (channel, (DVBDvbSrcCodeRate) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 6) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &eval)) { + dvb_terrestrial_channel_set_Constellation (channel, (DVBDvbSrcModulation) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 7) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, val, "DVB_DVB_SRC_TRANSMISSION_MODE_", &eval)) { + dvb_terrestrial_channel_set_TransmissionMode (channel, (DVBDvbSrcTransmissionMode) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 8) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_GUARD, val, "DVB_DVB_SRC_GUARD_", &eval)) { + dvb_terrestrial_channel_set_GuardInterval (channel, (DVBDvbSrcGuard) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 9) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, val, "DVB_DVB_SRC_HIERARCHY_", &eval)) { + dvb_terrestrial_channel_set_Hierarchy (channel, (DVBDvbSrcHierarchy) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 10) { + dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); + } else { + if (i == 11) { + gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); + } else { + if (i == 12) { + dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); + } + } + } + } + } + } + } + } + } + } + } + } + } + i++; + } + if (failed) { + result = NULL; + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (channel); + return result; + } else { + result = channel; + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + return result; + } + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (channel); +} + + +/** + * + * A line looks like + * Das Erste:11836:h:0:27500:101:102:28106 + */ +static DVBSatelliteChannel* dvb_io_channel_list_reader_parse_satellite_channel (DVBioChannelListReader* self, const char* line) { + DVBSatelliteChannel* result = NULL; + DVBSatelliteChannel* channel; + gint fields_length1; + gint _fields_size_; + char** _tmp1_; + char** _tmp0_; + char** fields; + gint i; + char* val; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (line != NULL, NULL); + channel = dvb_satellite_channel_new (); + fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), _fields_size_ = fields_length1, _tmp1_); + i = 0; + val = NULL; + while (TRUE) { + char* _tmp2_; + if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { + break; + } + if (i == 0) { + if (g_utf8_validate (val, -1, NULL)) { + dvb_channel_set_Name ((DVBChannel*) channel, val); + } else { + g_warning ("ChannelListReader.vala:212: Bad UTF-8 encoded channel name"); + dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + } + } else { + if (i == 1) { + dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) (atoi (val) * 1000)); + } else { + if (i == 2) { + dvb_satellite_channel_set_Polarization (channel, val); + } else { + if (i == 3) { + dvb_satellite_channel_set_DiseqcSource (channel, atoi (val)); + } else { + if (i == 4) { + dvb_satellite_channel_set_SymbolRate (channel, (guint) atoi (val)); + } else { + if (i == 5) { + dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); + } else { + if (i == 6) { + gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); + } else { + if (i == 7) { + dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); + } + } + } + } + } + } + } + } + i++; + } + result = channel; + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + return result; +} + + +/** + * + * line looks like + * ProSieben:330000000:INVERSION_AUTO:6900000:FEC_NONE:QAM_64:255:256:898 + */ +static DVBCableChannel* dvb_io_channel_list_reader_parse_cable_channel (DVBioChannelListReader* self, const char* line) { + DVBCableChannel* result = NULL; + DVBCableChannel* channel; + gint fields_length1; + gint _fields_size_; + char** _tmp1_; + char** _tmp0_; + char** fields; + gint i; + char* val; + gboolean failed; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (line != NULL, NULL); + channel = dvb_cable_channel_new (); + fields = (_tmp1_ = _tmp0_ = g_strsplit (line, ":", 0), fields_length1 = _vala_array_length (_tmp0_), _fields_size_ = fields_length1, _tmp1_); + i = 0; + val = NULL; + failed = FALSE; + while (TRUE) { + char* _tmp2_; + if (!((val = (_tmp2_ = g_strdup (fields[i]), _g_free0 (val), _tmp2_)) != NULL)) { + break; + } + if (i == 0) { + if (g_utf8_validate (val, -1, NULL)) { + dvb_channel_set_Name ((DVBChannel*) channel, val); + } else { + g_warning ("ChannelListReader.vala:258: Bad UTF-8 encoded channel name"); + dvb_channel_set_Name ((DVBChannel*) channel, "Bad encoding"); + } + } else { + if (i == 1) { + dvb_channel_set_Frequency ((DVBChannel*) channel, (guint) atoi (val)); + } else { + if (i == 2) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_INVERSION, val, "DVB_DVB_SRC_INVERSION_", &eval)) { + dvb_cable_channel_set_Inversion (channel, (DVBDvbSrcInversion) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 3) { + dvb_cable_channel_set_SymbolRate (channel, (guint) (atoi (val) / 1000)); + } else { + if (i == 4) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, val, "DVB_DVB_SRC_CODE_RATE_", &eval)) { + dvb_cable_channel_set_CodeRate (channel, (DVBDvbSrcCodeRate) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 5) { + gint eval = 0; + if (dvb_io_channel_list_reader_get_value_with_prefix (DVB_TYPE_DVB_SRC_MODULATION, val, "DVB_DVB_SRC_MODULATION_", &eval)) { + dvb_cable_channel_set_Modulation (channel, (DVBDvbSrcModulation) eval); + } else { + failed = TRUE; + break; + } + } else { + if (i == 6) { + dvb_channel_set_VideoPID ((DVBChannel*) channel, (guint) atoi (val)); + } else { + if (i == 7) { + gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs ((DVBChannel*) channel), GUINT_TO_POINTER ((guint) atoi (val))); + } else { + if (i == 8) { + dvb_channel_set_Sid ((DVBChannel*) channel, (guint) atoi (val)); + } + } + } + } + } + } + } + } + } + i++; + } + if (failed) { + result = NULL; + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (channel); + return result; + } else { + result = channel; + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + return result; + } + _g_free0 (val); + fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); + _g_object_unref0 (channel); +} + + +static gboolean dvb_io_channel_list_reader_get_value_with_prefix (GType enumtype, const char* name, const char* prefix, gint* val) { + gboolean result = FALSE; + char* _tmp0_; + gboolean _tmp1_; + g_return_val_if_fail (name != NULL, FALSE); + g_return_val_if_fail (prefix != NULL, FALSE); + result = (_tmp1_ = dvb_utils_get_value_by_name_from_enum (enumtype, _tmp0_ = g_strconcat (prefix, name, NULL), val), _g_free0 (_tmp0_), _tmp1_); + return result; +} + + +DVBChannelList* dvb_io_channel_list_reader_get_channels (DVBioChannelListReader* self) { + DVBChannelList* result; + g_return_val_if_fail (self != NULL, NULL); + result = self->priv->_channels; + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void dvb_io_channel_list_reader_set_channels (DVBioChannelListReader* self, DVBChannelList* value) { + DVBChannelList* _tmp0_; + g_return_if_fail (self != NULL); + self->priv->_channels = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_channels), _tmp0_); + g_object_notify ((GObject *) self, "channels"); +} + + +DVBAdapterType dvb_io_channel_list_reader_get_Type (DVBioChannelListReader* self) { + DVBAdapterType result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_Type; + return result; +} + + +static void dvb_io_channel_list_reader_set_Type (DVBioChannelListReader* self, DVBAdapterType value) { + g_return_if_fail (self != NULL); + self->priv->_Type = value; + g_object_notify ((GObject *) self, "Type"); +} + + +static void dvb_io_channel_list_reader_class_init (DVBioChannelListReaderClass * klass) { + 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 = dvb_io_channel_list_reader_get_property; + G_OBJECT_CLASS (klass)->set_property = dvb_io_channel_list_reader_set_property; + 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)); +} + + +static void dvb_io_channel_list_reader_instance_init (DVBioChannelListReader * self) { + self->priv = DVB_IO_CHANNEL_LIST_READER_GET_PRIVATE (self); +} + + +static void dvb_io_channel_list_reader_finalize (GObject* obj) { + DVBioChannelListReader * self; + self = DVB_IO_CHANNEL_LIST_READER (obj); + _g_object_unref0 (self->priv->_channels); + G_OBJECT_CLASS (dvb_io_channel_list_reader_parent_class)->finalize (obj); +} + + +GType dvb_io_channel_list_reader_get_type (void) { + static volatile gsize dvb_io_channel_list_reader_type_id__volatile = 0; + if (g_once_init_enter (&dvb_io_channel_list_reader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBioChannelListReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_io_channel_list_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBioChannelListReader), 0, (GInstanceInitFunc) dvb_io_channel_list_reader_instance_init, NULL }; + GType dvb_io_channel_list_reader_type_id; + dvb_io_channel_list_reader_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBioChannelListReader", &g_define_type_info, 0); + g_once_init_leave (&dvb_io_channel_list_reader_type_id__volatile, dvb_io_channel_list_reader_type_id); + } + return dvb_io_channel_list_reader_type_id__volatile; +} + + +static void dvb_io_channel_list_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBioChannelListReader * self; + self = DVB_IO_CHANNEL_LIST_READER (object); + switch (property_id) { + case DVB_IO_CHANNEL_LIST_READER_CHANNELS: + g_value_set_object (value, dvb_io_channel_list_reader_get_channels (self)); + break; + case DVB_IO_CHANNEL_LIST_READER_TYPE: + g_value_set_enum (value, dvb_io_channel_list_reader_get_Type (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void dvb_io_channel_list_reader_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBioChannelListReader * self; + self = DVB_IO_CHANNEL_LIST_READER (object); + switch (property_id) { + case DVB_IO_CHANNEL_LIST_READER_CHANNELS: + dvb_io_channel_list_reader_set_channels (self, g_value_get_object (value)); + break; + case DVB_IO_CHANNEL_LIST_READER_TYPE: + dvb_io_channel_list_reader_set_Type (self, g_value_get_enum (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +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); +} + + +static gint _vala_array_length (gpointer array) { + int length; + length = 0; + if (array) { + while (((gpointer*) array)[length]) { + length++; + } + } + return length; +} + + + + diff -Nru gnome-dvb-daemon-0.1.16/src/io/ChannelListReader.vala gnome-dvb-daemon-0.1.21/src/io/ChannelListReader.vala --- gnome-dvb-daemon-0.1.16/src/io/ChannelListReader.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/ChannelListReader.vala 2010-04-19 18:12:04.000000000 +0000 @@ -0,0 +1,313 @@ +/* + * Copyright (C) 2008-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; + +namespace DVB.io { + + public class ChannelListReader : GLib.Object { + + public ChannelList channels {get; construct;} + public AdapterType Type {get; construct;} + + public ChannelListReader (ChannelList channels, AdapterType type) { + base (channels: channels, Type: type); + } + + public void read_into () throws Error { + return_if_fail (this.channels.channels_file != null); + + var reader = new DataInputStream ( + this.channels.channels_file.read (null)); + + string line = null; + size_t len; + while ((line = reader.read_line (out len, null)) != null) { + if (len > 0) { + Channel c = this.parse_line (line); + if (c != null) { + channels.add (c); + } else + warning ("Could not parse channel"); + } + } + reader.close (null); + } + + private Channel? parse_line (string line) { + Channel? c = null; + switch (this.Type) { + case AdapterType.DVB_T: + c = parse_terrestrial_channel (line); + break; + + case AdapterType.DVB_S: + c = parse_satellite_channel (line); + break; + + case AdapterType.DVB_C: + c = parse_cable_channel (line); + break; + + default: + critical ("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 (); + warning ("Channel is not valid: %s", val); + return null; + } + } + + /** + * @line: The line to parse + * @returns: #TerrestrialChannel representing that line + * + * A line looks like + * 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 (); + + string[] fields = line.split(":"); + + int i=0; + string val; + bool failed = false; + while ( (val = fields[i]) != null) { + if (i == 0) { + if (val.validate()) + channel.Name = val; + else { + warning ("Bad UTF-8 encoded channel name"); + channel.Name = "Bad encoding"; + } + } else if (i == 1) { + channel.Frequency = (uint)val.to_int (); + } else if (i == 2) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcInversion), val, + "DVB_DVB_SRC_INVERSION_", out eval)) { + channel.Inversion = (DvbSrcInversion) eval; + } else { + failed = true; + break; + } + } else if (i == 3) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcBandwidth), val, + "DVB_DVB_SRC_BANDWIDTH_", out eval)) { + channel.Bandwidth = (DvbSrcBandwidth) eval; + } else { + failed = true; + break; + } + } else if (i == 4) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, + "DVB_DVB_SRC_CODE_RATE_", out eval)) { + channel.CodeRateHP = (DvbSrcCodeRate) eval; + } else { + failed = true; + break; + } + } else if (i == 5) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, + "DVB_DVB_SRC_CODE_RATE_", out eval)) { + channel.CodeRateLP = (DvbSrcCodeRate) eval; + } else { + failed = true; + break; + } + } else if (i == 6) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcModulation), val, + "DVB_DVB_SRC_MODULATION_", out eval)) { + channel.Constellation = (DvbSrcModulation) eval; + } else { + failed = true; + break; + } + } else if (i == 7) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcTransmissionMode), + val, "DVB_DVB_SRC_TRANSMISSION_MODE_", out eval)) { + channel.TransmissionMode = (DvbSrcTransmissionMode) eval; + } else { + failed = true; + break; + } + } else if (i == 8) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcGuard), val, + "DVB_DVB_SRC_GUARD_", out eval)) { + channel.GuardInterval = (DvbSrcGuard) eval; + } else { + failed = true; + break; + } + } else if (i == 9) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcHierarchy), val, + "DVB_DVB_SRC_HIERARCHY_", out eval)) { + channel.Hierarchy = (DvbSrcHierarchy) eval; + } else { + failed = true; + break; + } + } else if (i == 10) { + channel.VideoPID = (uint)val.to_int (); + } else if (i == 11) { + channel.AudioPIDs.add ((uint)val.to_int ()); + } else if (i == 12) { + channel.Sid = (uint)val.to_int (); + } + + i++; + } + + if (failed) return null; + else return channel; + } + + /** + * + * A line looks like + * Das Erste:11836:h:0:27500:101:102:28106 + */ + private SatelliteChannel? parse_satellite_channel (string line) { + var channel = new SatelliteChannel (); + + string[] fields = line.split(":"); + + int i=0; + string val; + while ( (val = fields[i]) != null) { + if (i == 0) { + if (val.validate()) + channel.Name = val; + else { + warning ("Bad UTF-8 encoded channel name"); + channel.Name = "Bad encoding"; + } + } else if (i == 1) { + // frequency is stored in MHz + channel.Frequency = (uint)(val.to_int () * 1000); + } else if (i == 2) { + channel.Polarization = val; + } else if (i == 3) { + // Sat number + channel.DiseqcSource = val.to_int (); + } else if (i == 4) { + // symbol rate is stored in kBaud + channel.SymbolRate = (uint)val.to_int(); + } else if (i == 5) { + channel.VideoPID = (uint)val.to_int (); + } else if (i == 6) { + channel.AudioPIDs.add ((uint)val.to_int ()); + } else if (i == 7) { + channel.Sid = (uint)val.to_int (); + } + + i++; + } + + return channel; + } + + /** + * + * line looks like + * ProSieben:330000000:INVERSION_AUTO:6900000:FEC_NONE:QAM_64:255:256:898 + */ + private CableChannel? parse_cable_channel (string line) { + var channel = new CableChannel (); + + string[] fields = line.split(":"); + + int i=0; + string val; + bool failed = false; + while ( (val = fields[i]) != null) { + if (i == 0) { + if (val.validate()) + channel.Name = val; + else { + warning ("Bad UTF-8 encoded channel name"); + channel.Name = "Bad encoding"; + } + } else if (i == 1) { + channel.Frequency = (uint)val.to_int (); + } else if (i == 2) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcInversion), val, + "DVB_DVB_SRC_INVERSION_", out eval)) { + channel.Inversion = (DvbSrcInversion) eval; + } else { + failed = true; + break; + } + } else if (i == 3) { + channel.SymbolRate = (uint)(val.to_int () / 1000); + } else if (i == 4) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcCodeRate), val, + "DVB_DVB_SRC_CODE_RATE_", out eval)) { + channel.CodeRate = (DvbSrcCodeRate) eval; + } else { + failed = true; + break; + } + } else if (i == 5) { + int eval; + if (get_value_with_prefix (typeof(DvbSrcModulation), val, + "DVB_DVB_SRC_MODULATION_", out eval)) { + channel.Modulation = (DvbSrcModulation) eval; + } else { + failed = true; + break; + } + } else if (i == 6) { + channel.VideoPID = (uint)val.to_int (); + } else if (i == 7) { + channel.AudioPIDs.add ((uint)val.to_int ()); + } else if (i == 8) { + channel.Sid = (uint)val.to_int (); + } + + i++; + } + + if (failed) return null; + else return channel; + } + + private static bool get_value_with_prefix (GLib.Type enumtype, string name, + string prefix, out int val) { + return Utils.get_value_by_name_from_enum (enumtype, prefix + name, out val); + } + } + +} diff -Nru gnome-dvb-daemon-0.1.16/src/io/ChannelListWriter.c gnome-dvb-daemon-0.1.21/src/io/ChannelListWriter.c --- gnome-dvb-daemon-0.1.16/src/io/ChannelListWriter.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/ChannelListWriter.c 2010-08-21 20:42:32.000000000 +0000 @@ -0,0 +1,610 @@ +/* ChannelListWriter.c generated by valac 0.9.7, the Vala compiler + * generated from ChannelListWriter.vala, do not modify */ + +/* + * Copyright (C) 2008-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 + + +#define DVB_IO_TYPE_CHANNEL_LIST_WRITER (dvb_io_channel_list_writer_get_type ()) +#define DVB_IO_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriter)) +#define DVB_IO_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriterClass)) +#define DVB_IO_IS_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER)) +#define DVB_IO_IS_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_CHANNEL_LIST_WRITER)) +#define DVB_IO_CHANNEL_LIST_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriterClass)) + +typedef struct _DVBioChannelListWriter DVBioChannelListWriter; +typedef struct _DVBioChannelListWriterClass DVBioChannelListWriterClass; +typedef struct _DVBioChannelListWriterPrivate DVBioChannelListWriterPrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#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 _g_free0(var) (var = (g_free (var), NULL)) + +#define DVB_TYPE_TERRESTRIAL_CHANNEL (dvb_terrestrial_channel_get_type ()) +#define DVB_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannel)) +#define DVB_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) +#define DVB_IS_TERRESTRIAL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL)) +#define DVB_IS_TERRESTRIAL_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_TERRESTRIAL_CHANNEL)) +#define DVB_TERRESTRIAL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelClass)) + +typedef struct _DVBTerrestrialChannel DVBTerrestrialChannel; +typedef struct _DVBTerrestrialChannelClass DVBTerrestrialChannelClass; + +#define DVB_TYPE_SATELLITE_CHANNEL (dvb_satellite_channel_get_type ()) +#define DVB_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannel)) +#define DVB_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) +#define DVB_IS_SATELLITE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_SATELLITE_CHANNEL)) +#define DVB_IS_SATELLITE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_SATELLITE_CHANNEL)) +#define DVB_SATELLITE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelClass)) + +typedef struct _DVBSatelliteChannel DVBSatelliteChannel; +typedef struct _DVBSatelliteChannelClass DVBSatelliteChannelClass; + +#define DVB_TYPE_CABLE_CHANNEL (dvb_cable_channel_get_type ()) +#define DVB_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannel)) +#define DVB_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) +#define DVB_IS_CABLE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CABLE_CHANNEL)) +#define DVB_IS_CABLE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CABLE_CHANNEL)) +#define DVB_CABLE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CABLE_CHANNEL, DVBCableChannelClass)) + +typedef struct _DVBCableChannel DVBCableChannel; +typedef struct _DVBCableChannelClass DVBCableChannelClass; + +#define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) + +#define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) + +#define DVB_TYPE_DVB_SRC_CODE_RATE (dvb_dvb_src_code_rate_get_type ()) + +#define DVB_TYPE_DVB_SRC_MODULATION (dvb_dvb_src_modulation_get_type ()) + +#define DVB_TYPE_DVB_SRC_TRANSMISSION_MODE (dvb_dvb_src_transmission_mode_get_type ()) + +#define DVB_TYPE_DVB_SRC_GUARD (dvb_dvb_src_guard_get_type ()) + +#define DVB_TYPE_DVB_SRC_HIERARCHY (dvb_dvb_src_hierarchy_get_type ()) + +struct _DVBioChannelListWriter { + GObject parent_instance; + DVBioChannelListWriterPrivate * priv; +}; + +struct _DVBioChannelListWriterClass { + GObjectClass parent_class; +}; + +struct _DVBioChannelListWriterPrivate { + GFile* _file; + GOutputStream* stream; +}; + +typedef enum { + DVB_DVB_SRC_INVERSION_INVERSION_OFF, + DVB_DVB_SRC_INVERSION_INVERSION_ON, + DVB_DVB_SRC_INVERSION_INVERSION_AUTO +} DVBDvbSrcInversion; + +typedef enum { + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ, + DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO +} DVBDvbSrcBandwidth; + +typedef enum { + DVB_DVB_SRC_CODE_RATE_FEC_NONE, + DVB_DVB_SRC_CODE_RATE_FEC_1_2, + DVB_DVB_SRC_CODE_RATE_FEC_2_3, + DVB_DVB_SRC_CODE_RATE_FEC_3_4, + DVB_DVB_SRC_CODE_RATE_FEC_4_5, + DVB_DVB_SRC_CODE_RATE_FEC_5_6, + DVB_DVB_SRC_CODE_RATE_FEC_6_7, + DVB_DVB_SRC_CODE_RATE_FEC_7_8, + DVB_DVB_SRC_CODE_RATE_FEC_8_9, + DVB_DVB_SRC_CODE_RATE_FEC_AUTO +} DVBDvbSrcCodeRate; + +typedef enum { + DVB_DVB_SRC_MODULATION_QPSK, + DVB_DVB_SRC_MODULATION_QAM_16, + DVB_DVB_SRC_MODULATION_QAM_32, + DVB_DVB_SRC_MODULATION_QAM_64, + DVB_DVB_SRC_MODULATION_QAM_128, + DVB_DVB_SRC_MODULATION_QAM_256, + DVB_DVB_SRC_MODULATION_QAM_AUTO +} DVBDvbSrcModulation; + +typedef enum { + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K, + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K, + DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO +} DVBDvbSrcTransmissionMode; + +typedef enum { + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4, + DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO +} DVBDvbSrcGuard; + +typedef enum { + DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_1, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_2, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_4, + DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO +} DVBDvbSrcHierarchy; + + +static gpointer dvb_io_channel_list_writer_parent_class = NULL; + +GType dvb_io_channel_list_writer_get_type (void) G_GNUC_CONST; +#define DVB_IO_CHANNEL_LIST_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriterPrivate)) +enum { + DVB_IO_CHANNEL_LIST_WRITER_DUMMY_PROPERTY, + DVB_IO_CHANNEL_LIST_WRITER_FILE +}; +static void dvb_io_channel_list_writer_open_stream (DVBioChannelListWriter* self, GError** error); +GFile* dvb_io_channel_list_writer_get_file (DVBioChannelListWriter* self); +DVBioChannelListWriter* dvb_io_channel_list_writer_new (GFile* file); +DVBioChannelListWriter* dvb_io_channel_list_writer_construct (GType object_type, GFile* file); +GType dvb_channel_get_type (void) G_GNUC_CONST; +void dvb_io_channel_list_writer_write (DVBioChannelListWriter* self, DVBChannel* channel, GError** error); +const char* dvb_channel_get_Name (DVBChannel* self); +GType dvb_terrestrial_channel_get_type (void) G_GNUC_CONST; +static void dvb_io_channel_list_writer_write_terrestrial_channel (DVBioChannelListWriter* self, DVBTerrestrialChannel* channel, GError** error); +GType dvb_satellite_channel_get_type (void) G_GNUC_CONST; +static void dvb_io_channel_list_writer_write_satellite_channel (DVBioChannelListWriter* self, DVBSatelliteChannel* channel, GError** error); +GType dvb_cable_channel_get_type (void) G_GNUC_CONST; +static void dvb_io_channel_list_writer_write_cable_channel (DVBioChannelListWriter* self, DVBCableChannel* channel, GError** error); +GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); +guint dvb_channel_get_VideoPID (DVBChannel* self); +guint dvb_channel_get_Sid (DVBChannel* self); +gboolean dvb_io_channel_list_writer_close (DVBioChannelListWriter* self, GError** error); +guint dvb_channel_get_Frequency (DVBChannel* self); +static char* dvb_io_channel_list_writer_get_name_without_prefix (GType enumtype, gint val, const char* prefix); +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; +DVBDvbSrcInversion dvb_terrestrial_channel_get_Inversion (DVBTerrestrialChannel* self); +GType dvb_dvb_src_bandwidth_get_type (void) G_GNUC_CONST; +DVBDvbSrcBandwidth dvb_terrestrial_channel_get_Bandwidth (DVBTerrestrialChannel* self); +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; +DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateHP (DVBTerrestrialChannel* self); +DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateLP (DVBTerrestrialChannel* self); +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; +DVBDvbSrcModulation dvb_terrestrial_channel_get_Constellation (DVBTerrestrialChannel* self); +GType dvb_dvb_src_transmission_mode_get_type (void) G_GNUC_CONST; +DVBDvbSrcTransmissionMode dvb_terrestrial_channel_get_TransmissionMode (DVBTerrestrialChannel* self); +GType dvb_dvb_src_guard_get_type (void) G_GNUC_CONST; +DVBDvbSrcGuard dvb_terrestrial_channel_get_GuardInterval (DVBTerrestrialChannel* self); +GType dvb_dvb_src_hierarchy_get_type (void) G_GNUC_CONST; +DVBDvbSrcHierarchy dvb_terrestrial_channel_get_Hierarchy (DVBTerrestrialChannel* self); +const char* dvb_satellite_channel_get_Polarization (DVBSatelliteChannel* self); +gint dvb_satellite_channel_get_DiseqcSource (DVBSatelliteChannel* self); +guint dvb_satellite_channel_get_SymbolRate (DVBSatelliteChannel* self); +DVBDvbSrcInversion dvb_cable_channel_get_Inversion (DVBCableChannel* self); +guint dvb_cable_channel_get_SymbolRate (DVBCableChannel* self); +DVBDvbSrcCodeRate dvb_cable_channel_get_CodeRate (DVBCableChannel* self); +DVBDvbSrcModulation dvb_cable_channel_get_Modulation (DVBCableChannel* self); +const char* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val); +static void dvb_io_channel_list_writer_set_file (DVBioChannelListWriter* self, GFile* value); +static void dvb_io_channel_list_writer_finalize (GObject* obj); +static void dvb_io_channel_list_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void dvb_io_channel_list_writer_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 void dvb_io_channel_list_writer_open_stream (DVBioChannelListWriter* self, GError** error) { + GFileOutputStream* fostream; + GOutputStream* _tmp4_; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + fostream = NULL; + if (g_file_query_exists (self->priv->_file, NULL)) { + GFileOutputStream* _tmp0_; + GFileOutputStream* _tmp1_; + _tmp0_ = g_file_replace (self->priv->_file, NULL, TRUE, 0, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (fostream); + return; + } + fostream = (_tmp1_ = _tmp0_, _g_object_unref0 (fostream), _tmp1_); + } else { + GFileOutputStream* _tmp2_; + GFileOutputStream* _tmp3_; + _tmp2_ = g_file_create (self->priv->_file, 0, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (fostream); + return; + } + fostream = (_tmp3_ = _tmp2_, _g_object_unref0 (fostream), _tmp3_); + } + self->priv->stream = (_tmp4_ = (GOutputStream*) ((GBufferedOutputStream*) g_buffered_output_stream_new ((GOutputStream*) fostream)), _g_object_unref0 (self->priv->stream), _tmp4_); + _g_object_unref0 (fostream); +} + + +DVBioChannelListWriter* dvb_io_channel_list_writer_construct (GType object_type, GFile* file) { + DVBioChannelListWriter * self; + g_return_val_if_fail (file != NULL, NULL); + self = (DVBioChannelListWriter*) g_object_new (object_type, "file", file, NULL); + return self; +} + + +DVBioChannelListWriter* dvb_io_channel_list_writer_new (GFile* file) { + return dvb_io_channel_list_writer_construct (DVB_IO_TYPE_CHANNEL_LIST_WRITER, file); +} + + +void dvb_io_channel_list_writer_write (DVBioChannelListWriter* self, DVBChannel* channel, GError** error) { + char* buffer; + char* _tmp0_; + guint apid = 0U; + char* _tmp1_; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (channel != NULL); + if (self->priv->stream == 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) { + return; + } + buffer = NULL; + buffer = (_tmp0_ = g_strdup_printf ("%s:", dvb_channel_get_Name (channel)), _g_free0 (buffer), _tmp0_); + g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), 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_); + 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_); + 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_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (buffer); + return; + } + } else { + g_warning ("ChannelListWriter.vala:76: Unknown channel type"); + } + } + } + if (gee_collection_get_size ((GeeCollection*) dvb_channel_get_AudioPIDs (channel)) == 0) { + apid = (guint) 0; + } else { + apid = GPOINTER_TO_UINT (gee_list_get (dvb_channel_get_AudioPIDs (channel), 0)); + } + buffer = (_tmp1_ = g_strdup_printf (":%u:%u:%u\n", dvb_channel_get_VideoPID (channel), apid, dvb_channel_get_Sid (channel)), _g_free0 (buffer), _tmp1_); + g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (buffer); + return; + } + _g_free0 (buffer); +} + + +gboolean dvb_io_channel_list_writer_close (DVBioChannelListWriter* self, GError** error) { + gboolean result = FALSE; + gboolean _tmp0_; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); + if (self->priv->stream == NULL) { + result = TRUE; + return result; + } + _tmp0_ = g_output_stream_close (self->priv->stream, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + return FALSE; + } + result = _tmp0_; + return result; +} + + +static void dvb_io_channel_list_writer_write_terrestrial_channel (DVBioChannelListWriter* self, DVBTerrestrialChannel* channel, GError** error) { + gint elements_length1; + gint _elements_size_; + char** _tmp0_; + char** elements; + char* _tmp1_; + char* _tmp2_; + char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + char* _tmp6_; + char* _tmp7_; + char* _tmp8_; + char* _tmp9_; + char* buffer; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (channel != NULL); + elements = (_tmp0_ = g_new0 (char*, 9 + 1), elements_length1 = 9, _elements_size_ = elements_length1, _tmp0_); + elements[0] = (_tmp1_ = g_strdup_printf ("%u", dvb_channel_get_Frequency ((DVBChannel*) channel)), _g_free0 (elements[0]), _tmp1_); + elements[1] = (_tmp2_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) dvb_terrestrial_channel_get_Inversion (channel), "DVB_DVB_SRC_INVERSION_"), _g_free0 (elements[1]), _tmp2_); + elements[2] = (_tmp3_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_BANDWIDTH, (gint) dvb_terrestrial_channel_get_Bandwidth (channel), "DVB_DVB_SRC_BANDWIDTH_"), _g_free0 (elements[2]), _tmp3_); + elements[3] = (_tmp4_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_terrestrial_channel_get_CodeRateHP (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[3]), _tmp4_); + elements[4] = (_tmp5_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_terrestrial_channel_get_CodeRateLP (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[4]), _tmp5_); + elements[5] = (_tmp6_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) dvb_terrestrial_channel_get_Constellation (channel), "DVB_DVB_SRC_MODULATION_"), _g_free0 (elements[5]), _tmp6_); + elements[6] = (_tmp7_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_TRANSMISSION_MODE, (gint) dvb_terrestrial_channel_get_TransmissionMode (channel), "DVB_DVB_SRC_TRANSMISSION_MODE_"), _g_free0 (elements[6]), _tmp7_); + elements[7] = (_tmp8_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_GUARD, (gint) dvb_terrestrial_channel_get_GuardInterval (channel), "DVB_DVB_SRC_GUARD_"), _g_free0 (elements[7]), _tmp8_); + elements[8] = (_tmp9_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_HIERARCHY, (gint) dvb_terrestrial_channel_get_Hierarchy (channel), "DVB_DVB_SRC_HIERARCHY_"), _g_free0 (elements[8]), _tmp9_); + buffer = g_strjoinv (":", elements); + g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (buffer); + elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); + return; + } + _g_free0 (buffer); + elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); +} + + +static void dvb_io_channel_list_writer_write_satellite_channel (DVBioChannelListWriter* self, DVBSatelliteChannel* channel, GError** error) { + char* buffer; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (channel != NULL); + buffer = g_strdup_printf ("%u:%s:%d:%u", dvb_channel_get_Frequency ((DVBChannel*) channel) / 1000, dvb_satellite_channel_get_Polarization (channel), dvb_satellite_channel_get_DiseqcSource (channel), dvb_satellite_channel_get_SymbolRate (channel)); + g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (buffer); + return; + } + _g_free0 (buffer); +} + + +static void dvb_io_channel_list_writer_write_cable_channel (DVBioChannelListWriter* self, DVBCableChannel* channel, GError** error) { + gint elements_length1; + gint _elements_size_; + char** _tmp0_; + char** elements; + char* _tmp1_; + char* _tmp2_; + char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + char* buffer; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (channel != NULL); + elements = (_tmp0_ = g_new0 (char*, 5 + 1), elements_length1 = 5, _elements_size_ = elements_length1, _tmp0_); + elements[0] = (_tmp1_ = g_strdup_printf ("%u", dvb_channel_get_Frequency ((DVBChannel*) channel)), _g_free0 (elements[0]), _tmp1_); + elements[1] = (_tmp2_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_INVERSION, (gint) dvb_cable_channel_get_Inversion (channel), "DVB_DVB_SRC_INVERSION_"), _g_free0 (elements[1]), _tmp2_); + elements[2] = (_tmp3_ = g_strdup_printf ("%u", dvb_cable_channel_get_SymbolRate (channel) * 1000), _g_free0 (elements[2]), _tmp3_); + elements[3] = (_tmp4_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_CODE_RATE, (gint) dvb_cable_channel_get_CodeRate (channel), "DVB_DVB_SRC_CODE_RATE_"), _g_free0 (elements[3]), _tmp4_); + elements[4] = (_tmp5_ = dvb_io_channel_list_writer_get_name_without_prefix (DVB_TYPE_DVB_SRC_MODULATION, (gint) dvb_cable_channel_get_Modulation (channel), "DVB_DVB_SRC_MODULATION_"), _g_free0 (elements[4]), _tmp5_); + buffer = g_strjoinv (":", elements); + g_output_stream_write_all (self->priv->stream, buffer, strlen (buffer), NULL, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (buffer); + elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); + return; + } + _g_free0 (buffer); + elements = (_vala_array_free (elements, elements_length1, (GDestroyNotify) g_free), NULL); +} + + +static char* string_substring (const char* self, glong offset, glong len) { + char* result = NULL; + glong string_length; + const char* start; + g_return_val_if_fail (self != NULL, NULL); + string_length = g_utf8_strlen (self, -1); + 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); + start = g_utf8_offset_to_pointer (self, offset); + result = g_strndup (start, ((gchar*) g_utf8_offset_to_pointer (start, len)) - ((gchar*) start)); + return result; +} + + +static char* dvb_io_channel_list_writer_get_name_without_prefix (GType enumtype, gint val, const char* prefix) { + char* result = NULL; + char* name; + g_return_val_if_fail (prefix != NULL, NULL); + name = g_strdup (dvb_utils_get_name_by_value_from_enum (enumtype, val)); + if (name == NULL) { + result = NULL; + _g_free0 (name); + return result; + } else { + result = string_substring (name, g_utf8_strlen (prefix, -1), g_utf8_strlen (name, -1) - g_utf8_strlen (prefix, -1)); + _g_free0 (name); + return result; + } + _g_free0 (name); +} + + +GFile* dvb_io_channel_list_writer_get_file (DVBioChannelListWriter* self) { + GFile* result; + g_return_val_if_fail (self != NULL, NULL); + result = self->priv->_file; + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void dvb_io_channel_list_writer_set_file (DVBioChannelListWriter* self, GFile* value) { + GFile* _tmp0_; + g_return_if_fail (self != NULL); + self->priv->_file = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_file), _tmp0_); + g_object_notify ((GObject *) self, "file"); +} + + +static void dvb_io_channel_list_writer_class_init (DVBioChannelListWriterClass * klass) { + dvb_io_channel_list_writer_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBioChannelListWriterPrivate)); + G_OBJECT_CLASS (klass)->get_property = dvb_io_channel_list_writer_get_property; + G_OBJECT_CLASS (klass)->set_property = dvb_io_channel_list_writer_set_property; + G_OBJECT_CLASS (klass)->finalize = dvb_io_channel_list_writer_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_IO_CHANNEL_LIST_WRITER_FILE, g_param_spec_object ("file", "file", "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)); +} + + +static void dvb_io_channel_list_writer_instance_init (DVBioChannelListWriter * self) { + self->priv = DVB_IO_CHANNEL_LIST_WRITER_GET_PRIVATE (self); +} + + +static void dvb_io_channel_list_writer_finalize (GObject* obj) { + DVBioChannelListWriter * self; + self = DVB_IO_CHANNEL_LIST_WRITER (obj); + _g_object_unref0 (self->priv->_file); + _g_object_unref0 (self->priv->stream); + G_OBJECT_CLASS (dvb_io_channel_list_writer_parent_class)->finalize (obj); +} + + +/** + * Example: + * try { + * var writer = new DVB.ChannelListWriter (File.new_for_path ("/path/to/channels.conf")); + * foreach (DVB.Channel c in reader.Channels) { + * writer.write (c); + * } + * writer.close (); + * } catch (IOError e) { + * error (e.message); + * } + */ +GType dvb_io_channel_list_writer_get_type (void) { + static volatile gsize dvb_io_channel_list_writer_type_id__volatile = 0; + if (g_once_init_enter (&dvb_io_channel_list_writer_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBioChannelListWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_io_channel_list_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBioChannelListWriter), 0, (GInstanceInitFunc) dvb_io_channel_list_writer_instance_init, NULL }; + GType dvb_io_channel_list_writer_type_id; + dvb_io_channel_list_writer_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBioChannelListWriter", &g_define_type_info, 0); + g_once_init_leave (&dvb_io_channel_list_writer_type_id__volatile, dvb_io_channel_list_writer_type_id); + } + return dvb_io_channel_list_writer_type_id__volatile; +} + + +static void dvb_io_channel_list_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBioChannelListWriter * self; + self = DVB_IO_CHANNEL_LIST_WRITER (object); + switch (property_id) { + case DVB_IO_CHANNEL_LIST_WRITER_FILE: + g_value_set_object (value, dvb_io_channel_list_writer_get_file (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void dvb_io_channel_list_writer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBioChannelListWriter * self; + self = DVB_IO_CHANNEL_LIST_WRITER (object); + switch (property_id) { + case DVB_IO_CHANNEL_LIST_WRITER_FILE: + dvb_io_channel_list_writer_set_file (self, g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +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.16/src/io/ChannelListWriter.vala gnome-dvb-daemon-0.1.21/src/io/ChannelListWriter.vala --- gnome-dvb-daemon-0.1.16/src/io/ChannelListWriter.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/ChannelListWriter.vala 2010-04-19 16:47:16.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2008-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; + +namespace DVB.io { + + /** + * Example: + * try { + * var writer = new DVB.ChannelListWriter (File.new_for_path ("/path/to/channels.conf")); + * foreach (DVB.Channel c in reader.Channels) { + * writer.write (c); + * } + * writer.close (); + * } catch (IOError e) { + * error (e.message); + * } + */ + public class ChannelListWriter : GLib.Object { + + public File file {get; construct;} + + private OutputStream stream; + + private void open_stream () throws Error { + FileOutputStream fostream = null; + + if (file.query_exists (null)) { + fostream = this.file.replace (null, true, 0, null); + } else { + fostream = this.file.create (0, null); + } + + this.stream = new BufferedOutputStream (fostream); + } + + public ChannelListWriter (File file) { + base (file: file); + } + + public void write (Channel channel) throws Error { + if (this.stream == null) this.open_stream (); + if (this.stream == null) return; + + string buffer; + + // Write channel name + buffer = "%s:".printf (channel.Name); + this.stream.write_all (buffer, buffer.size(), null, null); + + // Write special data + if (channel is TerrestrialChannel) { + this.write_terrestrial_channel ((TerrestrialChannel)channel); + } else if (channel is SatelliteChannel) { + this.write_satellite_channel ((SatelliteChannel)channel); + } else if (channel is CableChannel) { + this.write_cable_channel ((CableChannel)channel); + } else { + warning ("Unknown channel type"); + } + + uint apid; + if (channel.AudioPIDs.size == 0) + apid = 0; + else + apid = channel.AudioPIDs.get (0); + + // Write common data + buffer = ":%u:%u:%u\n".printf (channel.VideoPID, + apid, channel.Sid); + this.stream.write_all (buffer, buffer.size(), null, null); + } + + public bool close () throws Error { + if (this.stream == null) return true; + return this.stream.close (null); + } + + private void write_terrestrial_channel (TerrestrialChannel channel) throws Error { + string[] elements = new string[9]; + + elements[0] = "%u".printf (channel.Frequency); + + elements[1] = get_name_without_prefix (typeof(DvbSrcInversion), + channel.Inversion, + "DVB_DVB_SRC_INVERSION_"); + + elements[2] = get_name_without_prefix (typeof(DvbSrcBandwidth), + channel.Bandwidth, + "DVB_DVB_SRC_BANDWIDTH_"); + + elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate), + channel.CodeRateHP, + "DVB_DVB_SRC_CODE_RATE_"); + + elements[4] = get_name_without_prefix (typeof(DvbSrcCodeRate), + channel.CodeRateLP, + "DVB_DVB_SRC_CODE_RATE_"); + + elements[5] = get_name_without_prefix (typeof(DvbSrcModulation), + channel.Constellation, + "DVB_DVB_SRC_MODULATION_"); + + elements[6] = get_name_without_prefix (typeof(DvbSrcTransmissionMode), + channel.TransmissionMode, + "DVB_DVB_SRC_TRANSMISSION_MODE_"); + + elements[7] = get_name_without_prefix (typeof(DvbSrcGuard), + channel.GuardInterval, + "DVB_DVB_SRC_GUARD_"); + + elements[8] = get_name_without_prefix (typeof(DvbSrcHierarchy), + channel.Hierarchy, + "DVB_DVB_SRC_HIERARCHY_"); + + string buffer = string.joinv (":", elements); + this.stream.write_all (buffer, buffer.size(), null, null); + } + + private void write_satellite_channel (SatelliteChannel channel) throws Error { + string buffer = "%u:%s:%d:%u".printf (channel.Frequency / 1000, + channel.Polarization, + channel.DiseqcSource, + channel.SymbolRate); + this.stream.write_all (buffer, buffer.size(), null, null); + } + + private void write_cable_channel (CableChannel channel) throws Error { + string[] elements = new string [5]; + + elements[0] = "%u".printf (channel.Frequency); + + elements[1] = get_name_without_prefix (typeof(DvbSrcInversion), + channel.Inversion, + "DVB_DVB_SRC_INVERSION_"); + + elements[2] = "%u".printf (channel.SymbolRate * 1000); + + elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate), + channel.CodeRate, + "DVB_DVB_SRC_CODE_RATE_"); + + elements[4] = get_name_without_prefix (typeof(DvbSrcModulation), + channel.Modulation, + "DVB_DVB_SRC_MODULATION_"); + + string buffer = string.joinv (":", elements); + this.stream.write_all (buffer, buffer.size(), null, null); + } + + private static string? get_name_without_prefix (GLib.Type enumtype, + int val, string prefix) { + string? name = Utils.get_name_by_value_from_enum (enumtype, + val); + if (name == null) return null; + else return name.substring (prefix.len (), + name.len () - prefix.len ()); + } + + } + +} diff -Nru gnome-dvb-daemon-0.1.16/src/io/RecordingReader.c gnome-dvb-daemon-0.1.21/src/io/RecordingReader.c --- gnome-dvb-daemon-0.1.16/src/io/RecordingReader.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/RecordingReader.c 2010-08-21 20:42:32.000000000 +0000 @@ -0,0 +1,654 @@ +/* RecordingReader.c generated by valac 0.9.7, the Vala compiler + * generated from RecordingReader.vala, do not modify */ + +/* + * Copyright (C) 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 + + +#define DVB_IO_TYPE_RECORDING_READER (dvb_io_recording_reader_get_type ()) +#define DVB_IO_RECORDING_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReader)) +#define DVB_IO_RECORDING_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReaderClass)) +#define DVB_IO_IS_RECORDING_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_RECORDING_READER)) +#define DVB_IO_IS_RECORDING_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_RECORDING_READER)) +#define DVB_IO_RECORDING_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReaderClass)) + +typedef struct _DVBioRecordingReader DVBioRecordingReader; +typedef struct _DVBioRecordingReaderClass DVBioRecordingReaderClass; +typedef struct _DVBioRecordingReaderPrivate DVBioRecordingReaderPrivate; + +#define DVB_TYPE_RECORDINGS_STORE (dvb_recordings_store_get_type ()) +#define DVB_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStore)) +#define DVB_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) +#define DVB_IS_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_IS_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_RECORDINGS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) + +typedef struct _DVBRecordingsStore DVBRecordingsStore; +typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; +#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))) + +#define DVB_TYPE_RECORDING (dvb_recording_get_type ()) +#define DVB_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDING, DVBRecording)) +#define DVB_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDING, DVBRecordingClass)) +#define DVB_IS_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDING)) +#define DVB_IS_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDING)) +#define DVB_RECORDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDING, DVBRecordingClass)) + +typedef struct _DVBRecording DVBRecording; +typedef struct _DVBRecordingClass DVBRecordingClass; +#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) + +struct _DVBioRecordingReader { + GObject parent_instance; + DVBioRecordingReaderPrivate * priv; +}; + +struct _DVBioRecordingReaderClass { + GObjectClass parent_class; +}; + +struct _DVBioRecordingReaderPrivate { + GFile* _directory; + DVBRecordingsStore* _store; +}; + + +static gpointer dvb_io_recording_reader_parent_class = NULL; + +GType dvb_io_recording_reader_get_type (void) G_GNUC_CONST; +GType dvb_recordings_store_get_type (void) G_GNUC_CONST; +#define DVB_IO_RECORDING_READER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReaderPrivate)) +enum { + DVB_IO_RECORDING_READER_DUMMY_PROPERTY, + DVB_IO_RECORDING_READER_DIRECTORY, + DVB_IO_RECORDING_READER_STORE +}; +#define DVB_IO_RECORDING_READER_ATTRS G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_ACCESS_CAN_READ "," G_FILE_ATTRIBUTE_STANDARD_NAME +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); +static gboolean dvb_io_recording_reader_is_readable_dir (GFile* directory); +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); +gboolean dvb_recordings_store_add_and_monitor (DVBRecordingsStore* self, DVBRecording* rec); +DVBRecording* dvb_recording_new (void); +DVBRecording* dvb_recording_construct (GType object_type); +void dvb_recording_set_Id (DVBRecording* self, guint32 value); +void dvb_recording_set_ChannelName (DVBRecording* self, const char* value); +void dvb_recording_set_Location (DVBRecording* self, GFile* value); +void dvb_utils_create_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); +void dvb_recording_set_StartTime (DVBRecording* self, struct tm* value); +void dvb_recording_set_Length (DVBRecording* self, gint64 value); +void dvb_recording_set_Name (DVBRecording* self, const char* value); +void dvb_recording_set_Description (DVBRecording* self, const char* 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); +static void dvb_io_recording_reader_finalize (GObject* obj); +static void dvb_io_recording_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void dvb_io_recording_reader_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +static int _vala_strcmp0 (const char * str1, const char * str2); + + + +/** + * @recordingsbasedir: The directory to search + */ +DVBioRecordingReader* dvb_io_recording_reader_construct (GType object_type, GFile* recordingsbasedir, DVBRecordingsStore* recstore) { + DVBioRecordingReader * self; + 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); + return self; +} + + +DVBioRecordingReader* dvb_io_recording_reader_new (GFile* recordingsbasedir, DVBRecordingsStore* recstore) { + return dvb_io_recording_reader_construct (DVB_IO_TYPE_RECORDING_READER, recordingsbasedir, recstore); +} + + +/** + * Searches recursively in the given directory + * for "info.rec" files, restores a new Recording + * from that file and adds it to itsself. + */ +gboolean dvb_io_recording_reader_load_into (DVBioRecordingReader* self) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); + if (!g_file_query_exists (self->priv->_directory, NULL)) { + char* _tmp0_; + g_debug ("RecordingReader.vala:45: Directory %s does not exist", _tmp0_ = g_file_get_path (self->priv->_directory)); + _g_free0 (_tmp0_); + result = FALSE; + return result; + } + result = dvb_io_recording_reader_restore_from_dir (self, self->priv->_directory); + return result; +} + + +static gboolean dvb_io_recording_reader_is_readable_dir (GFile* directory) { + gboolean result = FALSE; + GFileInfo* info; + GError * _inner_error_ = NULL; + g_return_val_if_fail (directory != NULL, FALSE); + info = NULL; + { + GFileInfo* _tmp0_; + GFileInfo* _tmp1_; + _tmp0_ = g_file_query_info (directory, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch9_g_error; + } + info = (_tmp1_ = _tmp0_, _g_object_unref0 (info), _tmp1_); + } + goto __finally9; + __catch9_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("RecordingReader.vala:57: Could not retrieve attributes: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _g_object_unref0 (info); + return result; + } + } + __finally9: + 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; + } + if (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY) { + char* _tmp2_; + g_critical ("RecordingReader.vala:62: %s is not a directory", _tmp2_ = g_file_get_path (directory)); + _g_free0 (_tmp2_); + result = FALSE; + _g_object_unref0 (info); + return result; + } + if (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) { + char* _tmp3_; + g_critical ("RecordingReader.vala:67: Cannot read %s", _tmp3_ = g_file_get_path (directory)); + _g_free0 (_tmp3_); + result = FALSE; + _g_object_unref0 (info); + return result; + } + result = TRUE; + _g_object_unref0 (info); + return result; +} + + +static gboolean dvb_io_recording_reader_restore_from_dir (DVBioRecordingReader* self, GFile* recordingsbasedir) { + gboolean result = FALSE; + GFileEnumerator* files; + gboolean success; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (recordingsbasedir != NULL, FALSE); + if (!dvb_io_recording_reader_is_readable_dir (recordingsbasedir)) { + result = FALSE; + return result; + } + files = NULL; + { + GFileEnumerator* _tmp0_; + GFileEnumerator* _tmp1_; + _tmp0_ = g_file_enumerate_children (recordingsbasedir, DVB_IO_RECORDING_READER_ATTRS, 0, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch10_g_error; + } + files = (_tmp1_ = _tmp0_, _g_object_unref0 (files), _tmp1_); + } + goto __finally10; + __catch10_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("RecordingReader.vala:83: Could not read directory: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _g_object_unref0 (files); + return result; + } + } + __finally10: + 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; + } + success = TRUE; + { + GFileInfo* childinfo; + childinfo = NULL; + while (TRUE) { + GFileInfo* _tmp2_; + GFileInfo* _tmp3_; + guint32 type; + GFile* child; + _tmp2_ = g_file_enumerator_next_file (files, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + _g_object_unref0 (childinfo); + goto __catch11_g_error; + } + if (!((childinfo = (_tmp3_ = _tmp2_, _g_object_unref0 (childinfo), _tmp3_)) != NULL)) { + break; + } + type = g_file_info_get_attribute_uint32 (childinfo, G_FILE_ATTRIBUTE_STANDARD_TYPE); + child = g_file_get_child (recordingsbasedir, g_file_info_get_name (childinfo)); + switch (type) { + case G_FILE_TYPE_DIRECTORY: + { + dvb_io_recording_reader_restore_from_dir (self, child); + break; + } + case G_FILE_TYPE_REGULAR: + { + if (_vala_strcmp0 (g_file_info_get_name (childinfo), "info.rec") == 0) { + DVBRecording* rec; + rec = NULL; + { + DVBRecording* _tmp4_; + DVBRecording* _tmp5_; + _tmp4_ = dvb_io_recording_reader_deserialize (self, child, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch13_g_error; + } + rec = (_tmp5_ = _tmp4_, _g_object_unref0 (rec), _tmp5_); + } + goto __finally13; + __catch13_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); + } + } + __finally13: + if (_inner_error_ != NULL) { + _g_object_unref0 (rec); + _g_object_unref0 (child); + _g_object_unref0 (childinfo); + goto __catch11_g_error; + } + if (rec != NULL) { + char* _tmp6_; + g_debug ("RecordingReader.vala:113: Restored recording from %s", _tmp6_ = g_file_get_path (child)); + _g_free0 (_tmp6_); + dvb_recordings_store_add_and_monitor (self->priv->_store, rec); + } + _g_object_unref0 (rec); + } + break; + } + } + _g_object_unref0 (child); + } + _g_object_unref0 (childinfo); + } + goto __finally11; + __catch11_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("RecordingReader.vala:124: %s", e->message); + success = FALSE; + _g_error_free0 (e); + } + } + __finally11: + { + { + g_file_enumerator_close (files, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch12_g_error; + } + } + goto __finally12; + __catch12_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); + } + } + __finally12: + if (_inner_error_ != NULL) { + _g_object_unref0 (files); + } + } + 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; + } + result = success; + _g_object_unref0 (files); + return result; +} + + +DVBRecording* dvb_io_recording_reader_deserialize (DVBioRecordingReader* self, GFile* file, GError** error) { + DVBRecording* result = NULL; + GFileInputStream* _tmp0_; + GFileInputStream* _tmp1_; + GDataInputStream* _tmp2_; + GDataInputStream* reader; + char* line; + gsize len = 0UL; + gint line_number; + DVBRecording* rec; + GString* description; + 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_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + return NULL; + } + reader = (_tmp2_ = g_data_input_stream_new ((GInputStream*) (_tmp1_ = _tmp0_)), _g_object_unref0 (_tmp1_), _tmp2_); + line = NULL; + line_number = 0; + rec = dvb_recording_new (); + description = g_string_new (""); + while (TRUE) { + char* _tmp3_; + char* _tmp4_; + _tmp3_ = g_data_input_stream_read_line (reader, &len, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_string_free0 (description); + _g_object_unref0 (rec); + _g_free0 (line); + _g_object_unref0 (reader); + return NULL; + } + if (!((line = (_tmp4_ = _tmp3_, _g_free0 (line), _tmp4_)) != NULL)) { + break; + } + switch (line_number) { + case 0: + { + dvb_recording_set_Id (rec, (guint32) atoi (line)); + break; + } + case 1: + { + dvb_recording_set_ChannelName (rec, line); + break; + } + case 2: + { + GFile* _tmp5_; + _tmp5_ = NULL; + if (len == 0) { + GFile* _tmp6_; + _tmp5_ = (_tmp6_ = NULL, _g_object_unref0 (_tmp5_), _tmp6_); + } else { + GFile* _tmp7_; + _tmp5_ = (_tmp7_ = g_file_new_for_path (line), _g_object_unref0 (_tmp5_), _tmp7_); + } + dvb_recording_set_Location (rec, _tmp5_); + _g_object_unref0 (_tmp5_); + break; + } + case 3: + { + { + gint year; + gint month; + gint day; + gint hour; + gint minute; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; + gboolean _tmp10_ = FALSE; + gboolean _tmp11_ = FALSE; + 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) { + _tmp11_ = month >= 1; + } else { + _tmp11_ = FALSE; + } + if (_tmp11_) { + _tmp10_ = day >= 1; + } else { + _tmp10_ = FALSE; + } + if (_tmp10_) { + _tmp9_ = hour >= 0; + } else { + _tmp9_ = FALSE; + } + if (_tmp9_) { + _tmp8_ = minute >= 0; + } else { + _tmp8_ = FALSE; + } + if (_tmp8_) { + struct tm _tmp12_ = {0}; + struct tm _tmp13_; + dvb_recording_set_StartTime (rec, (_tmp13_ = (dvb_utils_create_time (year, month, day, hour, minute, 0, &_tmp12_), _tmp12_), &_tmp13_)); + } + break; + } + } + case 4: + { + dvb_recording_set_Length (rec, (gint64) atoi (line)); + break; + } + case 5: + { + const char* _tmp14_; + _tmp14_ = NULL; + if (len == 0) { + _tmp14_ = NULL; + } else { + _tmp14_ = line; + } + dvb_recording_set_Name (rec, _tmp14_); + break; + } + default: + { + g_string_append (description, line); + break; + } + } + line_number++; + } + g_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_string_free0 (description); + _g_object_unref0 (rec); + _g_free0 (line); + _g_object_unref0 (reader); + return NULL; + } + dvb_recording_set_Description (rec, description->str); + result = rec; + _g_string_free0 (description); + _g_free0 (line); + _g_object_unref0 (reader); + return result; +} + + +GFile* dvb_io_recording_reader_get_directory (DVBioRecordingReader* self) { + GFile* result; + g_return_val_if_fail (self != NULL, NULL); + result = self->priv->_directory; + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void dvb_io_recording_reader_set_directory (DVBioRecordingReader* self, GFile* value) { + GFile* _tmp0_; + g_return_if_fail (self != NULL); + self->priv->_directory = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_directory), _tmp0_); + g_object_notify ((GObject *) self, "directory"); +} + + +DVBRecordingsStore* dvb_io_recording_reader_get_store (DVBioRecordingReader* self) { + DVBRecordingsStore* result; + g_return_val_if_fail (self != NULL, NULL); + result = self->priv->_store; + return result; +} + + +static void dvb_io_recording_reader_set_store (DVBioRecordingReader* self, DVBRecordingsStore* value) { + DVBRecordingsStore* _tmp0_; + g_return_if_fail (self != NULL); + self->priv->_store = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_store), _tmp0_); + g_object_notify ((GObject *) self, "store"); +} + + +static void dvb_io_recording_reader_class_init (DVBioRecordingReaderClass * klass) { + 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 = dvb_io_recording_reader_get_property; + G_OBJECT_CLASS (klass)->set_property = dvb_io_recording_reader_set_property; + 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)); +} + + +static void dvb_io_recording_reader_instance_init (DVBioRecordingReader * self) { + self->priv = DVB_IO_RECORDING_READER_GET_PRIVATE (self); +} + + +static void dvb_io_recording_reader_finalize (GObject* obj) { + DVBioRecordingReader * self; + self = DVB_IO_RECORDING_READER (obj); + _g_object_unref0 (self->priv->_directory); + _g_object_unref0 (self->priv->_store); + G_OBJECT_CLASS (dvb_io_recording_reader_parent_class)->finalize (obj); +} + + +GType dvb_io_recording_reader_get_type (void) { + static volatile gsize dvb_io_recording_reader_type_id__volatile = 0; + if (g_once_init_enter (&dvb_io_recording_reader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBioRecordingReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_io_recording_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBioRecordingReader), 0, (GInstanceInitFunc) dvb_io_recording_reader_instance_init, NULL }; + GType dvb_io_recording_reader_type_id; + dvb_io_recording_reader_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBioRecordingReader", &g_define_type_info, 0); + g_once_init_leave (&dvb_io_recording_reader_type_id__volatile, dvb_io_recording_reader_type_id); + } + return dvb_io_recording_reader_type_id__volatile; +} + + +static void dvb_io_recording_reader_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBioRecordingReader * self; + self = DVB_IO_RECORDING_READER (object); + switch (property_id) { + case DVB_IO_RECORDING_READER_DIRECTORY: + g_value_set_object (value, dvb_io_recording_reader_get_directory (self)); + break; + case DVB_IO_RECORDING_READER_STORE: + g_value_set_object (value, dvb_io_recording_reader_get_store (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void dvb_io_recording_reader_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBioRecordingReader * self; + self = DVB_IO_RECORDING_READER (object); + switch (property_id) { + case DVB_IO_RECORDING_READER_DIRECTORY: + dvb_io_recording_reader_set_directory (self, g_value_get_object (value)); + break; + case DVB_IO_RECORDING_READER_STORE: + dvb_io_recording_reader_set_store (self, g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static int _vala_strcmp0 (const char * str1, const char * str2) { + if (str1 == NULL) { + return -(str1 != str2); + } + if (str2 == NULL) { + return str1 != str2; + } + return strcmp (str1, str2); +} + + + + diff -Nru gnome-dvb-daemon-0.1.16/src/io/RecordingReader.vala gnome-dvb-daemon-0.1.21/src/io/RecordingReader.vala --- gnome-dvb-daemon-0.1.16/src/io/RecordingReader.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/RecordingReader.vala 2010-04-20 18:58:25.000000000 +0000 @@ -0,0 +1,199 @@ +/* + * Copyright (C) 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; + +namespace DVB.io { + + public class RecordingReader : GLib.Object { + + public File directory {get; construct;} + public RecordingsStore store {get; construct;} + + private static const string ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ + "," + FILE_ATTRIBUTE_STANDARD_NAME; + + /** + * @recordingsbasedir: The directory to search + */ + public RecordingReader (File recordingsbasedir, RecordingsStore recstore) { + base (directory: recordingsbasedir, store: recstore); + } + + /** + * Searches recursively in the given directory + * for "info.rec" files, restores a new Recording + * from that file and adds it to itsself. + */ + public bool load_into () { + if (!this.directory.query_exists (null)) { + debug ("Directory %s does not exist", this.directory.get_path ()); + return false; + } + + return this.restore_from_dir (this.directory); + } + + private static bool is_readable_dir (File directory) { + FileInfo info; + try { + info = directory.query_info (ATTRS, 0, null); + } catch (Error e) { + critical ("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 ()); + return false; + } + + if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) { + critical ("Cannot read %s", directory.get_path ()); + return false; + } + + return true; + } + + + private bool restore_from_dir (File recordingsbasedir) { + 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); + return false; + } + + bool success = true; + try { + FileInfo childinfo; + while ((childinfo = files.next_file (null)) != null) { + 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); + break; + + case FileType.REGULAR: + if (childinfo.get_name () == "info.rec") { + Recording rec = null; + try { + rec = this.deserialize (child); + } catch (Error e) { + critical ( + "Could not deserialize recording: %s", + e.message); + } + if (rec != null) { + debug ("Restored recording from %s", + child.get_path ()); + this.store.add_and_monitor (rec); + + + } + } + break; + } + } + } catch (Error e) { + critical ("%s", e.message); + success = false; + } finally { + try { + files.close (null); + } catch (Error e) { + critical ("Could not close file: %s", e.message); + success = false; + } + } + + return success; + } + + protected Recording? deserialize (File file) throws Error { + var reader = new DataInputStream (file.read (null)); + + string line = null; + size_t len; + int line_number = 0; + + var rec = new Recording (); + StringBuilder description = new StringBuilder (); + + while ((line = reader.read_line (out len, null)) != null) { + switch (line_number) { + case 0: + rec.Id = (uint32)line.to_int (); + break; + + case 1: + rec.ChannelName = line; + break; + + case 2: + rec.Location = (len == 0) ? null : File.new_for_path (line); + break; + + case 3: { + int year = 0; + int month = 0; + int day = 0; + int hour = 0; + int minute = 0; + line.scanf ("%d-%d-%d %d:%d", &year, &month, &day, + &hour, &minute); + if (year >= 1900 && month >= 1 && day >= 1 && hour >= 0 + && minute >= 0) { + rec.StartTime = Utils.create_time (year, month, day, hour, minute); + } + break; + } + + case 4: + rec.Length = (int64)line.to_int (); + break; + + case 5: + rec.Name = (len == 0) ? null : line; + break; + + default: + description.append (line); + break; + } + + line_number++; + } + reader.close (null); + rec.Description = description.str; + + return rec; + } + + } +} diff -Nru gnome-dvb-daemon-0.1.16/src/io/RecordingWriter.c gnome-dvb-daemon-0.1.21/src/io/RecordingWriter.c --- gnome-dvb-daemon-0.1.16/src/io/RecordingWriter.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/RecordingWriter.c 2010-08-21 20:42:32.000000000 +0000 @@ -0,0 +1,285 @@ +/* RecordingWriter.c generated by valac 0.9.7, the Vala compiler + * generated from RecordingWriter.vala, do not modify */ + +/* + * Copyright (C) 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 + + +#define DVB_IO_TYPE_RECORDING_WRITER (dvb_io_recording_writer_get_type ()) +#define DVB_IO_RECORDING_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriter)) +#define DVB_IO_RECORDING_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriterClass)) +#define DVB_IO_IS_RECORDING_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_RECORDING_WRITER)) +#define DVB_IO_IS_RECORDING_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_RECORDING_WRITER)) +#define DVB_IO_RECORDING_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriterClass)) + +typedef struct _DVBioRecordingWriter DVBioRecordingWriter; +typedef struct _DVBioRecordingWriterClass DVBioRecordingWriterClass; +typedef struct _DVBioRecordingWriterPrivate DVBioRecordingWriterPrivate; + +#define DVB_TYPE_RECORDING (dvb_recording_get_type ()) +#define DVB_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDING, DVBRecording)) +#define DVB_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDING, DVBRecordingClass)) +#define DVB_IS_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDING)) +#define DVB_IS_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDING)) +#define DVB_RECORDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDING, DVBRecordingClass)) + +typedef struct _DVBRecording DVBRecording; +typedef struct _DVBRecordingClass DVBRecordingClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _DVBioRecordingWriter { + GObject parent_instance; + DVBioRecordingWriterPrivate * priv; +}; + +struct _DVBioRecordingWriterClass { + GObjectClass parent_class; +}; + +struct _DVBioRecordingWriterPrivate { + DVBRecording* _rec; +}; + + +static gpointer dvb_io_recording_writer_parent_class = NULL; + +GType dvb_io_recording_writer_get_type (void) G_GNUC_CONST; +GType dvb_recording_get_type (void) G_GNUC_CONST; +#define DVB_IO_RECORDING_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriterPrivate)) +enum { + DVB_IO_RECORDING_WRITER_DUMMY_PROPERTY, + DVB_IO_RECORDING_WRITER_REC +}; +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); +char* dvb_io_recording_writer_serialize (DVBioRecordingWriter* self, DVBRecording* rec); +guint* dvb_recording_get_start (DVBRecording* self, int* result_length1); +const char* dvb_recording_get_Name (DVBRecording* self); +const char* dvb_recording_get_Description (DVBRecording* self); +guint32 dvb_recording_get_Id (DVBRecording* self); +const char* dvb_recording_get_ChannelName (DVBRecording* self); +gint64 dvb_recording_get_Length (DVBRecording* self); +static void dvb_io_recording_writer_set_rec (DVBioRecordingWriter* self, DVBRecording* value); +static void dvb_io_recording_writer_finalize (GObject* obj); +static void dvb_io_recording_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void dvb_io_recording_writer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); + + + +DVBioRecordingWriter* dvb_io_recording_writer_construct (GType object_type, DVBRecording* rec) { + DVBioRecordingWriter * self; + g_return_val_if_fail (rec != NULL, NULL); + self = (DVBioRecordingWriter*) g_object_new (object_type, "rec", rec, NULL); + return self; +} + + +DVBioRecordingWriter* dvb_io_recording_writer_new (DVBRecording* rec) { + return dvb_io_recording_writer_construct (DVB_IO_TYPE_RECORDING_WRITER, rec); +} + + +/** + * Stores all information of the timer in info.rec + * in the directory of this.Location + */ +void dvb_io_recording_writer_write (DVBioRecordingWriter* self, GError** error) { + GFile* parentdir; + GFile* recfile; + char* _tmp0_; + GFileOutputStream* stream; + char* text; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + parentdir = g_file_get_parent (dvb_recording_get_Location (self->priv->_rec)); + recfile = g_file_get_child (parentdir, "info.rec"); + g_debug ("RecordingWriter.vala:41: Saving recording to %s", _tmp0_ = g_file_get_path (recfile)); + _g_free0 (_tmp0_); + if (g_file_query_exists (recfile, NULL)) { + g_debug ("RecordingWriter.vala:44: Deleting old info.rec"); + g_file_delete (recfile, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (recfile); + _g_object_unref0 (parentdir); + return; + } + } + stream = g_file_create (recfile, 0, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (recfile); + _g_object_unref0 (parentdir); + return; + } + text = dvb_io_recording_writer_serialize (self, self->priv->_rec); + g_output_stream_write ((GOutputStream*) stream, text, strlen (text), NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (text); + _g_object_unref0 (stream); + _g_object_unref0 (recfile); + _g_object_unref0 (parentdir); + return; + } + g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + g_propagate_error (error, _inner_error_); + _g_free0 (text); + _g_object_unref0 (stream); + _g_object_unref0 (recfile); + _g_object_unref0 (parentdir); + return; + } + _g_free0 (text); + _g_object_unref0 (stream); + _g_object_unref0 (recfile); + _g_object_unref0 (parentdir); +} + + +char* dvb_io_recording_writer_serialize (DVBioRecordingWriter* self, DVBRecording* rec) { + char* result = NULL; + gint started_length1; + gint _started_size_; + guint* _tmp1_; + gint _tmp0_; + guint* started; + const char* _tmp2_; + const char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (rec != NULL, NULL); + started = (_tmp1_ = dvb_recording_get_start (rec, &_tmp0_), started_length1 = _tmp0_, _started_size_ = started_length1, _tmp1_); + _tmp2_ = NULL; + if (dvb_recording_get_Name (rec) == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = dvb_recording_get_Name (rec); + } + _tmp3_ = NULL; + if (dvb_recording_get_Description (rec) == NULL) { + _tmp3_ = ""; + } else { + _tmp3_ = dvb_recording_get_Description (rec); + } + result = (_tmp5_ = g_strdup_printf ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%" G_GINT64_FORMAT "\n%s\n%s", dvb_recording_get_Id (rec), dvb_recording_get_ChannelName (rec), _tmp4_ = g_file_get_path (dvb_recording_get_Location (rec)), started[0], started[1], started[2], started[3], started[4], dvb_recording_get_Length (rec), _tmp2_, _tmp3_), _g_free0 (_tmp4_), _tmp5_); + started = (g_free (started), NULL); + return result; + started = (g_free (started), NULL); +} + + +DVBRecording* dvb_io_recording_writer_get_rec (DVBioRecordingWriter* self) { + DVBRecording* result; + g_return_val_if_fail (self != NULL, NULL); + result = self->priv->_rec; + return result; +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void dvb_io_recording_writer_set_rec (DVBioRecordingWriter* self, DVBRecording* value) { + DVBRecording* _tmp0_; + g_return_if_fail (self != NULL); + self->priv->_rec = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_rec), _tmp0_); + g_object_notify ((GObject *) self, "rec"); +} + + +static void dvb_io_recording_writer_class_init (DVBioRecordingWriterClass * klass) { + 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 = dvb_io_recording_writer_get_property; + G_OBJECT_CLASS (klass)->set_property = 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)); +} + + +static void dvb_io_recording_writer_instance_init (DVBioRecordingWriter * self) { + self->priv = DVB_IO_RECORDING_WRITER_GET_PRIVATE (self); +} + + +static void dvb_io_recording_writer_finalize (GObject* obj) { + DVBioRecordingWriter * self; + self = DVB_IO_RECORDING_WRITER (obj); + _g_object_unref0 (self->priv->_rec); + G_OBJECT_CLASS (dvb_io_recording_writer_parent_class)->finalize (obj); +} + + +GType dvb_io_recording_writer_get_type (void) { + static volatile gsize dvb_io_recording_writer_type_id__volatile = 0; + if (g_once_init_enter (&dvb_io_recording_writer_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBioRecordingWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_io_recording_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBioRecordingWriter), 0, (GInstanceInitFunc) dvb_io_recording_writer_instance_init, NULL }; + GType dvb_io_recording_writer_type_id; + dvb_io_recording_writer_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBioRecordingWriter", &g_define_type_info, 0); + g_once_init_leave (&dvb_io_recording_writer_type_id__volatile, dvb_io_recording_writer_type_id); + } + return dvb_io_recording_writer_type_id__volatile; +} + + +static void dvb_io_recording_writer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + DVBioRecordingWriter * self; + self = DVB_IO_RECORDING_WRITER (object); + switch (property_id) { + case DVB_IO_RECORDING_WRITER_REC: + g_value_set_object (value, dvb_io_recording_writer_get_rec (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void dvb_io_recording_writer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + DVBioRecordingWriter * self; + self = DVB_IO_RECORDING_WRITER (object); + switch (property_id) { + case DVB_IO_RECORDING_WRITER_REC: + dvb_io_recording_writer_set_rec (self, g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + + + diff -Nru gnome-dvb-daemon-0.1.16/src/io/RecordingWriter.vala gnome-dvb-daemon-0.1.21/src/io/RecordingWriter.vala --- gnome-dvb-daemon-0.1.16/src/io/RecordingWriter.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/io/RecordingWriter.vala 2010-04-20 18:49:16.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (C) 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; + +namespace DVB.io { + + public class RecordingWriter : GLib.Object { + + public Recording rec {get; construct;} + + public RecordingWriter (Recording rec) { + base (rec: rec); + } + + /** + * Stores all information of the timer in info.rec + * in the directory of this.Location + */ + public void write () throws GLib.Error { + File parentdir = this.rec.Location.get_parent (); + + File recfile = parentdir.get_child ("info.rec"); + + debug ("Saving recording to %s", recfile.get_path() ); + + if (recfile.query_exists (null)) { + debug ("Deleting old info.rec"); + recfile.delete (null); + } + + FileOutputStream stream = recfile.create (0, null); + + string text = this.serialize (this.rec); + stream.write (text, text.size (), null); + + stream.close (null); + } + + protected string serialize (Recording rec) { + uint[] started = rec.get_start (); + return ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%"+int64.FORMAT+"\n%s\n%s").printf ( + rec.Id, rec.ChannelName, rec.Location.get_path (), + started[0], started[1], started[2], started[3], + started[4], rec.Length, + (rec.Name == null) ? "" : rec.Name, + (rec.Description == null) ? "" : rec.Description + ); + } + + } + +} diff -Nru gnome-dvb-daemon-0.1.16/src/Main.c gnome-dvb-daemon-0.1.21/src/Main.c --- gnome-dvb-daemon-0.1.16/src/Main.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Main.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Main.c generated by valac, the Vala compiler +/* Main.c generated by valac 0.9.7, the Vala compiler * generated from Main.vala, do not modify */ /* @@ -26,11 +26,11 @@ #include #include #include +#include #include +#include #include #include -#include -#include #define DVB_TYPE_MANAGER (dvb_manager_get_type ()) @@ -52,21 +52,20 @@ typedef struct _DVBRecordingsStore DVBRecordingsStore; typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; -#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) #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 _g_free0(var) (var = (g_free (var), NULL)) #define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL))) -#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))) -#define DVB_DATABASE_TYPE_TIMERS_STORE (dvb_database_timers_store_get_type ()) -#define DVB_DATABASE_TIMERS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_TIMERS_STORE, DVBdatabaseTimersStore)) -#define DVB_DATABASE_IS_TIMERS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_TIMERS_STORE)) -#define DVB_DATABASE_TIMERS_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_DATABASE_TYPE_TIMERS_STORE, DVBdatabaseTimersStoreIface)) +#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)) +#define DVB_DATABASE_CONFIG_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_DATABASE_TYPE_CONFIG_STORE, DVBdatabaseConfigStoreIface)) -typedef struct _DVBdatabaseTimersStore DVBdatabaseTimersStore; -typedef struct _DVBdatabaseTimersStoreIface DVBdatabaseTimersStoreIface; +typedef struct _DVBdatabaseConfigStore DVBdatabaseConfigStore; +typedef struct _DVBdatabaseConfigStoreIface DVBdatabaseConfigStoreIface; #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)) @@ -78,24 +77,6 @@ typedef struct _DVBDeviceGroup DVBDeviceGroup; typedef struct _DVBDeviceGroupClass DVBDeviceGroupClass; -#define DVB_TYPE_TIMER (dvb_timer_get_type ()) -#define DVB_TIMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_TIMER, DVBTimer)) -#define DVB_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_TIMER, DVBTimerClass)) -#define DVB_IS_TIMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_TIMER)) -#define DVB_IS_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_TIMER)) -#define DVB_TIMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_TIMER, DVBTimerClass)) - -typedef struct _DVBTimer DVBTimer; -typedef struct _DVBTimerClass DVBTimerClass; - -#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)) -#define DVB_DATABASE_CONFIG_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_DATABASE_TYPE_CONFIG_STORE, DVBdatabaseConfigStoreIface)) - -typedef struct _DVBdatabaseConfigStore DVBdatabaseConfigStore; -typedef struct _DVBdatabaseConfigStoreIface DVBdatabaseConfigStoreIface; - #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)) @@ -125,17 +106,12 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; +#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))) -#define DVB_TYPE_RECORDER (dvb_recorder_get_type ()) -#define DVB_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDER, DVBRecorder)) -#define DVB_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDER, DVBRecorderClass)) -#define DVB_IS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDER)) -#define DVB_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDER)) -#define DVB_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDER, DVBRecorderClass)) - -typedef struct _DVBRecorder DVBRecorder; -typedef struct _DVBRecorderClass DVBRecorderClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; typedef enum { DVB_DATABASE_SQL_ERROR_ERROR, @@ -166,14 +142,6 @@ DVB_DATABASE_SQL_ERROR_NOTADB } DVBdatabaseSqlError; #define DVB_DATABASE_SQL_ERROR dvb_database_sql_error_quark () -struct _DVBdatabaseTimersStoreIface { - GTypeInterface parent_iface; - GeeList* (*get_all_timers_of_device_group) (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error); - gboolean (*add_timer_to_device_group) (DVBdatabaseTimersStore* self, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); - gboolean (*remove_timer_from_device_group) (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error); - gboolean (*remove_all_timers_from_device_group) (DVBdatabaseTimersStore* self, guint group_id, GError** error); -}; - struct _DVBdatabaseConfigStoreIface { GTypeInterface parent_iface; GeeList* (*get_all_device_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -182,6 +150,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -190,10 +159,6 @@ gboolean (*remove_channel_from_group) (DVBdatabaseConfigStore* self, DVBChannel* channel, gint group_id, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - extern DVBManager* main_manager; DVBManager* main_manager = NULL; @@ -205,61 +170,56 @@ gboolean main_has_version = FALSE; extern gboolean main_disable_epg_scanner; gboolean main_disable_epg_scanner = FALSE; -extern gboolean main_disable_rygel; -gboolean main_disable_rygel = 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; -GType dvb_manager_get_type (void); -GType dvb_recordings_store_get_type (void); +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 char* param1, guint param2, GError** error); DVBManager* dvb_manager_get_instance (void); #define DVB_CONSTANTS_DBUS_MANAGER_PATH "/org/gnome/DVB/Manager" -gboolean main_start_manager (void); +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); DVBRecordingsStore* dvb_recordings_store_get_instance (void); -void dvb_recordings_store_update_last_id (DVBRecordingsStore* self, guint32 new_last_id); #define DVB_CONSTANTS_DBUS_RECORDINGS_STORE_PATH "/org/gnome/DVB/RecordingsStore" -gboolean main_start_recordings_store (guint32 minimum_id); +void main_on_exit (gint signum); void dvb_rtsp_server_shutdown (void); void dvb_manager_shutdown (void); void dvb_factory_shutdown (void); void dvb_recordings_store_shutdown (void); -void main_on_exit (gint signum); void main_log_func (const char* log_domain, GLogLevelFlags log_levels, const char* message); gboolean main_get_disable_epg_scanner (void); gboolean main_check_feature_version (const char* name, guint major, guint minor, guint micro); gboolean main_check_requirements (void); -static void _main_on_exit_cutils_signal_signal_handler (gint signum); -static void _main_log_func_glog_func (const char* log_domain, GLogLevelFlags log_levels, const char* message, gpointer self); -GType dvb_device_group_get_type (void); -GType dvb_timer_get_type (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_database_timers_store_get_type (void); -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); -GType dvb_device_get_type (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (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); GeeList* dvb_database_config_store_get_all_device_groups (DVBdatabaseConfigStore* self, GError** error); -gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup); -GType dvb_recorder_get_type (void); -DVBRecorder* dvb_device_group_get_recorder (DVBDeviceGroup* self); -guint dvb_device_group_get_Id (DVBDeviceGroup* self); -GeeList* dvb_database_timers_store_get_all_timers_of_device_group (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error); -guint32 dvb_timer_get_Id (DVBTimer* self); -gboolean dvb_recorder_add_timer (DVBRecorder* self, DVBTimer* new_timer, guint32* timer_id); -gboolean dvb_database_timers_store_remove_timer_from_device_group (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error); +void dvb_manager_restore_device_group_and_timers (DVBManager* self, DVBDeviceGroup* device_group); +gint main_main (char** args, int args_length1); +static void _main_on_exit_cutils_signal_signal_handler (gint signum); +static void _main_log_func_glog_func (const char* log_domain, GLogLevelFlags log_levels, const char* message, gpointer self); gboolean dvb_rtsp_server_start (void); static gboolean _dvb_rtsp_server_start_gsource_func (gpointer self); -gboolean dvb_rygel_service_start_rygel_services (void); -static gboolean _dvb_rygel_service_start_rygel_services_gsource_func (gpointer self); -gint main_main (char** args, int args_length1); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); +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[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-rygel", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_disable_rygel, "Disable exporting devices and channels for Rygel", NULL}, {NULL}}; +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 char* param1, guint param2, GError** error) { @@ -272,53 +232,71 @@ } +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); +} + + gboolean main_start_manager (void) { - gboolean result; - GError * _inner_error_; - _inner_error_ = NULL; + gboolean result = FALSE; + GError * _inner_error_ = NULL; { DBusGConnection* conn; DBusGProxy* bus; guint request_name_result; conn = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch24_g_error; + goto __catch71_g_error; } bus = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); request_name_result = _dynamic_RequestName0 (bus, DVB_CONSTANTS_DBUS_SERVICE, (guint) 0, &_inner_error_); if (_inner_error_ != NULL) { - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); - goto __catch24_g_error; + _dbus_g_connection_unref0 (conn); + goto __catch71_g_error; } if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_message ("Main.vala:55: Creating new Manager D-Bus service"); + g_message ("Main.vala:59: Creating new Manager D-Bus service"); main_manager = dvb_manager_get_instance (); _vala_dbus_register_object (dbus_g_connection_get_connection (conn), DVB_CONSTANTS_DBUS_MANAGER_PATH, (GObject*) main_manager); } else { - g_warning ("Main.vala:63: Manager D-Bus service is already running"); + g_warning ("Main.vala:67: Manager D-Bus service is already running"); result = FALSE; - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); + _dbus_g_connection_unref0 (conn); return result; } - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); + _dbus_g_connection_unref0 (conn); } - goto __finally24; - __catch24_g_error: + goto __finally71; + __catch71_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Main.vala:68: Oops %s", e->message); + g_critical ("Main.vala:72: Oops %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally24: + __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_); @@ -334,37 +312,35 @@ } -gboolean main_start_recordings_store (guint32 minimum_id) { - gboolean result; - GError * _inner_error_; - _inner_error_ = NULL; - g_message ("Main.vala:76: Creating new RecordingsStore D-Bus service"); +gboolean main_start_recordings_store (void) { + gboolean result = FALSE; + GError * _inner_error_ = NULL; + g_message ("Main.vala:80: Creating new RecordingsStore D-Bus service"); { DBusGConnection* conn; DVBRecordingsStore* _tmp0_; conn = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch25_g_error; + goto __catch72_g_error; } main_recstore = (_tmp0_ = _g_object_ref0 (dvb_recordings_store_get_instance ()), _g_object_unref0 (main_recstore), _tmp0_); - dvb_recordings_store_update_last_id (main_recstore, minimum_id); _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 __finally25; - __catch25_g_error: + goto __finally72; + __catch72_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Main.vala:88: Oops %s", e->message); + g_critical ("Main.vala:91: Oops %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally25: + __finally72: 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_); @@ -377,7 +353,7 @@ void main_on_exit (gint signum) { DVBRecordingsStore* _tmp0_; - g_message ("Main.vala:96: Exiting"); + g_message ("Main.vala:99: Exiting"); dvb_rtsp_server_shutdown (); dvb_manager_shutdown (); dvb_factory_shutdown (); @@ -397,7 +373,7 @@ gboolean main_get_disable_epg_scanner (void) { - gboolean result; + gboolean result = FALSE; result = main_disable_epg_scanner; return result; } @@ -409,7 +385,7 @@ static char* bool_to_string (gboolean self) { - char* result; + char* result = NULL; if (self) { result = g_strdup ("true"); return result; @@ -421,7 +397,7 @@ gboolean main_check_feature_version (const char* name, guint major, guint minor, guint micro) { - gboolean result; + gboolean result = FALSE; GstRegistry* reg; GstPluginFeature* feature; gboolean ret = FALSE; @@ -434,17 +410,17 @@ } else { ret = gst_plugin_feature_check_version (feature, major, minor, micro); } - g_debug ("Main.vala:128: Has %s >= %u.%u.%u: %s", name, major, minor, micro, _tmp0_ = bool_to_string (ret)); + g_debug ("Main.vala:131: Has %s >= %u.%u.%u: %s", name, major, minor, micro, _tmp0_ = bool_to_string (ret)); _g_free0 (_tmp0_); result = ret; - _gst_object_unref0 (reg); _gst_object_unref0 (feature); + _gst_object_unref0 (reg); return result; } gboolean main_check_requirements (void) { - gboolean result; + gboolean result = FALSE; gboolean val = FALSE; val = main_check_feature_version ("dvbsrc", (guint) 0, (guint) 10, (guint) 13); if (!val) { @@ -467,6 +443,70 @@ } +void main_restore_device_groups (void) { + DVBdatabaseConfigStore* config_store; + GeeList* device_groups; + GError * _inner_error_ = NULL; + config_store = dvb_factory_get_config_store (); + device_groups = NULL; + { + GeeList* _tmp0_; + GeeList* _tmp1_; + _tmp0_ = dvb_database_config_store_get_all_device_groups (config_store, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch73_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; + } + device_groups = (_tmp1_ = _tmp0_, _g_object_unref0 (device_groups), _tmp1_); + } + goto __finally73; + __catch73_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Main.vala:157: %s", e->message); + _g_error_free0 (e); + _g_object_unref0 (device_groups); + _g_object_unref0 (config_store); + return; + } + } + __finally73: + if (_inner_error_ != NULL) { + _g_object_unref0 (device_groups); + _g_object_unref0 (config_store); + 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_message ("Main.vala:161: Restoring %d device groups", gee_collection_get_size ((GeeCollection*) device_groups)); + { + GeeIterator* _device_group_it; + _device_group_it = gee_iterable_iterator ((GeeIterable*) device_groups); + while (TRUE) { + DVBDeviceGroup* device_group; + if (!gee_iterator_next (_device_group_it)) { + break; + } + device_group = (DVBDeviceGroup*) gee_iterator_get (_device_group_it); + dvb_manager_restore_device_group_and_timers (main_manager, device_group); + _g_object_unref0 (device_group); + } + _g_object_unref0 (_device_group_it); + } + _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); } @@ -478,24 +518,32 @@ static gboolean _dvb_rtsp_server_start_gsource_func (gpointer self) { - return dvb_rtsp_server_start (); + gboolean result; + result = dvb_rtsp_server_start (); + return result; +} + + +static gboolean _dvb_media_server2_start_rygel_services_gsource_func (gpointer self) { + gboolean result; + result = dvb_media_server2_start_rygel_services (); + return result; } -static gboolean _dvb_rygel_service_start_rygel_services_gsource_func (gpointer self) { - return dvb_rygel_service_start_rygel_services (); +static gboolean _dvb_media_server_start_rygel_services_gsource_func (gpointer self) { + gboolean result; + result = dvb_media_server_start_rygel_services (); + return result; } gint main_main (char** args, int args_length1) { - gint result; - GError * _inner_error_; + gint result = 0; GOptionContext* context; GMainLoop* _tmp0_; - guint32 max_id; - DVBdatabaseTimersStore* timers_store; - DVBdatabaseConfigStore* config_store; - _inner_error_ = NULL; + 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); context = g_option_context_new ("- record and watch TV shows using one or more DVB adapters"); @@ -505,7 +553,7 @@ g_option_context_parse (context, &args_length1, &args, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_OPTION_ERROR) { - goto __catch26_g_option_error; + goto __catch74_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); @@ -513,8 +561,8 @@ return 0; } } - goto __finally26; - __catch26_g_option_error: + goto __finally74; + __catch74_g_option_error: { GError * e; e = _inner_error_; @@ -528,7 +576,7 @@ return result; } } - __finally26: + __finally74: 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); @@ -557,134 +605,19 @@ _g_option_context_free0 (context); return result; } - max_id = (guint32) 0; - timers_store = dvb_factory_get_timers_store (); - config_store = dvb_factory_get_config_store (); - g_message ("Main.vala:193: Restoring device groups"); - { - GeeList* device_groups; - device_groups = dvb_database_config_store_get_all_device_groups (config_store, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch27_dvb_database_sql_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; - } - { - GeeIterator* _device_group_it; - _device_group_it = gee_iterable_iterator ((GeeIterable*) device_groups); - while (TRUE) { - DVBDeviceGroup* device_group; - if (!gee_iterator_next (_device_group_it)) { - break; - } - device_group = (DVBDeviceGroup*) gee_iterator_get (_device_group_it); - if (dvb_manager_add_device_group (main_manager, device_group)) { - DVBRecorder* rec; - GeeList* timers; - rec = _g_object_ref0 (dvb_device_group_get_recorder (device_group)); - g_message ("Main.vala:202: Restoring timers of device group %u", dvb_device_group_get_Id (device_group)); - timers = dvb_database_timers_store_get_all_timers_of_device_group (timers_store, device_group, &_inner_error_); - if (_inner_error_ != NULL) { - _g_object_unref0 (rec); - _g_object_unref0 (device_group); - _g_object_unref0 (_device_group_it); - _g_object_unref0 (device_groups); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch27_dvb_database_sql_error; - } - _g_object_unref0 (rec); - _g_object_unref0 (device_group); - _g_object_unref0 (_device_group_it); - _g_object_unref0 (device_groups); - _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; - } - { - GeeIterator* _t_it; - _t_it = gee_iterable_iterator ((GeeIterable*) timers); - while (TRUE) { - DVBTimer* t; - guint32 rec_id = 0U; - if (!gee_iterator_next (_t_it)) { - break; - } - t = (DVBTimer*) gee_iterator_get (_t_it); - if (dvb_timer_get_Id (t) > max_id) { - max_id = dvb_timer_get_Id (t); - } - if (!dvb_recorder_add_timer (rec, t, &rec_id)) { - dvb_database_timers_store_remove_timer_from_device_group (timers_store, (guint) dvb_timer_get_Id (t), device_group, &_inner_error_); - if (_inner_error_ != NULL) { - _g_object_unref0 (t); - _g_object_unref0 (_t_it); - _g_object_unref0 (rec); - _g_object_unref0 (timers); - _g_object_unref0 (device_group); - _g_object_unref0 (_device_group_it); - _g_object_unref0 (device_groups); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch27_dvb_database_sql_error; - } - _g_object_unref0 (t); - _g_object_unref0 (_t_it); - _g_object_unref0 (rec); - _g_object_unref0 (timers); - _g_object_unref0 (device_group); - _g_object_unref0 (_device_group_it); - _g_object_unref0 (device_groups); - _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_object_unref0 (t); - } - _g_object_unref0 (_t_it); - } - _g_object_unref0 (rec); - _g_object_unref0 (timers); - } - _g_object_unref0 (device_group); - } - _g_object_unref0 (_device_group_it); - } - _g_object_unref0 (device_groups); - } - goto __finally27; - __catch27_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("Main.vala:214: %s", e->message); - _g_error_free0 (e); - } - } - __finally27: - 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; - } - timers_store = NULL; - config_store = NULL; - if (!main_start_recordings_store (max_id)) { + if (!main_start_recordings_store ()) { 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_rygel) { - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_rygel_service_start_rygel_services_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); + } } g_main_loop_run (main_mainloop); result = 0; @@ -694,30 +627,10 @@ int main (int argc, char ** argv) { - g_thread_init (NULL); g_type_init (); return main_main (argv, argc); } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/Main.vala gnome-dvb-daemon-0.1.21/src/Main.vala --- gnome-dvb-daemon-0.1.16/src/Main.vala 2009-11-14 11:26:04.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Main.vala 2010-08-11 13:08:59.000000000 +0000 @@ -26,7 +26,8 @@ private static bool has_debug; private static bool has_version; private static bool disable_epg_scanner; - private static bool disable_rygel; + private static bool disable_mediaserver; + private static bool enable_mediaserver2; private static MainLoop mainloop; const OptionEntry[] options = { @@ -36,8 +37,11 @@ "Display version number", null}, { "disable-epg-scanner", 0, 0, OptionArg.NONE, out disable_epg_scanner, "Disable scanning for EPG data", null}, - { "disable-rygel", 0, 0, OptionArg.NONE, - out disable_rygel, "Disable exporting devices and channels for Rygel", 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", + null}, { null } }; @@ -65,27 +69,26 @@ } } catch (Error e) { - error ("Oops %s", e.message); + critical ("Oops %s", e.message); return false; } return true; } - private static bool start_recordings_store (uint32 minimum_id) { + 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 (); - recstore.update_last_id (minimum_id); conn.register_object ( DVB.Constants.DBUS_RECORDINGS_STORE_PATH, recstore); } catch (Error e) { - error ("Oops %s", e.message); + critical ("Oops %s", e.message); return false; } @@ -143,8 +146,28 @@ val = check_feature_version ("rtpmp2tpay", 0, 10, 14); return val; } + + private static void restore_device_groups () { + DVB.database.ConfigStore config_store = DVB.Factory.get_config_store (); + + Gee.List device_groups; + try { + device_groups = config_store.get_all_device_groups (); + } catch (DVB.database.SqlError e) { + critical ("%s", e.message); + return; + } + + message ("Restoring %d device groups", device_groups.size); + foreach (DVB.DeviceGroup device_group in device_groups) { + manager.restore_device_group_and_timers (device_group); + } + } public static int main (string[] args) { + // set timezone to avoid that strftime stats /etc/localtime on every call + Environment.set_variable ("TZ", "/etc/localtime", false); + cUtils.Signal.connect (cUtils.Signal.SIGINT, on_exit); cUtils.Signal.connect (cUtils.Signal.SIGTERM, on_exit); @@ -184,44 +207,19 @@ } if (!start_manager ()) return -1; - - uint32 max_id = 0; - - weak DVB.database.TimersStore timers_store = DVB.Factory.get_timers_store (); - weak DVB.database.ConfigStore config_store = DVB.Factory.get_config_store (); - - message ("Restoring device groups"); - try { - Gee.List device_groups = config_store.get_all_device_groups (); - foreach (DVB.DeviceGroup device_group in device_groups) { - - if (manager.add_device_group (device_group)) { - DVB.Recorder rec = device_group.recorder; - - // Restore timers - message ("Restoring timers of device group %u", device_group.Id); - Gee.List timers = timers_store.get_all_timers_of_device_group (device_group); - foreach (DVB.Timer t in timers) { - if (t.Id > max_id) max_id = t.Id; - uint32 rec_id; - if (!rec.add_timer (t, out rec_id)) - timers_store.remove_timer_from_device_group (t.Id, device_group); - } - } - - } - } catch (DVB.database.SqlError e) { - critical ("%s", e.message); - } - timers_store = null; - config_store = null; - if (!start_recordings_store (max_id)) return -1; + if (!start_recordings_store ()) return -1; + + restore_device_groups (); Idle.add (DVB.RTSPServer.start); - if (!disable_rygel) - Idle.add (DVB.RygelService.start_rygel_services); + if (!disable_mediaserver) { + if (enable_mediaserver2) + Idle.add (DVB.MediaServer2.start_rygel_services); + else + Idle.add (DVB.MediaServer.start_rygel_services); + } // Start GLib mainloop mainloop.run (); diff -Nru gnome-dvb-daemon-0.1.16/src/Manager.c gnome-dvb-daemon-0.1.21/src/Manager.c --- gnome-dvb-daemon-0.1.16/src/Manager.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Manager.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Manager.c generated by valac, the Vala compiler +/* Manager.c generated by valac 0.9.7, the Vala compiler * generated from Manager.vala, do not modify */ /* @@ -27,8 +27,10 @@ #include #include #include -#include +#include #include +#include +#include #define DVB_TYPE_ID_BUS_MANAGER (dvb_id_bus_manager_get_type ()) @@ -85,16 +87,6 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; -#define DVB_TYPE_EPG_SCANNER (dvb_epg_scanner_get_type ()) -#define DVB_EPG_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EPG_SCANNER, DVBEPGScanner)) -#define DVB_EPG_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_EPG_SCANNER, DVBEPGScannerClass)) -#define DVB_IS_EPG_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_EPG_SCANNER)) -#define DVB_IS_EPG_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_EPG_SCANNER)) -#define DVB_EPG_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_EPG_SCANNER, DVBEPGScannerClass)) - -typedef struct _DVBEPGScanner DVBEPGScanner; -typedef struct _DVBEPGScannerClass DVBEPGScannerClass; - #define DVB_TYPE_ADAPTER_TYPE (dvb_adapter_type_get_type ()) #define DVB_TYPE_TERRESTRIAL_SCANNER (dvb_terrestrial_scanner_get_type ()) @@ -127,6 +119,8 @@ typedef struct _DVBCableScanner DVBCableScanner; typedef struct _DVBCableScannerClass DVBCableScannerClass; #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_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)) @@ -155,7 +149,9 @@ typedef struct _DVBChannel DVBChannel; typedef struct _DVBChannelClass DVBChannelClass; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) +#define __g_list_free_g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_hash_table_unref (var), NULL))) +#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_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)) @@ -175,24 +171,6 @@ typedef struct _DVBChannelList DVBChannelList; typedef struct _DVBChannelListClass DVBChannelListClass; -#define DVB_DATABASE_TYPE_EPG_STORE (dvb_database_epg_store_get_type ()) -#define DVB_DATABASE_EPG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_EPG_STORE, DVBdatabaseEPGStore)) -#define DVB_DATABASE_IS_EPG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_EPG_STORE)) -#define DVB_DATABASE_EPG_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_DATABASE_TYPE_EPG_STORE, DVBdatabaseEPGStoreIface)) - -typedef struct _DVBdatabaseEPGStore DVBdatabaseEPGStore; -typedef struct _DVBdatabaseEPGStoreIface DVBdatabaseEPGStoreIface; - -#define DVB_TYPE_EVENT (dvb_event_get_type ()) -#define DVB_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT, DVBEvent)) -#define DVB_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_EVENT, DVBEventClass)) -#define DVB_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_EVENT)) -#define DVB_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_EVENT)) -#define DVB_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_EVENT, DVBEventClass)) - -typedef struct _DVBEvent DVBEvent; -typedef struct _DVBEventClass DVBEventClass; - #define DVB_DATABASE_TYPE_TIMERS_STORE (dvb_database_timers_store_get_type ()) #define DVB_DATABASE_TIMERS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_TIMERS_STORE, DVBdatabaseTimersStore)) #define DVB_DATABASE_IS_TIMERS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_TIMERS_STORE)) @@ -210,7 +188,44 @@ typedef struct _DVBTimer DVBTimer; typedef struct _DVBTimerClass DVBTimerClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; + +#define DVB_TYPE_RECORDER (dvb_recorder_get_type ()) +#define DVB_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDER, DVBRecorder)) +#define DVB_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDER, DVBRecorderClass)) +#define DVB_IS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDER)) +#define DVB_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDER)) +#define DVB_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDER, DVBRecorderClass)) + +typedef struct _DVBRecorder DVBRecorder; +typedef struct _DVBRecorderClass DVBRecorderClass; + +#define DVB_TYPE_RECORDINGS_STORE (dvb_recordings_store_get_type ()) +#define DVB_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStore)) +#define DVB_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) +#define DVB_IS_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_IS_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_RECORDINGS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) + +typedef struct _DVBRecordingsStore DVBRecordingsStore; +typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; + +#define DVB_DATABASE_TYPE_EPG_STORE (dvb_database_epg_store_get_type ()) +#define DVB_DATABASE_EPG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_DATABASE_TYPE_EPG_STORE, DVBdatabaseEPGStore)) +#define DVB_DATABASE_IS_EPG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_TYPE_EPG_STORE)) +#define DVB_DATABASE_EPG_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DVB_DATABASE_TYPE_EPG_STORE, DVBdatabaseEPGStoreIface)) + +typedef struct _DVBdatabaseEPGStore DVBdatabaseEPGStore; +typedef struct _DVBdatabaseEPGStoreIface DVBdatabaseEPGStoreIface; + +#define DVB_TYPE_EVENT (dvb_event_get_type ()) +#define DVB_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_EVENT, DVBEvent)) +#define DVB_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_EVENT, DVBEventClass)) +#define DVB_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_EVENT)) +#define DVB_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_EVENT)) +#define DVB_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_EVENT, DVBEventClass)) + +typedef struct _DVBEvent DVBEvent; +typedef struct _DVBEventClass DVBEventClass; struct _DVBChannelGroupInfo { gint id; @@ -228,6 +243,7 @@ DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); gboolean (*AddChannelGroup) (DVBIDBusManager* self, const char* 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 _DVBManager { @@ -245,6 +261,7 @@ GeeHashMap* devices; GStaticRecMutex __lock_devices; guint device_group_counter; + GUdevClient* udev_client; }; typedef enum { @@ -254,6 +271,14 @@ DVB_ADAPTER_TYPE_DVB_C } DVBAdapterType; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + +typedef enum { + DVB_DEVICE_ERROR_UNKNOWN_TYPE +} DVBDeviceError; +#define DVB_DEVICE_ERROR dvb_device_error_quark () typedef enum { DVB_DATABASE_SQL_ERROR_ERROR, DVB_DATABASE_SQL_ERROR_INTERNAL, @@ -291,6 +316,7 @@ gboolean (*add_device_to_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*remove_device_from_group) (DVBdatabaseConfigStore* self, DVBDevice* dev, DVBDeviceGroup* devgroup, GError** error); gboolean (*update_from_group) (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); + gboolean (*get_parent_group) (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); gboolean (*add_channel_group) (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); gboolean (*remove_channel_group) (DVBdatabaseConfigStore* self, gint group_id, GError** error); GeeList* (*get_channel_groups) (DVBdatabaseConfigStore* self, GError** error); @@ -314,16 +340,6 @@ gboolean (*SetRecordingsDirectory) (DVBIDBusDeviceGroup* self, const char* location, GError** error); }; -struct _DVBdatabaseEPGStoreIface { - GTypeInterface parent_iface; - gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); - DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); - gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); - gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); - GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); - gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); -}; - struct _DVBdatabaseTimersStoreIface { GTypeInterface parent_iface; GeeList* (*get_all_timers_of_device_group) (DVBdatabaseTimersStore* self, DVBDeviceGroup* dev, GError** error); @@ -332,8 +348,15 @@ gboolean (*remove_all_timers_from_device_group) (DVBdatabaseTimersStore* self, guint group_id, GError** error); }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); +struct _DVBdatabaseEPGStoreIface { + GTypeInterface parent_iface; + gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); + DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); + gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); + GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); }; @@ -344,111 +367,136 @@ static gpointer dvb_manager_parent_class = NULL; static DVBIDBusManagerIface* dvb_manager_dvb_id_bus_manager_parent_iface = NULL; -GType dvb_channel_group_info_get_type (void); +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); -GType dvb_manager_get_type (void); -GType dvb_scanner_get_type (void); -GType dvb_device_group_get_type (void); +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; +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 }; +DVBManager* dvb_manager_get_instance (void); DVBManager* dvb_manager_new (void); DVBManager* dvb_manager_construct (GType object_type); -DVBManager* dvb_manager_get_instance (void); -void dvb_scanner_Destroy (DVBScanner* self, GError** error); -void dvb_device_group_destroy (DVBDeviceGroup* self); void dvb_manager_shutdown (void); +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, char** dbusiface, GError** error); #define DVB_CONSTANTS_DBUS_SCANNER_PATH "/org/gnome/DVB/Scanner/%d/%d" -GType dvb_device_get_type (void); +GType dvb_device_get_type (void) G_GNUC_CONST; static DVBDevice* dvb_manager_get_registered_device (DVBManager* self, guint adapter, guint frontend); -DVBDevice* dvb_device_new (guint adapter, guint frontend, gboolean get_type_and_name); -DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend, gboolean get_type_and_name); +DVBDevice* dvb_device_new_with_type (guint adapter, guint frontend); static DVBDeviceGroup* dvb_manager_get_device_group_of_device (DVBManager* self, DVBDevice* device); -GType dvb_epg_scanner_get_type (void); -DVBEPGScanner* dvb_device_group_get_epgscanner (DVBDeviceGroup* self); -void dvb_epg_scanner_stop (DVBEPGScanner* self); -GType dvb_adapter_type_get_type (void); +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); DVBTerrestrialScanner* dvb_terrestrial_scanner_new (DVBDevice* device); DVBTerrestrialScanner* dvb_terrestrial_scanner_construct (GType object_type, DVBDevice* device); -GType dvb_terrestrial_scanner_get_type (void); +GType dvb_terrestrial_scanner_get_type (void) G_GNUC_CONST; DVBSatelliteScanner* dvb_satellite_scanner_new (DVBDevice* device); DVBSatelliteScanner* dvb_satellite_scanner_construct (GType object_type, DVBDevice* device); -GType dvb_satellite_scanner_get_type (void); +GType dvb_satellite_scanner_get_type (void) G_GNUC_CONST; DVBCableScanner* dvb_cable_scanner_new (DVBDevice* device); DVBCableScanner* dvb_cable_scanner_construct (GType object_type, DVBDevice* device); -GType dvb_cable_scanner_get_type (void); +GType dvb_cable_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_GetScannerForDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** opath, char** dbusiface, GError** error); -#define DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH "/org/gnome/DVB/DeviceGroup/%u" +static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); +static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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 DVBDevice* dvb_manager_create_device (guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, guint group_id); +static gboolean dvb_manager_real_AddDeviceToNewGroup (DVBIDBusManager* base, guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, const char* 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); 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 char* value); -gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup); -static gboolean dvb_manager_real_AddDeviceToNewGroup (DVBIDBusManager* base, guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, const char* name, GError** error); -const char* dvb_device_get_Name (DVBDevice* self); +gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group); static gboolean dvb_manager_real_GetNameOfRegisteredDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** name, GError** error); +const char* 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); GQuark dvb_database_sql_error_quark (void); -GType dvb_channel_group_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_database_config_store_get_type (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); GeeList* dvb_database_config_store_get_channel_groups (DVBdatabaseConfigStore* self, GError** error); gint dvb_channel_group_get_id (DVBChannelGroup* self); const char* dvb_channel_group_get_name (DVBChannelGroup* self); static void _vala_DVBChannelGroupInfo_array_free (DVBChannelGroupInfo* array, gint array_length); -static DVBChannelGroupInfo* dvb_manager_real_GetChannelGroups (DVBIDBusManager* base, int* result_length1, GError** error); -gboolean dvb_database_config_store_add_channel_group (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); static gboolean dvb_manager_real_AddChannelGroup (DVBIDBusManager* base, const char* name, gint* channel_group_id, GError** error); -gboolean dvb_database_config_store_remove_channel_group (DVBdatabaseConfigStore* self, gint group_id, GError** error); +gboolean dvb_database_config_store_add_channel_group (DVBdatabaseConfigStore* self, const char* name, gint* channel_group_id, GError** error); static gboolean dvb_manager_real_RemoveChannelGroup (DVBIDBusManager* base, gint channel_group_id, GError** error); +gboolean dvb_database_config_store_remove_channel_group (DVBdatabaseConfigStore* self, gint group_id, GError** error); +static GHashTable** dvb_manager_real_GetDevices (DVBIDBusManager* base, int* result_length1, GError** error); +static void _g_list_free_g_hash_table_unref (GList* self); +static void _g_list_free_g_object_unref (GList* self); +gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup); 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); -static void dvb_manager_on_device_removed_from_group (DVBManager* self, DVBDeviceGroup* devgroup, guint adapter, guint frontend); -static void _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed (DVBDeviceGroup* _sender, guint adapter, guint frontend, gpointer self); -GType dvb_id_bus_device_group_get_type (void); -gboolean main_get_disable_epg_scanner (void); -gboolean dvb_epg_scanner_start (DVBEPGScanner* self); -void dvb_device_set_RecordingsDirectory (DVBDevice* self, GFile* value); -GType dvb_channel_list_get_type (void); -DVBChannelList* dvb_channel_list_restore_from_file (GFile* channelsfile, DVBAdapterType type, guint group_id, GError** error); -void dvb_device_set_Channels (DVBDevice* self, DVBChannelList* value); +DVBIDBusDeviceGroup* dvb_id_bus_device_group_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); +void dvb_device_group_start_epg_scanner (DVBDeviceGroup* self); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; +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); +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); +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); +guint32 dvb_timer_get_Id (DVBTimer* self); +gboolean dvb_recorder_add_timer (DVBRecorder* self, DVBTimer* new_timer, guint32* timer_id); +gboolean dvb_database_timers_store_remove_timer_from_device_group (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error); +GType dvb_recordings_store_get_type (void) G_GNUC_CONST; +DVBRecordingsStore* dvb_recordings_store_get_instance (void); +void dvb_recordings_store_update_last_id (DVBRecordingsStore* self, guint32 new_last_id); +void dvb_manager_restore_device_group_and_timers (DVBManager* self, DVBDeviceGroup* device_group); DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id); gboolean dvb_device_group_contains (DVBDeviceGroup* self, DVBDevice* device); DVBDevice* dvb_scanner_get_Device (DVBScanner* self); guint dvb_device_get_Adapter (DVBDevice* self); guint dvb_device_get_Frontend (DVBDevice* self); +DVBDevice* dvb_device_new (guint adapter, guint frontend); +DVBDevice* dvb_device_construct (GType object_type, guint adapter, guint frontend); gboolean dvb_device_equal (DVBDevice* dev1, DVBDevice* dev2); gboolean dvb_database_config_store_remove_device_group (DVBdatabaseConfigStore* self, DVBDeviceGroup* devgroup, GError** error); 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); -GType dvb_database_epg_store_get_type (void); +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); gboolean dvb_database_epg_store_remove_events_of_group (DVBdatabaseEPGStore* self, guint group_id, GError** error); -GType dvb_timer_get_type (void); -GType dvb_database_timers_store_get_type (void); -DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); 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); +GeeList* dvb_database_config_store_get_all_device_groups (DVBdatabaseConfigStore* self, GError** error); +static void dvb_manager_on_udev_event (DVBManager* self, const char* action, GUdevDevice* device); +gboolean dvb_database_config_store_get_parent_group (DVBdatabaseConfigStore* self, guint adapter, guint frontend, guint* group_id, GError** error); +gboolean dvb_device_group_add (DVBDeviceGroup* self, DVBDevice* device); +gboolean dvb_device_group_remove (DVBDeviceGroup* self, DVBDevice* device); GeeCollection* dvb_manager_get_device_groups (DVBManager* self); +static void _dvb_manager_on_udev_event_g_udev_client_uevent (GUdevClient* _sender, const char* action, GUdevDevice* device, gpointer self); static GObject * dvb_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); void dvb_manager_dbus_register_object (DBusConnection* connection, const char* path, void* object); void _dvb_manager_dbus_unregister (DBusConnection* connection, void* _user_data_); @@ -458,15 +506,15 @@ static void 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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); +static int _vala_strcmp0 (const char * str1, const char * str2); +static const char* DVB_MANAGER_UDEV_SUBSYSTEMS[2] = {"dvb", NULL}; 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}; DVBManager* dvb_manager_get_instance (void) { - DVBManager* result; + DVBManager* result = NULL; g_static_rec_mutex_lock (&dvb_manager_instance_mutex); if (dvb_manager_instance == NULL) { DVBManager* _tmp0_; @@ -484,83 +532,127 @@ void dvb_manager_shutdown (void) { - GError * _inner_error_; DVBManager* m; - _inner_error_ = NULL; + GError * _inner_error_ = NULL; g_static_rec_mutex_lock (&dvb_manager_instance_mutex); m = _g_object_ref0 (dvb_manager_instance); if (dvb_manager_instance != NULL) { - DVBManager* _tmp4_; - g_static_rec_mutex_lock (&m->priv->__lock_scanners); + GUdevClient* _tmp0_; + DVBManager* _tmp5_; + m->priv->udev_client = (_tmp0_ = NULL, _g_object_unref0 (m->priv->udev_client), _tmp0_); { + g_static_rec_mutex_lock (&m->priv->__lock_scanners); { - GeeCollection* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _scanner_it; - _scanner_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values ((GeeMap*) m->priv->scanners))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - DVBScanner* scanner; - if (!gee_iterator_next (_scanner_it)) { - break; - } - scanner = (DVBScanner*) gee_iterator_get (_scanner_it); - g_debug ("Manager.vala:68: Stopping scanner"); - dvb_scanner_Destroy (scanner, &_inner_error_); - if (_inner_error_ != NULL) { + { + GeeCollection* _tmp1_; + GeeIterator* _tmp2_; + GeeIterator* _scanner_it; + _scanner_it = (_tmp2_ = gee_iterable_iterator ((GeeIterable*) (_tmp1_ = gee_map_get_values ((GeeMap*) m->priv->scanners))), _g_object_unref0 (_tmp1_), _tmp2_); + while (TRUE) { + DVBScanner* scanner; + if (!gee_iterator_next (_scanner_it)) { + break; + } + scanner = (DVBScanner*) gee_iterator_get (_scanner_it); + g_debug ("Manager.vala:73: Stopping scanner"); + dvb_scanner_do_destroy (scanner); _g_object_unref0 (scanner); - _g_object_unref0 (_scanner_it); - _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); - g_clear_error (&_inner_error_); - return; } - _g_object_unref0 (scanner); + _g_object_unref0 (_scanner_it); } - _g_object_unref0 (_scanner_it); + gee_abstract_map_clear ((GeeAbstractMap*) m->priv->scanners); + } + __finally75: + { + g_static_rec_mutex_unlock (&m->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); + g_clear_error (&_inner_error_); + return; } - gee_abstract_map_clear ((GeeAbstractMap*) m->priv->scanners); } - g_static_rec_mutex_unlock (&m->priv->__lock_scanners); - g_static_rec_mutex_lock (&m->priv->__lock_devices); { + g_static_rec_mutex_lock (&m->priv->__lock_devices); { - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _devgrp_it; - _devgrp_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_values ((GeeMap*) m->priv->devices))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - DVBDeviceGroup* devgrp; - if (!gee_iterator_next (_devgrp_it)) { - break; + { + GeeCollection* _tmp3_; + GeeIterator* _tmp4_; + GeeIterator* _devgrp_it; + _devgrp_it = (_tmp4_ = gee_iterable_iterator ((GeeIterable*) (_tmp3_ = gee_map_get_values ((GeeMap*) m->priv->devices))), _g_object_unref0 (_tmp3_), _tmp4_); + while (TRUE) { + DVBDeviceGroup* devgrp; + if (!gee_iterator_next (_devgrp_it)) { + break; + } + devgrp = (DVBDeviceGroup*) gee_iterator_get (_devgrp_it); + dvb_device_group_destroy (devgrp); + _g_object_unref0 (devgrp); } - devgrp = (DVBDeviceGroup*) gee_iterator_get (_devgrp_it); - dvb_device_group_destroy (devgrp); - _g_object_unref0 (devgrp); + _g_object_unref0 (_devgrp_it); } - _g_object_unref0 (_devgrp_it); + gee_abstract_map_clear ((GeeAbstractMap*) m->priv->devices); + } + __finally76: + { + g_static_rec_mutex_unlock (&m->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); + g_clear_error (&_inner_error_); + return; } - gee_abstract_map_clear ((GeeAbstractMap*) m->priv->devices); } - g_static_rec_mutex_unlock (&m->priv->__lock_devices); - dvb_manager_instance = (_tmp4_ = NULL, _g_object_unref0 (dvb_manager_instance), _tmp4_); + dvb_manager_instance = (_tmp5_ = NULL, _g_object_unref0 (dvb_manager_instance), _tmp5_); } g_static_rec_mutex_unlock (&dvb_manager_instance_mutex); _g_object_unref0 (m); } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @opath: Object path of the scanner service + * @dbusiface: DBus interface of the scanner service + * @returns: TRUE on success + * + * Get the object path of the channel scanner for this device. + */ static void _dvb_manager_on_scanner_destroyed_dvb_scanner_destroyed (DVBScanner* _sender, gpointer self) { dvb_manager_on_scanner_destroyed (self, _sender); } +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 gboolean dvb_manager_real_GetScannerForDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** opath, char** dbusiface, GError** error) { DVBManager * self; - gboolean result; + gboolean result = FALSE; char* path; char* _tmp0_; DVBDevice* device; DVBDevice* reg_dev; + GError * _inner_error_ = NULL; self = (DVBManager*) base; if (opath != NULL) { *opath = NULL; @@ -574,223 +666,363 @@ reg_dev = dvb_manager_get_registered_device (self, adapter, frontend); if (reg_dev == NULL) { DVBDevice* _tmp1_; - device = (_tmp1_ = dvb_device_new (adapter, frontend, TRUE), _g_object_unref0 (device), _tmp1_); + device = (_tmp1_ = dvb_device_new_with_type (adapter, frontend), _g_object_unref0 (device), _tmp1_); } else { DVBDeviceGroup* _tmp2_; - DVBEPGScanner* _tmp3_; - DVBEPGScanner* epgscanner; - DVBDevice* _tmp4_; - epgscanner = (_tmp3_ = _g_object_ref0 (dvb_device_group_get_epgscanner (_tmp2_ = dvb_manager_get_device_group_of_device (self, reg_dev))), _g_object_unref0 (_tmp2_), _tmp3_); - if (epgscanner != NULL) { - dvb_epg_scanner_stop (epgscanner); - } - device = (_tmp4_ = _g_object_ref0 (reg_dev), _g_object_unref0 (device), _tmp4_); - _g_object_unref0 (epgscanner); + DVBDevice* _tmp3_; + dvb_device_group_stop_epg_scanner (_tmp2_ = dvb_manager_get_device_group_of_device (self, reg_dev)); + _g_object_unref0 (_tmp2_); + device = (_tmp3_ = _g_object_ref0 (reg_dev), _g_object_unref0 (device), _tmp3_); } switch (dvb_device_get_Type (device)) { case DVB_ADAPTER_TYPE_DVB_T: { - char* _tmp5_; - *dbusiface = (_tmp5_ = g_strdup ("org.gnome.DVB.Scanner.Terrestrial"), _g_free0 (*dbusiface), _tmp5_); + char* _tmp4_; + *dbusiface = (_tmp4_ = g_strdup ("org.gnome.DVB.Scanner.Terrestrial"), _g_free0 (*dbusiface), _tmp4_); break; } case DVB_ADAPTER_TYPE_DVB_S: { - char* _tmp6_; - *dbusiface = (_tmp6_ = g_strdup ("org.gnome.DVB.Scanner.Satellite"), _g_free0 (*dbusiface), _tmp6_); + char* _tmp5_; + *dbusiface = (_tmp5_ = g_strdup ("org.gnome.DVB.Scanner.Satellite"), _g_free0 (*dbusiface), _tmp5_); break; } case DVB_ADAPTER_TYPE_DVB_C: { - char* _tmp7_; - *dbusiface = (_tmp7_ = g_strdup ("org.gnome.DVB.Scanner.Cable"), _g_free0 (*dbusiface), _tmp7_); + char* _tmp6_; + *dbusiface = (_tmp6_ = g_strdup ("org.gnome.DVB.Scanner.Cable"), _g_free0 (*dbusiface), _tmp6_); break; } default: { - char* _tmp8_; - *dbusiface = (_tmp8_ = NULL, _g_free0 (*dbusiface), _tmp8_); + char* _tmp7_; + *dbusiface = (_tmp7_ = NULL, _g_free0 (*dbusiface), _tmp7_); break; } } if ((*dbusiface) == NULL) { - char* _tmp9_; - g_critical ("Manager.vala:136: Unknown adapter type"); - *dbusiface = (_tmp9_ = g_strdup (""), _g_free0 (*dbusiface), _tmp9_); + char* _tmp8_; + g_critical ("Manager.vala:138: Unknown adapter type"); + *dbusiface = (_tmp8_ = g_strdup (""), _g_free0 (*dbusiface), _tmp8_); result = FALSE; - _g_free0 (path); - _g_object_unref0 (device); _g_object_unref0 (reg_dev); + _g_object_unref0 (device); + _g_free0 (path); return result; } - g_static_rec_mutex_lock (&self->priv->__lock_scanners); { - if (!gee_map_contains ((GeeMap*) self->priv->scanners, path)) { - DVBScanner* scanner; - DBusGConnection* conn; - scanner = NULL; - switch (dvb_device_get_Type (device)) { - case DVB_ADAPTER_TYPE_DVB_T: - { - DVBScanner* _tmp10_; - scanner = (_tmp10_ = (DVBScanner*) dvb_terrestrial_scanner_new (device), _g_object_unref0 (scanner), _tmp10_); - break; + g_static_rec_mutex_lock (&self->priv->__lock_scanners); + { + if (!gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->scanners, path)) { + DVBScanner* scanner; + DBusGConnection* conn; + scanner = NULL; + switch (dvb_device_get_Type (device)) { + case DVB_ADAPTER_TYPE_DVB_T: + { + DVBScanner* _tmp9_; + scanner = (_tmp9_ = (DVBScanner*) dvb_terrestrial_scanner_new (device), _g_object_unref0 (scanner), _tmp9_); + break; + } + case DVB_ADAPTER_TYPE_DVB_S: + { + DVBScanner* _tmp10_; + scanner = (_tmp10_ = (DVBScanner*) dvb_satellite_scanner_new (device), _g_object_unref0 (scanner), _tmp10_); + break; + } + case DVB_ADAPTER_TYPE_DVB_C: + { + DVBScanner* _tmp11_; + scanner = (_tmp11_ = (DVBScanner*) dvb_cable_scanner_new (device), _g_object_unref0 (scanner), _tmp11_); + break; + } } - case DVB_ADAPTER_TYPE_DVB_S: - { - DVBScanner* _tmp11_; - scanner = (_tmp11_ = (DVBScanner*) dvb_satellite_scanner_new (device), _g_object_unref0 (scanner), _tmp11_); - break; + 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); + return result; } - case DVB_ADAPTER_TYPE_DVB_C: - { - DVBScanner* _tmp12_; - scanner = (_tmp12_ = (DVBScanner*) dvb_cable_scanner_new (device), _g_object_unref0 (scanner), _tmp12_); - break; + 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); + conn = dvb_utils_get_dbus_connection (); + 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); + return result; } - } - if (scanner == NULL) { - g_critical ("Manager.vala:159: Unknown adapter type"); - result = FALSE; + _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); - _g_free0 (path); - _g_object_unref0 (device); - _g_object_unref0 (reg_dev); - 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); - conn = dvb_utils_get_dbus_connection (); - if (conn == NULL) { - result = FALSE; - _g_object_unref0 (scanner); - _dbus_g_connection_unref0 (conn); - _g_free0 (path); + } + __finally77: + { + g_static_rec_mutex_unlock (&self->priv->__lock_scanners); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (reg_dev); _g_object_unref0 (device); + _g_free0 (path); + return FALSE; + } else { _g_object_unref0 (reg_dev); - return result; + _g_object_unref0 (device); + _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); + g_clear_error (&_inner_error_); + return FALSE; } - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), path, (GObject*) scanner); - g_debug ("Manager.vala:174: Created new Scanner D-Bus service for adapter %u, fr" \ -"ontend %u (%s)", adapter, frontend, *dbusiface); - _g_object_unref0 (scanner); - _dbus_g_connection_unref0 (conn); } } - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); result = TRUE; - _g_free0 (path); - _g_object_unref0 (device); _g_object_unref0 (reg_dev); + _g_object_unref0 (device); + _g_free0 (path); return result; } +/** + * @group_id: A group ID + * @path: Device group's DBus path + * @returns: TRUE on success + */ static gboolean dvb_manager_real_GetDeviceGroup (DVBIDBusManager* base, guint group_id, char** opath, GError** error) { DVBManager * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBManager*) base; if (opath != NULL) { *opath = NULL; } - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - if (gee_map_contains ((GeeMap*) self->priv->devices, GUINT_TO_POINTER (group_id))) { - char* _tmp1_; - char* _tmp0_; - *opath = (_tmp1_ = g_strdup (_tmp0_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, group_id)), _g_free0 (*opath), _tmp1_); - _g_free0 (_tmp0_); - ret = TRUE; - } else { - char* _tmp2_; - *opath = (_tmp2_ = g_strdup (""), _g_free0 (*opath), _tmp2_); - ret = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id))) { + char* _tmp0_; + char* _tmp1_; + *opath = (_tmp1_ = g_strdup (_tmp0_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, group_id)), _g_free0 (*opath), _tmp1_); + _g_free0 (_tmp0_); + ret = TRUE; + } else { + char* _tmp2_; + *opath = (_tmp2_ = g_strdup (""), _g_free0 (*opath), _tmp2_); + ret = FALSE; + } + } + __finally78: + { + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = ret; return result; } +/** + * @returns: Device groups' DBus path + */ static char** dvb_manager_real_GetRegisteredDeviceGroups (DVBIDBusManager* base, int* result_length1, GError** error) { DVBManager * self; - char** result; - char** _tmp1_; - gint devs_size; + char** result = NULL; gint devs_length1; + gint _devs_size_; + char** _tmp1_; gint _tmp0_; char** devs; gint i; char** _tmp6_; + GError * _inner_error_ = NULL; self = (DVBManager*) base; - devs = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->devices)) + 1), devs_length1 = _tmp0_, devs_size = devs_length1, _tmp1_); + devs = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->devices)) + 1), devs_length1 = _tmp0_, _devs_size_ = devs_length1, _tmp1_); i = 0; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _key_it; - _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint key; - char* _tmp5_; - char* _tmp4_; - if (!gee_iterator_next (_key_it)) { - break; + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _key_it; + _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint key; + char* _tmp4_; + char* _tmp5_; + if (!gee_iterator_next (_key_it)) { + break; + } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + devs[i] = (_tmp5_ = g_strdup (_tmp4_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, key)), _g_free0 (devs[i]), _tmp5_); + _g_free0 (_tmp4_); + i++; } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - devs[i] = (_tmp5_ = g_strdup (_tmp4_ = g_strdup_printf (DVB_CONSTANTS_DBUS_DEVICE_GROUP_PATH, key)), _g_free0 (devs[i]), _tmp5_); - _g_free0 (_tmp4_); - i++; + _g_object_unref0 (_key_it); + } + } + __finally79: + { + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + devs = (_vala_array_free (devs, devs_length1, (GDestroyNotify) g_free), NULL); + return NULL; + } else { + devs = (_vala_array_free (devs, devs_length1, (GDestroyNotify) g_free), 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_object_unref0 (_key_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = (_tmp6_ = devs, *result_length1 = devs_length1, _tmp6_); return result; devs = (_vala_array_free (devs, devs_length1, (GDestroyNotify) g_free), NULL); } +/** + * @adapter: Number of the device's adapter + * @frontend: Number of the device's frontend + * @channels_conf: Path to channels.conf for this device + * @recordings_dir: Path where the recordings should be stored + * @name: Name of group + * @returns: TRUE when the device has been registered successfully + * + * Creates a new DeviceGroup and new DVB device whereas the + * DVB device is the reference device of this group (i.e. + * all other devices of this group will inherit the settings + * of the reference device). + */ static gboolean dvb_manager_real_AddDeviceToNewGroup (DVBIDBusManager* base, guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, const char* name, GError** error) { DVBManager * self; - gboolean result; + gboolean result = FALSE; + GFile* chan_file; + GFile* rec_dir; DVBDevice* device; DVBDeviceGroup* devgroup; + 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); - device = dvb_manager_create_device (adapter, frontend, channels_conf, recordings_dir, self->priv->device_group_counter + 1); - if (device == NULL) { - result = FALSE; - _g_object_unref0 (device); - return result; - } - if (dvb_manager_device_is_in_any_group (self, device)) { - result = FALSE; - _g_object_unref0 (device); - return result; + chan_file = g_file_new_for_path (channels_conf); + rec_dir = g_file_new_for_path (recordings_dir); + device = NULL; + { + DVBDevice* _tmp0_; + DVBDevice* _tmp1_; + _tmp0_ = dvb_device_new_full (adapter, frontend, chan_file, rec_dir, self->priv->device_group_counter + 1, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DEVICE_ERROR) { + goto __catch80_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; + } + device = (_tmp1_ = _tmp0_, _g_object_unref0 (device), _tmp1_); } - self->priv->device_group_counter++; - devgroup = dvb_device_group_new (self->priv->device_group_counter, device, TRUE); - dvb_device_group_set_Name (devgroup, name); - dvb_manager_add_device_group (self, devgroup); - g_signal_emit_by_name ((DVBIDBusManager*) self, "group-added", self->priv->device_group_counter); - result = TRUE; - _g_object_unref0 (device); + goto __finally80; + __catch80_dvb_device_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Manager.vala:246: Could not create device: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_file); + return result; + } + } + __finally80: + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_file); + return FALSE; + } else { + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_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); + g_clear_error (&_inner_error_); + return FALSE; + } + } + if (dvb_manager_device_is_in_any_group (self, device)) { + result = FALSE; + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_file); + return result; + } + self->priv->device_group_counter++; + devgroup = dvb_device_group_new (self->priv->device_group_counter, device, TRUE); + 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); + result = TRUE; _g_object_unref0 (devgroup); + _g_object_unref0 (device); + _g_object_unref0 (rec_dir); + _g_object_unref0 (chan_file); return result; } +/** + * @adapter: Adapter of device + * @frontend: Frontend of device + * @name: The name of the device or "Unknown" + * @returns: TRUE on success + * + * The device must be part of group, otherwise "Unknown" + * is returned. + */ static gboolean dvb_manager_real_GetNameOfRegisteredDevice (DVBIDBusManager* base, guint adapter, guint frontend, char** name, GError** error) { DVBManager * self; - gboolean result; + gboolean result = FALSE; DVBDevice* dev; self = (DVBManager*) base; if (name != NULL) { @@ -814,15 +1046,21 @@ } +/** + * @returns: the numner of configured device groups + */ static gint dvb_manager_real_GetDeviceGroupSize (DVBIDBusManager* base, GError** error) { DVBManager * self; - gint result; + gint result = 0; self = (DVBManager*) base; result = gee_map_get_size ((GeeMap*) self->priv->devices); return result; } +/** + * @returns: ID and name of each channel group + */ static void _vala_DVBChannelGroupInfo_array_free (DVBChannelGroupInfo* array, gint array_length) { if (array != NULL) { int i; @@ -836,19 +1074,18 @@ static DVBChannelGroupInfo* dvb_manager_real_GetChannelGroups (DVBIDBusManager* base, int* result_length1, GError** error) { DVBManager * self; - DVBChannelGroupInfo* result; - GError * _inner_error_; + DVBChannelGroupInfo* result = NULL; DVBdatabaseConfigStore* config; GeeList* groups; - DVBChannelGroupInfo* _tmp5_; - gint arr_size; gint arr_length1; + gint _arr_size_; + DVBChannelGroupInfo* _tmp5_; gint _tmp4_; DVBChannelGroupInfo* arr; DVBChannelGroupInfo* _tmp10_; + GError * _inner_error_ = NULL; self = (DVBManager*) base; - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); groups = NULL; { GeeList* _tmp0_; @@ -856,18 +1093,18 @@ _tmp0_ = dvb_database_config_store_get_channel_groups (config, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch28_dvb_database_sql_error; + goto __catch81_dvb_database_sql_error; } - _g_object_unref0 (config); _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 = (_tmp1_ = _tmp0_, _g_object_unref0 (groups), _tmp1_); } - goto __finally28; - __catch28_dvb_database_sql_error: + goto __finally81; + __catch81_dvb_database_sql_error: { GError * e; e = _inner_error_; @@ -875,31 +1112,31 @@ { DVBChannelGroupInfo* _tmp2_ = NULL; DVBChannelGroupInfo* _tmp3_; - g_critical ("Manager.vala:295: %s", e->message); + g_critical ("Manager.vala:304: %s", e->message); result = (_tmp3_ = (_tmp2_ = g_new0 (DVBChannelGroupInfo, 0), _tmp2_), *result_length1 = 0, _tmp3_); _g_error_free0 (e); - _g_object_unref0 (config); _g_object_unref0 (groups); + _g_object_unref0 (config); return result; _g_error_free0 (e); } } - __finally28: + __finally81: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (config); _g_object_unref0 (groups); + _g_object_unref0 (config); return NULL; } else { - _g_object_unref0 (config); _g_object_unref0 (groups); + _g_object_unref0 (config); 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; } } - arr = (_tmp5_ = g_new0 (DVBChannelGroupInfo, _tmp4_ = gee_collection_get_size ((GeeCollection*) groups)), arr_length1 = _tmp4_, arr_size = arr_length1, _tmp5_); + arr = (_tmp5_ = g_new0 (DVBChannelGroupInfo, _tmp4_ = gee_collection_get_size ((GeeCollection*) groups)), arr_length1 = _tmp4_, _arr_size_ = arr_length1, _tmp5_); { gint i; i = 0; @@ -908,8 +1145,8 @@ _tmp6_ = TRUE; while (TRUE) { DVBChannelGroup* cg; - DVBChannelGroupInfo _tmp8_; DVBChannelGroupInfo _tmp7_ = {0}; + DVBChannelGroupInfo _tmp8_; char* _tmp9_; if (!_tmp6_) { i++; @@ -927,31 +1164,34 @@ } } result = (_tmp10_ = arr, *result_length1 = arr_length1, _tmp10_); - _g_object_unref0 (config); _g_object_unref0 (groups); - return result; _g_object_unref0 (config); - _g_object_unref0 (groups); + return result; arr = (_vala_DVBChannelGroupInfo_array_free (arr, arr_length1), NULL); + _g_object_unref0 (groups); + _g_object_unref0 (config); } +/** + * @name: Name of the new group + * @returns: TRUE on success + */ static gboolean dvb_manager_real_AddChannelGroup (DVBIDBusManager* base, const char* name, gint* channel_group_id, GError** error) { DVBManager * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseConfigStore* config; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBManager*) base; g_return_val_if_fail (name != NULL, FALSE); - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); { gboolean _tmp0_; _tmp0_ = dvb_database_config_store_add_channel_group (config, name, channel_group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch29_dvb_database_sql_error; + goto __catch82_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); @@ -960,19 +1200,19 @@ } ret = _tmp0_; } - goto __finally29; - __catch29_dvb_database_sql_error: + goto __finally82; + __catch82_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Manager.vala:318: %s", e->message); + g_critical ("Manager.vala:327: %s", e->message); ret = FALSE; _g_error_free0 (e); } } - __finally29: + __finally82: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -991,21 +1231,24 @@ } +/** + * @channel_group_id: ID of the ChannelGroup + * @returns: TRUE on success + */ static gboolean dvb_manager_real_RemoveChannelGroup (DVBIDBusManager* base, gint channel_group_id, GError** error) { DVBManager * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseConfigStore* config; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBManager*) base; - _inner_error_ = NULL; - config = _g_object_ref0 (dvb_factory_get_config_store ()); + config = dvb_factory_get_config_store (); { gboolean _tmp0_; _tmp0_ = dvb_database_config_store_remove_channel_group (config, channel_group_id, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch30_dvb_database_sql_error; + goto __catch83_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); @@ -1014,19 +1257,19 @@ } ret = _tmp0_; } - goto __finally30; - __catch30_dvb_database_sql_error: + goto __finally83; + __catch83_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Manager.vala:334: %s", e->message); + g_critical ("Manager.vala:343: %s", e->message); ret = FALSE; _g_error_free0 (e); } } - __finally30: + __finally83: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -1045,57 +1288,204 @@ } -static void _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed (DVBDeviceGroup* _sender, guint adapter, guint frontend, gpointer self) { +/** + * @returns: informations about all connected + * devices retrieved via udev + */ +static gboolean string_contains (const char* self, const char* needle) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (needle != NULL, FALSE); + result = strstr (self, needle) != NULL; + return result; +} + + +static gpointer _g_hash_table_ref0 (gpointer self) { + return self ? g_hash_table_ref (self) : NULL; +} + + +static void _g_list_free_g_hash_table_unref (GList* self) { + g_list_foreach (self, (GFunc) g_hash_table_unref, NULL); + g_list_free (self); +} + + +static void _g_list_free_g_object_unref (GList* self) { + g_list_foreach (self, (GFunc) g_object_unref, NULL); + g_list_free (self); +} + + +static GHashTable** dvb_manager_real_GetDevices (DVBIDBusManager* base, int* result_length1, GError** error) { + DVBManager * self; + GHashTable** result = NULL; + GList* devices; + GList* devices_list; + gint arr_length1; + gint _arr_size_; + GHashTable** _tmp5_; + gint _tmp4_; + GHashTable** arr; + GHashTable** _tmp8_; + self = (DVBManager*) base; + devices = g_udev_client_query_by_subsystem (self->priv->udev_client, "dvb"); + devices_list = NULL; + { + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + GUdevDevice* dev; + char* device_file; + gboolean _tmp1_ = FALSE; + GHashTable* map; + GUdevDevice* parent; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_list_length (devices))) { + break; + } + dev = _g_object_ref0 ((GUdevDevice*) g_list_nth_data (devices, (guint) i)); + device_file = g_strdup (g_udev_device_get_device_file (dev)); + if (device_file == NULL) { + _tmp1_ = TRUE; + } else { + _tmp1_ = !string_contains (device_file, "frontend"); + } + if (_tmp1_) { + _g_free0 (device_file); + _g_object_unref0 (dev); + continue; + } + map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + devices_list = g_list_prepend (devices_list, _g_hash_table_ref0 (map)); + g_hash_table_insert (map, g_strdup ("device_file"), g_strdup (device_file)); + parent = _g_object_ref0 (g_udev_device_get_parent (dev)); + if (parent != NULL) { + char* attr; + char* _tmp2_; + char* _tmp3_; + attr = NULL; + attr = (_tmp2_ = g_strdup (g_udev_device_get_sysfs_attr (parent, "manufacturer")), _g_free0 (attr), _tmp2_); + if (attr != NULL) { + g_hash_table_insert (map, g_strdup ("manufacturer"), g_strdup (attr)); + } + attr = (_tmp3_ = g_strdup (g_udev_device_get_sysfs_attr (parent, "product")), _g_free0 (attr), _tmp3_); + if (attr != NULL) { + g_hash_table_insert (map, g_strdup ("product"), g_strdup (attr)); + } + _g_free0 (attr); + } + _g_object_unref0 (parent); + _g_hash_table_unref0 (map); + _g_free0 (device_file); + _g_object_unref0 (dev); + } + } + } + arr = (_tmp5_ = g_new0 (GHashTable*, (_tmp4_ = g_list_length (devices_list)) + 1), arr_length1 = _tmp4_, _arr_size_ = arr_length1, _tmp5_); + { + gint i; + i = 0; + { + gboolean _tmp6_; + _tmp6_ = TRUE; + while (TRUE) { + GHashTable* _tmp7_; + if (!_tmp6_) { + i++; + } + _tmp6_ = FALSE; + if (!(i < g_list_length (devices_list))) { + break; + } + arr[i] = (_tmp7_ = _g_hash_table_ref0 ((GHashTable*) g_list_nth_data (devices_list, (guint) i)), _g_hash_table_unref0 (arr[i]), _tmp7_); + } + } + } + result = (_tmp8_ = arr, *result_length1 = arr_length1, _tmp8_); + __g_list_free_g_hash_table_unref0 (devices_list); + __g_list_free_g_object_unref0 (devices); + return result; + arr = (_vala_array_free (arr, arr_length1, (GDestroyNotify) g_hash_table_unref), NULL); + __g_list_free_g_hash_table_unref0 (devices_list); + __g_list_free_g_object_unref0 (devices); +} + + +/** + * @returns: Whether the device has been added successfully + * + * Register device, create Recorder and ChannelList D-Bus service + */ +static void _dvb_manager_on_device_removed_from_group_dvb_id_bus_device_group_device_removed (DVBIDBusDeviceGroup* _sender, guint adapter, guint frontend, gpointer self) { dvb_manager_on_device_removed_from_group (self, _sender, adapter, frontend); } gboolean dvb_manager_add_device_group (DVBManager* self, DVBDeviceGroup* devgroup) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; guint group_id; DBusGConnection* conn; char* path; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (devgroup != NULL, FALSE); - _inner_error_ = NULL; group_id = dvb_device_group_get_Id (devgroup); - g_debug ("Manager.vala:347: Adding device group %u with %d devices", group_id, dvb_device_group_get_size (devgroup)); + g_debug ("Manager.vala:397: Adding device group %u with %d devices", group_id, dvb_device_group_get_size (devgroup)); if (dvb_device_group_get_Type (devgroup) == DVB_ADAPTER_TYPE_UNKNOWN) { - g_warning ("Manager.vala:351: Not adding device group %u of unknown type", dvb_device_group_get_Id (devgroup)); + g_warning ("Manager.vala:401: Not adding device group %u of unknown type", dvb_device_group_get_Id (devgroup)); result = FALSE; return result; } - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - gee_abstract_map_set ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id), devgroup); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + gee_abstract_map_set ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id), devgroup); + } + __finally84: + { + 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; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); { - dvb_database_config_store_add_device_group (dvb_factory_get_config_store (), devgroup, &_inner_error_); + DVBdatabaseConfigStore* _tmp0_; + dvb_database_config_store_add_device_group (_tmp0_ = dvb_factory_get_config_store (), devgroup, &_inner_error_); + _g_object_unref0 (_tmp0_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch31_dvb_database_sql_error; + goto __catch85_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 __finally31; - __catch31_dvb_database_sql_error: + goto __finally85; + __catch85_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Manager.vala:362: %s", e->message); + g_critical ("Manager.vala:412: %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally31: + __finally85: 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_); @@ -1113,133 +1503,250 @@ if (group_id > self->priv->device_group_counter) { self->priv->device_group_counter = group_id; } - if (!main_get_disable_epg_scanner ()) { - dvb_epg_scanner_start (dvb_device_group_get_epgscanner (devgroup)); - } + dvb_device_group_start_epg_scanner (devgroup); result = TRUE; - _dbus_g_connection_unref0 (conn); _g_free0 (path); + _dbus_g_connection_unref0 (conn); return result; } -static DVBDevice* dvb_manager_create_device (guint adapter, guint frontend, const char* channels_conf, const char* recordings_dir, guint group_id) { - DVBDevice* result; - GError * _inner_error_; - GFile* channelsfile; - GFile* recdir; - DVBDevice* device; - DVBChannelList* channels; - g_return_val_if_fail (channels_conf != NULL, NULL); - g_return_val_if_fail (recordings_dir != NULL, NULL); - _inner_error_ = NULL; - channelsfile = g_file_new_for_path (channels_conf); - recdir = g_file_new_for_path (recordings_dir); - device = dvb_device_new (adapter, frontend, TRUE); - if (dvb_device_get_Type (device) == DVB_ADAPTER_TYPE_UNKNOWN) { - result = NULL; - _g_object_unref0 (channelsfile); - _g_object_unref0 (recdir); - _g_object_unref0 (device); - return result; - } - dvb_device_set_RecordingsDirectory (device, recdir); - channels = NULL; +gboolean dvb_manager_restore_device_group (DVBManager* self, DVBDeviceGroup* device_group) { + gboolean result = FALSE; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (device_group != NULL, FALSE); + g_debug ("Manager.vala:435: Restoring group %u", dvb_device_group_get_Id (device_group)); { - DVBChannelList* _tmp0_; - DVBChannelList* _tmp1_; - _tmp0_ = dvb_channel_list_restore_from_file (channelsfile, dvb_device_get_Type (device), group_id, &_inner_error_); + dvb_channel_list_load (dvb_device_group_get_Channels (device_group), dvb_device_group_get_Type (device_group), &_inner_error_); if (_inner_error_ != NULL) { - goto __catch32_g_error; + goto __catch86_g_error; } - channels = (_tmp1_ = _tmp0_, _g_object_unref0 (channels), _tmp1_); } - goto __finally32; - __catch32_g_error: + goto __finally86; + __catch86_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Manager.vala:408: Could not create channels list from %s: %s", channels_conf, e->message); - result = NULL; + g_critical ("Manager.vala:440: Error reading channels from file: %s", e->message); + result = FALSE; _g_error_free0 (e); - _g_object_unref0 (channelsfile); - _g_object_unref0 (recdir); - _g_object_unref0 (device); - _g_object_unref0 (channels); return result; } } - __finally32: + __finally86: if (_inner_error_ != NULL) { - _g_object_unref0 (channelsfile); - _g_object_unref0 (recdir); - _g_object_unref0 (device); - _g_object_unref0 (channels); 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; + return FALSE; } - dvb_device_set_Channels (device, channels); - result = device; - _g_object_unref0 (channelsfile); - _g_object_unref0 (recdir); - _g_object_unref0 (channels); + result = dvb_manager_add_device_group (self, device_group); return result; } +void dvb_manager_restore_timers (DVBManager* self, DVBDeviceGroup* device_group) { + DVBdatabaseTimersStore* timers_store; + GeeList* timers; + guint32 max_id; + DVBRecorder* rec; + DVBRecordingsStore* recstore; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (device_group != NULL); + g_message ("Manager.vala:448: Restoring timers of device group %u", dvb_device_group_get_Id (device_group)); + timers_store = dvb_factory_get_timers_store (); + timers = NULL; + { + GeeList* _tmp0_; + GeeList* _tmp1_; + _tmp0_ = dvb_database_timers_store_get_all_timers_of_device_group (timers_store, device_group, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch87_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; + } + timers = (_tmp1_ = _tmp0_, _g_object_unref0 (timers), _tmp1_); + } + goto __finally87; + __catch87_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Manager.vala:456: Failed retrieving timers of group %u: %s", dvb_device_group_get_Id (device_group), e->message); + _g_error_free0 (e); + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); + return; + } + } + __finally87: + if (_inner_error_ != NULL) { + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); + 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; + } + max_id = (guint32) 0; + rec = _g_object_ref0 (dvb_device_group_get_recorder (device_group)); + { + GeeIterator* _t_it; + _t_it = gee_iterable_iterator ((GeeIterable*) timers); + while (TRUE) { + DVBTimer* t; + guint32 rec_id = 0U; + if (!gee_iterator_next (_t_it)) { + break; + } + t = (DVBTimer*) gee_iterator_get (_t_it); + if (dvb_timer_get_Id (t) > max_id) { + max_id = dvb_timer_get_Id (t); + } + if (!dvb_recorder_add_timer (rec, t, &rec_id)) { + { + dvb_database_timers_store_remove_timer_from_device_group (timers_store, (guint) dvb_timer_get_Id (t), device_group, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch88_dvb_database_sql_error; + } + _g_object_unref0 (t); + _g_object_unref0 (_t_it); + _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 __finally88; + __catch88_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Manager.vala:470: Failed removing timer: %s", e->message); + _g_error_free0 (e); + } + } + __finally88: + if (_inner_error_ != NULL) { + _g_object_unref0 (t); + _g_object_unref0 (_t_it); + _g_object_unref0 (rec); + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); + 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_object_unref0 (t); + } + _g_object_unref0 (_t_it); + } + recstore = _g_object_ref0 (dvb_recordings_store_get_instance ()); + dvb_recordings_store_update_last_id (recstore, max_id); + _g_object_unref0 (recstore); + _g_object_unref0 (rec); + _g_object_unref0 (timers); + _g_object_unref0 (timers_store); +} + + +void dvb_manager_restore_device_group_and_timers (DVBManager* self, DVBDeviceGroup* device_group) { + g_return_if_fail (self != NULL); + g_return_if_fail (device_group != NULL); + if (dvb_manager_restore_device_group (self, device_group)) { + dvb_manager_restore_timers (self, device_group); + } +} + + DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id) { - DVBDeviceGroup* result; + DVBDeviceGroup* result = NULL; DVBDeviceGroup* _result_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - if (gee_map_contains ((GeeMap*) self->priv->devices, GUINT_TO_POINTER (group_id))) { - DVBDeviceGroup* _tmp0_; - _result_ = (_tmp0_ = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)), _g_object_unref0 (_result_), _tmp0_); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id))) { + DVBDeviceGroup* _tmp0_; + _result_ = (_tmp0_ = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)), _g_object_unref0 (_result_), _tmp0_); + } + } + __finally89: + { + 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); + g_clear_error (&_inner_error_); + return NULL; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } gboolean dvb_manager_device_is_in_any_group (DVBManager* self, DVBDevice* device) { - gboolean result; + gboolean result = FALSE; gboolean _result_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (device != NULL, FALSE); _result_ = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _group_id_it; - _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint group_id; - DVBDeviceGroup* devgroup; - if (!gee_iterator_next (_group_id_it)) { - break; - } - group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); - devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - if (dvb_device_group_contains (devgroup, device)) { - _result_ = TRUE; + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _group_id_it; + _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint group_id; + DVBDeviceGroup* devgroup; + if (!gee_iterator_next (_group_id_it)) { + break; + } + group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); + devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); + if (dvb_device_group_contains (devgroup, device)) { + _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); + } + __finally90: + { + 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; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } @@ -1250,80 +1757,100 @@ guint frontend; char* path; DVBDeviceGroup* devgroup; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (scanner != NULL); adapter = dvb_device_get_Adapter (dvb_scanner_get_Device (scanner)); frontend = dvb_device_get_Frontend (dvb_scanner_get_Device (scanner)); path = g_strdup_printf (DVB_CONSTANTS_DBUS_SCANNER_PATH, adapter, frontend); - g_static_rec_mutex_lock (&self->priv->__lock_scanners); { - gee_map_remove ((GeeMap*) self->priv->scanners, path, NULL); + g_static_rec_mutex_lock (&self->priv->__lock_scanners); + { + gee_abstract_map_unset ((GeeAbstractMap*) self->priv->scanners, path, NULL); + } + __finally91: + { + 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); + g_clear_error (&_inner_error_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_scanners); - g_debug ("Manager.vala:450: Destroying scanner for adapter %u, frontend %u (%s)", adapter, frontend, path); + g_debug ("Manager.vala:518: Destroying scanner for adapter %u, frontend %u (%s)", adapter, frontend, path); devgroup = dvb_manager_get_device_group_of_device (self, dvb_scanner_get_Device (scanner)); if (devgroup != NULL) { - DVBEPGScanner* epgscanner; - epgscanner = _g_object_ref0 (dvb_device_group_get_epgscanner (devgroup)); - if (epgscanner != NULL) { - dvb_epg_scanner_start (epgscanner); - } - _g_object_unref0 (epgscanner); + dvb_device_group_start_epg_scanner (devgroup); } - _g_free0 (path); _g_object_unref0 (devgroup); + _g_free0 (path); } static DVBDevice* dvb_manager_get_registered_device (DVBManager* self, guint adapter, guint frontend) { - DVBDevice* result; + DVBDevice* result = NULL; DVBDevice* _result_; DVBDevice* fake_device; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; - fake_device = dvb_device_new (adapter, frontend, FALSE); - g_static_rec_mutex_lock (&self->priv->__lock_devices); + fake_device = dvb_device_new (adapter, frontend); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _group_id_it; - _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint group_id; - DVBDeviceGroup* devgroup; - if (!gee_iterator_next (_group_id_it)) { - break; - } - group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); - devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - if (dvb_device_group_contains (devgroup, fake_device)) { - { - GeeIterator* _device_it; - _device_it = gee_iterable_iterator ((GeeIterable*) devgroup); - while (TRUE) { - DVBDevice* device; - if (!gee_iterator_next (_device_it)) { - break; - } - device = (DVBDevice*) gee_iterator_get (_device_it); - if (dvb_device_equal (fake_device, device)) { - DVBDevice* _tmp2_; - _result_ = (_tmp2_ = _g_object_ref0 (device), _g_object_unref0 (_result_), _tmp2_); + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _group_id_it; + _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint group_id; + DVBDeviceGroup* devgroup; + if (!gee_iterator_next (_group_id_it)) { + break; + } + group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); + devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); + if (dvb_device_group_contains (devgroup, fake_device)) { + { + GeeIterator* _device_it; + _device_it = gee_iterable_iterator ((GeeIterable*) devgroup); + while (TRUE) { + DVBDevice* device; + if (!gee_iterator_next (_device_it)) { + break; + } + device = (DVBDevice*) gee_iterator_get (_device_it); + if (dvb_device_equal (fake_device, device)) { + DVBDevice* _tmp2_; + _result_ = (_tmp2_ = _g_object_ref0 (device), _g_object_unref0 (_result_), _tmp2_); + _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); + } + __finally92: + { + g_static_rec_mutex_unlock (&self->priv->__lock_devices); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (fake_device); + _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); + g_clear_error (&_inner_error_); + return NULL; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; _g_object_unref0 (fake_device); return result; @@ -1331,129 +1858,334 @@ static DVBDeviceGroup* dvb_manager_get_device_group_of_device (DVBManager* self, DVBDevice* device) { - DVBDeviceGroup* result; + DVBDeviceGroup* result = NULL; DVBDeviceGroup* _result_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (device != NULL, NULL); _result_ = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { + g_static_rec_mutex_lock (&self->priv->__lock_devices); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _group_id_it; - _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint group_id; - DVBDeviceGroup* devgroup; - if (!gee_iterator_next (_group_id_it)) { - break; - } - group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); - devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); - if (dvb_device_group_contains (devgroup, device)) { - { - GeeIterator* _grp_device_it; - _grp_device_it = gee_iterable_iterator ((GeeIterable*) devgroup); - while (TRUE) { - DVBDevice* grp_device; - if (!gee_iterator_next (_grp_device_it)) { - break; - } - grp_device = (DVBDevice*) gee_iterator_get (_grp_device_it); - if (dvb_device_equal (grp_device, device)) { - DVBDeviceGroup* _tmp2_; - _result_ = (_tmp2_ = _g_object_ref0 (devgroup), _g_object_unref0 (_result_), _tmp2_); + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _group_id_it; + _group_id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->devices))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint group_id; + DVBDeviceGroup* devgroup; + if (!gee_iterator_next (_group_id_it)) { + break; + } + group_id = GPOINTER_TO_UINT (gee_iterator_get (_group_id_it)); + devgroup = (DVBDeviceGroup*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id)); + if (dvb_device_group_contains (devgroup, device)) { + { + GeeIterator* _grp_device_it; + _grp_device_it = gee_iterable_iterator ((GeeIterable*) devgroup); + while (TRUE) { + DVBDevice* grp_device; + if (!gee_iterator_next (_grp_device_it)) { + break; + } + grp_device = (DVBDevice*) gee_iterator_get (_grp_device_it); + if (dvb_device_equal (grp_device, device)) { + DVBDeviceGroup* _tmp2_; + _result_ = (_tmp2_ = _g_object_ref0 (devgroup), _g_object_unref0 (_result_), _tmp2_); + _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); + } + __finally93: + { + 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); + g_clear_error (&_inner_error_); + return NULL; } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); result = _result_; return result; } -static void dvb_manager_on_device_removed_from_group (DVBManager* self, DVBDeviceGroup* devgroup, guint adapter, guint frontend) { - GError * _inner_error_; +static void dvb_manager_on_device_removed_from_group (DVBManager* self, DVBIDBusDeviceGroup* idevgroup, guint adapter, guint frontend) { + DVBDeviceGroup* devgroup; guint group_id; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_return_if_fail (devgroup != NULL); - _inner_error_ = NULL; + g_return_if_fail (idevgroup != NULL); + devgroup = _g_object_ref0 (DVB_DEVICE_GROUP (idevgroup)); group_id = dvb_device_group_get_Id (devgroup); if (dvb_device_group_get_size (devgroup) == 0) { gboolean success = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_devices); { - success = gee_map_remove ((GeeMap*) self->priv->devices, GUINT_TO_POINTER (group_id), NULL); + g_static_rec_mutex_lock (&self->priv->__lock_devices); + { + success = gee_abstract_map_unset ((GeeAbstractMap*) self->priv->devices, GUINT_TO_POINTER (group_id), NULL); + } + __finally94: + { + 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); + g_clear_error (&_inner_error_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_devices); if (success) { dvb_device_group_destroy (devgroup); { - dvb_database_config_store_remove_device_group (dvb_factory_get_config_store (), devgroup, &_inner_error_); + DVBdatabaseConfigStore* _tmp0_; + DVBdatabaseEPGStore* _tmp1_; + DVBdatabaseTimersStore* _tmp2_; + dvb_database_config_store_remove_device_group (_tmp0_ = dvb_factory_get_config_store (), devgroup, &_inner_error_); + _g_object_unref0 (_tmp0_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch33_dvb_database_sql_error; + goto __catch95_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; } - dvb_database_epg_store_remove_events_of_group (dvb_factory_get_epg_store (), dvb_device_group_get_Id (devgroup), &_inner_error_); + dvb_database_epg_store_remove_events_of_group (_tmp1_ = dvb_factory_get_epg_store (), dvb_device_group_get_Id (devgroup), &_inner_error_); + _g_object_unref0 (_tmp1_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch33_dvb_database_sql_error; + goto __catch95_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; } - dvb_database_timers_store_remove_all_timers_from_device_group (dvb_factory_get_timers_store (), dvb_device_group_get_Id (devgroup), &_inner_error_); + dvb_database_timers_store_remove_all_timers_from_device_group (_tmp2_ = dvb_factory_get_timers_store (), dvb_device_group_get_Id (devgroup), &_inner_error_); + _g_object_unref0 (_tmp2_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch33_dvb_database_sql_error; + goto __catch95_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_signal_emit_by_name ((DVBIDBusManager*) self, "group-removed", group_id); } - goto __finally33; - __catch33_dvb_database_sql_error: + goto __finally95; + __catch95_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Manager.vala:522: %s", e->message); + g_critical ("Manager.vala:590: %s", e->message); _g_error_free0 (e); } } - __finally33: + __finally95: 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); g_clear_error (&_inner_error_); return; } } } + _g_object_unref0 (devgroup); +} + + +static void dvb_manager_create_device_group_by_id (DVBManager* self, guint group_id) { + DVBdatabaseConfigStore* config_store; + GeeList* groups; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + config_store = dvb_factory_get_config_store (); + groups = NULL; + { + GeeList* _tmp0_; + GeeList* _tmp1_; + _tmp0_ = dvb_database_config_store_get_all_device_groups (config_store, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch96_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; + } + groups = (_tmp1_ = _tmp0_, _g_object_unref0 (groups), _tmp1_); + } + goto __finally96; + __catch96_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Manager.vala:603: Error restoring group %u: %s", group_id, e->message); + _g_error_free0 (e); + _g_object_unref0 (groups); + _g_object_unref0 (config_store); + return; + } + } + __finally96: + if (_inner_error_ != NULL) { + _g_object_unref0 (groups); + _g_object_unref0 (config_store); + 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; + } + { + GeeIterator* _group_it; + _group_it = gee_iterable_iterator ((GeeIterable*) groups); + while (TRUE) { + DVBDeviceGroup* group; + if (!gee_iterator_next (_group_it)) { + break; + } + group = (DVBDeviceGroup*) gee_iterator_get (_group_it); + if (dvb_device_group_get_Id (group) == group_id) { + dvb_manager_restore_device_group_and_timers (self, group); + } + _g_object_unref0 (group); + } + _g_object_unref0 (_group_it); + } + _g_object_unref0 (groups); + _g_object_unref0 (config_store); +} + + +static void dvb_manager_on_udev_event (DVBManager* self, const char* action, GUdevDevice* device) { + gboolean _tmp0_ = FALSE; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (action != NULL); + g_return_if_fail (device != NULL); + if (_vala_strcmp0 (action, "add") == 0) { + _tmp0_ = TRUE; + } else { + _tmp0_ = _vala_strcmp0 (action, "remove") == 0; + } + if (_tmp0_) { + char* dev_file; + guint adapter; + guint frontend; + guint group_id = 0U; + gboolean found; + DVBdatabaseConfigStore* config_store; + DVBDeviceGroup* group; + dev_file = g_strdup (g_udev_device_get_device_file (device)); + adapter = (guint) (-1); + frontend = (guint) (-1); + if (sscanf (dev_file, "/dev/dvb/adapter%u/frontend%u", &adapter, &frontend) != 2) { + _g_free0 (dev_file); + return; + } + found = FALSE; + config_store = dvb_factory_get_config_store (); + { + gboolean _tmp1_; + _tmp1_ = dvb_database_config_store_get_parent_group (config_store, adapter, frontend, &group_id, &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch97_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; + } + found = _tmp1_; + } + goto __finally97; + __catch97_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Manager.vala:631: %s", e->message); + _g_error_free0 (e); + } + } + __finally97: + if (_inner_error_ != NULL) { + _g_object_unref0 (config_store); + _g_free0 (dev_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); + g_clear_error (&_inner_error_); + return; + } + if (!found) { + _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); + group = dvb_manager_get_device_group_if_exists (self, group_id); + if (group != NULL) { + dvb_device_group_stop_epg_scanner (group); + } + if (_vala_strcmp0 (action, "add") == 0) { + if (group == NULL) { + dvb_manager_create_device_group_by_id (self, group_id); + } else { + DVBDevice* dvb_device; + dvb_device = dvb_device_new_with_type (adapter, frontend); + if (dvb_device == 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); + _g_object_unref0 (dvb_device); + } + } else { + DVBDevice* dvb_device; + dvb_device = dvb_device_new (adapter, frontend); + dvb_device_group_remove (group, dvb_device); + _g_object_unref0 (dvb_device); + } + if (group != NULL) { + dvb_device_group_start_epg_scanner (group); + } + _g_object_unref0 (group); + _g_object_unref0 (config_store); + _g_free0 (dev_file); + } } DVBManager* dvb_manager_construct (GType object_type) { DVBManager * self; - self = g_object_newv (object_type, 0, NULL); + self = (DVBManager*) g_object_new (object_type, NULL); return self; } @@ -1471,6 +2203,11 @@ } +static void _dvb_manager_on_udev_event_g_udev_client_uevent (GUdevClient* _sender, const char* action, GUdevDevice* device, gpointer self) { + dvb_manager_on_udev_event (self, action, device); +} + + static GObject * dvb_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { GObject * obj; GObjectClass * parent_class; @@ -1481,9 +2218,12 @@ { GeeHashMap* _tmp1_; GeeHashMap* _tmp2_; + GUdevClient* _tmp3_; self->priv->scanners = (_tmp1_ = 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), _g_object_unref0 (self->priv->scanners), _tmp1_); self->priv->devices = (_tmp2_ = 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), _tmp2_); self->priv->device_group_counter = (guint) 0; + self->priv->udev_client = (_tmp3_ = g_udev_client_new (DVB_MANAGER_UDEV_SUBSYSTEMS), _g_object_unref0 (self->priv->udev_client), _tmp3_); + g_signal_connect_object (self->priv->udev_client, "uevent", (GCallback) _dvb_manager_on_udev_event_g_udev_client_uevent, self, 0); } return obj; } @@ -1502,7 +2242,7 @@ 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"); + 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]); @@ -1571,6 +2311,7 @@ iface->GetChannelGroups = dvb_manager_real_GetChannelGroups; iface->AddChannelGroup = dvb_manager_real_AddChannelGroup; iface->RemoveChannelGroup = dvb_manager_real_RemoveChannelGroup; + iface->GetDevices = dvb_manager_real_GetDevices; } @@ -1588,19 +2329,22 @@ _g_object_unref0 (self->priv->scanners); g_static_rec_mutex_free (&self->priv->__lock_devices); _g_object_unref0 (self->priv->devices); + _g_object_unref0 (self->priv->udev_client); G_OBJECT_CLASS (dvb_manager_parent_class)->finalize (obj); } GType dvb_manager_get_type (void) { - static GType dvb_manager_type_id = 0; - if (dvb_manager_type_id == 0) { + static volatile gsize dvb_manager_type_id__volatile = 0; + if (g_once_init_enter (&dvb_manager_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBManager), 0, (GInstanceInitFunc) dvb_manager_instance_init, NULL }; static const GInterfaceInfo dvb_id_bus_manager_info = { (GInterfaceInitFunc) dvb_manager_dvb_id_bus_manager_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_manager_type_id; dvb_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBManager", &g_define_type_info, 0); g_type_add_interface_static (dvb_manager_type_id, DVB_TYPE_ID_BUS_MANAGER, &dvb_id_bus_manager_info); + g_once_init_leave (&dvb_manager_type_id__volatile, dvb_manager_type_id); } - return dvb_manager_type_id; + return dvb_manager_type_id__volatile; } @@ -1609,7 +2353,7 @@ self = DVB_MANAGER (object); switch (property_id) { case DVB_MANAGER_DEVICE_GROUPS: - g_value_set_object (value, dvb_manager_get_device_groups (self)); + g_value_take_object (value, dvb_manager_get_device_groups (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -1636,22 +2380,14 @@ } -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 int _vala_strcmp0 (const char * str1, const char * str2) { + if (str1 == NULL) { + return -(str1 != str2); } -} - - -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); + if (str2 == NULL) { + return str1 != str2; + } + return strcmp (str1, str2); } diff -Nru gnome-dvb-daemon-0.1.16/src/Manager.vala gnome-dvb-daemon-0.1.21/src/Manager.vala --- gnome-dvb-daemon-0.1.16/src/Manager.vala 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Manager.vala 2010-08-09 13:32:43.000000000 +0000 @@ -38,18 +38,22 @@ 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, 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 weak Manager get_instance () { + public static unowned Manager get_instance () { instance_mutex.lock (); if (instance == null) { instance = new Manager (); @@ -63,10 +67,11 @@ Manager m = instance; if (instance != null) { + m.udev_client = null; lock (m.scanners) { foreach (Scanner scanner in m.scanners.values) { debug ("Stopping scanner"); - scanner.Destroy (); + scanner.do_destroy (); } m.scanners.clear (); } @@ -102,13 +107,10 @@ if (reg_dev == null) { // Create new device - device = new Device (adapter, frontend); + device = Device.new_with_type (adapter, frontend); } else { // Stop epgscanner for device if there's any - EPGScanner? epgscanner = - this.get_device_group_of_device ( - reg_dev).epgscanner; - if (epgscanner != null) epgscanner.stop (); + this.get_device_group_of_device (reg_dev).stop_epg_scanner (); // Assign existing device device = reg_dev; @@ -139,7 +141,7 @@ } lock (this.scanners) { - if (!this.scanners.contains (path)) { + if (!this.scanners.has_key (path)) { Scanner scanner = null; switch (device.Type) { case AdapterType.DVB_T: @@ -160,7 +162,7 @@ return false; } - scanner.destroyed += this.on_scanner_destroyed; + scanner.destroyed.connect (this.on_scanner_destroyed); this.scanners.set (path, scanner); @@ -189,7 +191,7 @@ { bool ret; lock (this.devices) { - if (this.devices.contains (group_id)) { + if (this.devices.has_key (group_id)) { opath = new DBus.ObjectPath (Constants.DBUS_DEVICE_GROUP_PATH.printf (group_id)); ret = true; } else { @@ -233,10 +235,17 @@ string channels_conf, string recordings_dir, string name) throws DBus.Error { - Device device = this.create_device (adapter, frontend, channels_conf, - recordings_dir, device_group_counter + 1); + File chan_file = File.new_for_path (channels_conf); + File rec_dir = File.new_for_path (recordings_dir); - if (device == null) return false; + Device device; + try { + device = Device.new_full (adapter, frontend, chan_file, + rec_dir, device_group_counter + 1); + } catch (DeviceError e) { + critical ("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; @@ -246,7 +255,7 @@ DeviceGroup devgroup = new DeviceGroup (device_group_counter, device); devgroup.Name = name; - this.add_device_group (devgroup); + this.restore_device_group (devgroup); this.group_added (device_group_counter); @@ -338,6 +347,47 @@ } /** + * @returns: informations about all connected + * devices retrieved via udev + */ + public GLib.HashTable[] GetDevices () throws DBus.Error { + GLib.List devices = + this.udev_client.query_by_subsystem ("dvb"); + var devices_list = new GLib.List> (); + + for (int i=0; i.full (GLib.str_hash, + GLib.str_equal, GLib.g_free, GLib.g_free); + devices_list.prepend (map); + + map.insert ("device_file", device_file); + + GUdev.Device? parent = dev.get_parent (); + if (parent != null) { + string attr; + attr = parent.get_sysfs_attr ("manufacturer"); + if (attr != null) map.insert ("manufacturer", attr); + + attr = parent.get_sysfs_attr ("product"); + if (attr != null) map.insert ("product", attr); + } + } + + var arr = new GLib.HashTable[devices_list.length ()]; + for (int i=0; i device_group_counter) device_group_counter = group_id; - - if (!Main.get_disable_epg_scanner ()) { - devgroup.epgscanner.start (); - } + + devgroup.start_epg_scanner (); return true; } - - private static Device? create_device (uint adapter, uint frontend, - string channels_conf, string recordings_dir, uint group_id) { - File channelsfile = File.new_for_path (channels_conf); - File recdir = File.new_for_path (recordings_dir); - - Device device = new Device (adapter, frontend); - - /* The type of the device is checked in creation of - * Device class. If the device does not exist the type - * will be AdapterType.UNKNOWN - */ - if (device.Type == AdapterType.UNKNOWN) - return null; - - device.RecordingsDirectory = recdir; - - ChannelList channels; - try { - channels = DVB.ChannelList.restore_from_file (channelsfile, - device.Type, group_id); + public bool restore_device_group (DeviceGroup device_group) { + debug ("Restoring group %u", device_group.Id); + + try { + device_group.Channels.load (device_group.Type); } catch (Error e) { - critical ("Could not create channels list from %s: %s", - channels_conf, e.message); - return null; + critical ("Error reading channels from file: %s", e.message); + return false; } - device.Channels = channels; - - return device; + return this.add_device_group (device_group); + } + + public void restore_timers (DeviceGroup device_group) { + message ("Restoring timers of device group %u", device_group.Id); + TimersStore timers_store = 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", + device_group.Id, e.message); + return; + } + + uint32 max_id = 0; + Recorder rec = device_group.recorder; + foreach (Timer t in timers) { + if (t.Id > max_id) max_id = t.Id; + uint32 rec_id; + if (!rec.add_timer (t, out rec_id)) { + try { + timers_store.remove_timer_from_device_group (t.Id, device_group); + } catch (SqlError e) { + critical ("Failed removing timer: %s", e.message); + } + } + } + + RecordingsStore recstore = RecordingsStore.get_instance (); + recstore.update_last_id (max_id); + } + + public void restore_device_group_and_timers (DeviceGroup device_group) + { + if (this.restore_device_group (device_group)) { + this.restore_timers (device_group); + } } public DeviceGroup? get_device_group_if_exists (uint group_id) { DeviceGroup? result = null; lock (this.devices) { - if (this.devices.contains (group_id)) + if (this.devices.has_key (group_id)) result = this.devices.get (group_id); } return result; @@ -444,7 +512,7 @@ string path = Constants.DBUS_SCANNER_PATH.printf (adapter, frontend); lock (this.scanners) { - this.scanners.remove (path); + this.scanners.unset (path); } debug ("Destroying scanner for adapter %u, frontend %u (%s)", adapter, @@ -453,14 +521,13 @@ // Start epgscanner for device again if there was one DeviceGroup? devgroup = this.get_device_group_of_device (scanner.Device); if (devgroup != null) { - EPGScanner? epgscanner = devgroup.epgscanner; - if (epgscanner != null) epgscanner.start (); + devgroup.start_epg_scanner (); } } private Device? get_registered_device (uint adapter, uint frontend) { Device? result = null; - Device fake_device = new Device (adapter, frontend, false); + Device fake_device = new Device (adapter, frontend); lock (this.devices) { foreach (uint group_id in this.devices.keys) { DeviceGroup devgroup = this.devices.get (group_id); @@ -497,13 +564,14 @@ return result; } - private void on_device_removed_from_group (DeviceGroup devgroup, + private void on_device_removed_from_group (IDBusDeviceGroup idevgroup, uint adapter, uint frontend) { + DeviceGroup devgroup = (DeviceGroup)idevgroup; uint group_id = devgroup.Id; if (devgroup.size == 0) { bool success; lock (this.devices) { - success = this.devices.remove (group_id); + success = this.devices.unset (group_id); } if (success) { devgroup.destroy (); @@ -524,6 +592,79 @@ } } } + + private void create_device_group_by_id (uint group_id) { + ConfigStore config_store = 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, + e.message); + return; + } + + foreach (DeviceGroup group in groups) { + if (group.Id == group_id) { + this.restore_device_group_and_timers (group); + } + } + } + + private void on_udev_event (string action, GUdev.Device device) { + if (action == "add" || action == "remove") { + string dev_file = device.get_device_file (); + + uint adapter = -1, frontend = -1; + if (dev_file.scanf ("/dev/dvb/adapter%u/frontend%u", + &adapter, &frontend) != 2) + return; + + uint group_id; + bool found = false; + ConfigStore config_store = Factory.get_config_store (); + try { + found = config_store.get_parent_group (adapter, + frontend, out group_id); + } catch (SqlError e) { + critical ("%s", e.message); + } + if (!found) + return; + + debug ("%s device %s, part of group %u", action, dev_file, + group_id); + + DeviceGroup? group = this.get_device_group_if_exists (group_id); + if (group != null) + group.stop_epg_scanner (); + + if (action == "add") { + if (group == null) { + /* This is the first device part of the group + * that has been added. We have to create the + * whole group */ + this.create_device_group_by_id (group_id); + } else { + Device dvb_device = Device.new_with_type (adapter, + frontend); + if (dvb_device == null) return; + + group.add (dvb_device); + } + } else { + Device dvb_device = new Device (adapter, frontend); + + // FIXME emit signal without removing + // the device from the DB + group.remove (dvb_device); + } + + if (group != null) + group.start_epg_scanner (); + } + } } diff -Nru gnome-dvb-daemon-0.1.16/src/MpegTsEnums.c gnome-dvb-daemon-0.1.21/src/MpegTsEnums.c --- gnome-dvb-daemon-0.1.16/src/MpegTsEnums.c 2009-10-01 10:38:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/MpegTsEnums.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* MpegTsEnums.c generated by valac, the Vala compiler +/* MpegTsEnums.c generated by valac 0.9.7, the Vala compiler * generated from MpegTsEnums.vala, do not modify */ /* @@ -100,13 +100,13 @@ -GType dvb_dvb_src_code_rate_get_type (void); -GType dvb_dvb_src_modulation_get_type (void); -GType dvb_dvb_src_transmission_mode_get_type (void); -GType dvb_dvb_src_bandwidth_get_type (void); -GType dvb_dvb_src_guard_get_type (void); -GType dvb_dvb_src_hierarchy_get_type (void); -GType dvb_dvb_src_inversion_get_type (void); +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_transmission_mode_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_bandwidth_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_guard_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_hierarchy_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; DVBDvbSrcBandwidth dvb_get_bandwidth_val (guint bandwidth); DVBDvbSrcHierarchy dvb_get_hierarchy_val (guint hierarchy); DVBDvbSrcModulation dvb_get_modulation_val (const char* constellation); @@ -117,85 +117,95 @@ - GType dvb_dvb_src_code_rate_get_type (void) { - static GType dvb_dvb_src_code_rate_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_code_rate_type_id == 0)) { + static volatile gsize dvb_dvb_src_code_rate_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_code_rate_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_CODE_RATE_FEC_NONE, "DVB_DVB_SRC_CODE_RATE_FEC_NONE", "fec-none"}, {DVB_DVB_SRC_CODE_RATE_FEC_1_2, "DVB_DVB_SRC_CODE_RATE_FEC_1_2", "fec-1-2"}, {DVB_DVB_SRC_CODE_RATE_FEC_2_3, "DVB_DVB_SRC_CODE_RATE_FEC_2_3", "fec-2-3"}, {DVB_DVB_SRC_CODE_RATE_FEC_3_4, "DVB_DVB_SRC_CODE_RATE_FEC_3_4", "fec-3-4"}, {DVB_DVB_SRC_CODE_RATE_FEC_4_5, "DVB_DVB_SRC_CODE_RATE_FEC_4_5", "fec-4-5"}, {DVB_DVB_SRC_CODE_RATE_FEC_5_6, "DVB_DVB_SRC_CODE_RATE_FEC_5_6", "fec-5-6"}, {DVB_DVB_SRC_CODE_RATE_FEC_6_7, "DVB_DVB_SRC_CODE_RATE_FEC_6_7", "fec-6-7"}, {DVB_DVB_SRC_CODE_RATE_FEC_7_8, "DVB_DVB_SRC_CODE_RATE_FEC_7_8", "fec-7-8"}, {DVB_DVB_SRC_CODE_RATE_FEC_8_9, "DVB_DVB_SRC_CODE_RATE_FEC_8_9", "fec-8-9"}, {DVB_DVB_SRC_CODE_RATE_FEC_AUTO, "DVB_DVB_SRC_CODE_RATE_FEC_AUTO", "fec-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_code_rate_type_id; dvb_dvb_src_code_rate_type_id = g_enum_register_static ("DVBDvbSrcCodeRate", values); + g_once_init_leave (&dvb_dvb_src_code_rate_type_id__volatile, dvb_dvb_src_code_rate_type_id); } - return dvb_dvb_src_code_rate_type_id; + return dvb_dvb_src_code_rate_type_id__volatile; } - GType dvb_dvb_src_modulation_get_type (void) { - static GType dvb_dvb_src_modulation_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_modulation_type_id == 0)) { + static volatile gsize dvb_dvb_src_modulation_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_modulation_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_MODULATION_QPSK, "DVB_DVB_SRC_MODULATION_QPSK", "qpsk"}, {DVB_DVB_SRC_MODULATION_QAM_16, "DVB_DVB_SRC_MODULATION_QAM_16", "qam-16"}, {DVB_DVB_SRC_MODULATION_QAM_32, "DVB_DVB_SRC_MODULATION_QAM_32", "qam-32"}, {DVB_DVB_SRC_MODULATION_QAM_64, "DVB_DVB_SRC_MODULATION_QAM_64", "qam-64"}, {DVB_DVB_SRC_MODULATION_QAM_128, "DVB_DVB_SRC_MODULATION_QAM_128", "qam-128"}, {DVB_DVB_SRC_MODULATION_QAM_256, "DVB_DVB_SRC_MODULATION_QAM_256", "qam-256"}, {DVB_DVB_SRC_MODULATION_QAM_AUTO, "DVB_DVB_SRC_MODULATION_QAM_AUTO", "qam-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_modulation_type_id; dvb_dvb_src_modulation_type_id = g_enum_register_static ("DVBDvbSrcModulation", values); + g_once_init_leave (&dvb_dvb_src_modulation_type_id__volatile, dvb_dvb_src_modulation_type_id); } - return dvb_dvb_src_modulation_type_id; + return dvb_dvb_src_modulation_type_id__volatile; } - GType dvb_dvb_src_transmission_mode_get_type (void) { - static GType dvb_dvb_src_transmission_mode_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_transmission_mode_type_id == 0)) { + static volatile gsize dvb_dvb_src_transmission_mode_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_transmission_mode_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K, "DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_2K", "transmission-mode-2k"}, {DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K, "DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_8K", "transmission-mode-8k"}, {DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO, "DVB_DVB_SRC_TRANSMISSION_MODE_TRANSMISSION_MODE_AUTO", "transmission-mode-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_transmission_mode_type_id; dvb_dvb_src_transmission_mode_type_id = g_enum_register_static ("DVBDvbSrcTransmissionMode", values); + g_once_init_leave (&dvb_dvb_src_transmission_mode_type_id__volatile, dvb_dvb_src_transmission_mode_type_id); } - return dvb_dvb_src_transmission_mode_type_id; + return dvb_dvb_src_transmission_mode_type_id__volatile; } - GType dvb_dvb_src_bandwidth_get_type (void) { - static GType dvb_dvb_src_bandwidth_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_bandwidth_type_id == 0)) { + static volatile gsize dvb_dvb_src_bandwidth_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_bandwidth_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ, "DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_8_MHZ", "bandwidth-8-mhz"}, {DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ, "DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_7_MHZ", "bandwidth-7-mhz"}, {DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ, "DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_6_MHZ", "bandwidth-6-mhz"}, {DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO, "DVB_DVB_SRC_BANDWIDTH_BANDWIDTH_AUTO", "bandwidth-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_bandwidth_type_id; dvb_dvb_src_bandwidth_type_id = g_enum_register_static ("DVBDvbSrcBandwidth", values); + g_once_init_leave (&dvb_dvb_src_bandwidth_type_id__volatile, dvb_dvb_src_bandwidth_type_id); } - return dvb_dvb_src_bandwidth_type_id; + return dvb_dvb_src_bandwidth_type_id__volatile; } - GType dvb_dvb_src_guard_get_type (void) { - static GType dvb_dvb_src_guard_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_guard_type_id == 0)) { + static volatile gsize dvb_dvb_src_guard_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_guard_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32, "DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_32", "guard-interval-1-32"}, {DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16, "DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_16", "guard-interval-1-16"}, {DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8, "DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_8", "guard-interval-1-8"}, {DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4, "DVB_DVB_SRC_GUARD_GUARD_INTERVAL_1_4", "guard-interval-1-4"}, {DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO, "DVB_DVB_SRC_GUARD_GUARD_INTERVAL_AUTO", "guard-interval-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_guard_type_id; dvb_dvb_src_guard_type_id = g_enum_register_static ("DVBDvbSrcGuard", values); + g_once_init_leave (&dvb_dvb_src_guard_type_id__volatile, dvb_dvb_src_guard_type_id); } - return dvb_dvb_src_guard_type_id; + return dvb_dvb_src_guard_type_id__volatile; } - GType dvb_dvb_src_hierarchy_get_type (void) { - static GType dvb_dvb_src_hierarchy_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_hierarchy_type_id == 0)) { + static volatile gsize dvb_dvb_src_hierarchy_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_hierarchy_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE, "DVB_DVB_SRC_HIERARCHY_HIERARCHY_NONE", "hierarchy-none"}, {DVB_DVB_SRC_HIERARCHY_HIERARCHY_1, "DVB_DVB_SRC_HIERARCHY_HIERARCHY_1", "hierarchy-1"}, {DVB_DVB_SRC_HIERARCHY_HIERARCHY_2, "DVB_DVB_SRC_HIERARCHY_HIERARCHY_2", "hierarchy-2"}, {DVB_DVB_SRC_HIERARCHY_HIERARCHY_4, "DVB_DVB_SRC_HIERARCHY_HIERARCHY_4", "hierarchy-4"}, {DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO, "DVB_DVB_SRC_HIERARCHY_HIERARCHY_AUTO", "hierarchy-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_hierarchy_type_id; dvb_dvb_src_hierarchy_type_id = g_enum_register_static ("DVBDvbSrcHierarchy", values); + g_once_init_leave (&dvb_dvb_src_hierarchy_type_id__volatile, dvb_dvb_src_hierarchy_type_id); } - return dvb_dvb_src_hierarchy_type_id; + return dvb_dvb_src_hierarchy_type_id__volatile; } - GType dvb_dvb_src_inversion_get_type (void) { - static GType dvb_dvb_src_inversion_type_id = 0; - if (G_UNLIKELY (dvb_dvb_src_inversion_type_id == 0)) { + static volatile gsize dvb_dvb_src_inversion_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_src_inversion_type_id__volatile)) { static const GEnumValue values[] = {{DVB_DVB_SRC_INVERSION_INVERSION_OFF, "DVB_DVB_SRC_INVERSION_INVERSION_OFF", "inversion-off"}, {DVB_DVB_SRC_INVERSION_INVERSION_ON, "DVB_DVB_SRC_INVERSION_INVERSION_ON", "inversion-on"}, {DVB_DVB_SRC_INVERSION_INVERSION_AUTO, "DVB_DVB_SRC_INVERSION_INVERSION_AUTO", "inversion-auto"}, {0, NULL, NULL}}; + GType dvb_dvb_src_inversion_type_id; dvb_dvb_src_inversion_type_id = g_enum_register_static ("DVBDvbSrcInversion", values); + g_once_init_leave (&dvb_dvb_src_inversion_type_id__volatile, dvb_dvb_src_inversion_type_id); } - return dvb_dvb_src_inversion_type_id; + return dvb_dvb_src_inversion_type_id__volatile; } +/** + * @bandwith: 0, 6, 7 or 8 + */ DVBDvbSrcBandwidth dvb_get_bandwidth_val (guint bandwidth) { - DVBDvbSrcBandwidth result; + DVBDvbSrcBandwidth result = 0; DVBDvbSrcBandwidth val = 0; switch (bandwidth) { case 6: @@ -224,8 +234,12 @@ } +/** + * @hierarchy: 0, 1, 2 or 4. + * If value doesn't match one of above HIERARCHY_AUTO is returned. + */ DVBDvbSrcHierarchy dvb_get_hierarchy_val (guint hierarchy) { - DVBDvbSrcHierarchy result; + DVBDvbSrcHierarchy result = 0; DVBDvbSrcHierarchy val = 0; switch (hierarchy) { case 0: @@ -259,8 +273,12 @@ } +/** + * @modulation: QPSK, QAM16, QAM32, QAM64, QAM128 or QAM256. + * If value doesn't match one of above QAM_AUTO is returned. + */ DVBDvbSrcModulation dvb_get_modulation_val (const char* constellation) { - DVBDvbSrcModulation result; + DVBDvbSrcModulation result = 0; DVBDvbSrcModulation val = 0; g_return_val_if_fail (constellation != NULL, 0); if (_vala_strcmp0 (constellation, "QPSK") == 0) { @@ -293,8 +311,13 @@ } +/** + * @code_rate_string: "NONE", 1/2", "2/3", "3/4", "4/5", "5/6", "6/7", + * "7/8" or "8/9". + * If value doesn't match one of above FEC_AUTO is returned. + */ DVBDvbSrcCodeRate dvb_get_code_rate_val (const char* code_rate_string) { - DVBDvbSrcCodeRate result; + DVBDvbSrcCodeRate result = 0; DVBDvbSrcCodeRate val = 0; g_return_val_if_fail (code_rate_string != NULL, 0); if (_vala_strcmp0 (code_rate_string, "NONE") == 0) { @@ -339,8 +362,12 @@ } +/** + * @guard: 4, 8, 16 or 32. + * If value doesn't match one of above GUARD_INTERVAL_AUTO is returned. + */ DVBDvbSrcGuard dvb_get_guard_interval_val (guint guard) { - DVBDvbSrcGuard result; + DVBDvbSrcGuard result = 0; DVBDvbSrcGuard val = 0; switch (guard) { case 4: @@ -374,8 +401,12 @@ } +/** + * @transmode: "2k" or "8k" + * If value doesn't match one of above TRANSMISSION_MODE_AUTO is returned. + */ DVBDvbSrcTransmissionMode dvb_get_transmission_mode_val (const char* transmode) { - DVBDvbSrcTransmissionMode result; + DVBDvbSrcTransmissionMode result = 0; DVBDvbSrcTransmissionMode val = 0; g_return_val_if_fail (transmode != NULL, 0); if (_vala_strcmp0 (transmode, "2k") == 0) { diff -Nru gnome-dvb-daemon-0.1.16/src/OverlapType.c gnome-dvb-daemon-0.1.21/src/OverlapType.c --- gnome-dvb-daemon-0.1.16/src/OverlapType.c 2009-10-01 10:38:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/OverlapType.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* OverlapType.c generated by valac, the Vala compiler +/* OverlapType.c generated by valac 0.9.7, the Vala compiler * generated from OverlapType.vala, do not modify */ /* @@ -35,18 +35,19 @@ -GType dvb_overlap_type_get_type (void); - +GType dvb_overlap_type_get_type (void) G_GNUC_CONST; GType dvb_overlap_type_get_type (void) { - static GType dvb_overlap_type_type_id = 0; - if (G_UNLIKELY (dvb_overlap_type_type_id == 0)) { + static volatile gsize dvb_overlap_type_type_id__volatile = 0; + if (g_once_init_enter (&dvb_overlap_type_type_id__volatile)) { static const GEnumValue values[] = {{DVB_OVERLAP_TYPE_UNKNOWN, "DVB_OVERLAP_TYPE_UNKNOWN", "unknown"}, {DVB_OVERLAP_TYPE_NONE, "DVB_OVERLAP_TYPE_NONE", "none"}, {DVB_OVERLAP_TYPE_PARTIAL, "DVB_OVERLAP_TYPE_PARTIAL", "partial"}, {DVB_OVERLAP_TYPE_COMPLETE, "DVB_OVERLAP_TYPE_COMPLETE", "complete"}, {0, NULL, NULL}}; + GType dvb_overlap_type_type_id; dvb_overlap_type_type_id = g_enum_register_static ("DVBOverlapType", values); + g_once_init_leave (&dvb_overlap_type_type_id__volatile, dvb_overlap_type_type_id); } - return dvb_overlap_type_type_id; + return dvb_overlap_type_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Recorder.c gnome-dvb-daemon-0.1.21/src/Recorder.c --- gnome-dvb-daemon-0.1.16/src/Recorder.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Recorder.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Recorder.c generated by valac, the Vala compiler +/* Recorder.c generated by valac 0.9.7, the Vala compiler * generated from Recorder.vala, do not modify */ /* @@ -27,8 +27,8 @@ #include #include #include -#include #include +#include #include #include @@ -328,6 +328,7 @@ gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -370,17 +371,18 @@ static DVBIDBusRecorderIface* dvb_recorder_dvb_id_bus_recorder_parent_iface = NULL; static GeeIterableIface* dvb_recorder_gee_iterable_parent_iface = NULL; -GType dvb_timer_info_get_type (void); +DVBIDBusRecorder* dvb_id_bus_recorder_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); -GType dvb_id_bus_recorder_get_type (void); -GType dvb_recorder_get_type (void); -GType dvb_device_group_get_type (void); -GType dvb_timer_get_type (void); -GType dvb_recording_get_type (void); +GType dvb_overlap_type_get_type (void) G_GNUC_CONST; +GType dvb_id_bus_recorder_get_type (void) G_GNUC_CONST; +GType dvb_recorder_get_type (void) G_GNUC_CONST; +GType dvb_device_group_get_type (void) G_GNUC_CONST; +GType dvb_timer_get_type (void) G_GNUC_CONST; +GType dvb_recording_get_type (void) G_GNUC_CONST; #define DVB_RECORDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_RECORDER, DVBRecorderPrivate)) enum { DVB_RECORDER_DUMMY_PROPERTY, @@ -389,13 +391,15 @@ DVB_RECORDER_ELEMENT_TYPE }; #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); DVBRecorder* dvb_recorder_construct (GType object_type, DVBDeviceGroup* dev); static GeeIterator* dvb_recorder_real_iterator (GeeIterable* base); +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); 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_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); -GType dvb_settings_get_type (void); +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); +GType dvb_settings_get_type (void) G_GNUC_CONST; DVBSettings* dvb_factory_get_settings (void); gint dvb_settings_get_integer (DVBSettings* self, const char* group_name, const char* key, GError** error); #define DVB_SETTINGS_TIMERS_SECTION "timers" @@ -404,7 +408,6 @@ guint dvb_timer_get_Duration (DVBTimer* self); void dvb_timer_set_Duration (DVBTimer* self, guint value); void dvb_timer_add_to_start_time (DVBTimer* self, gint minutes); -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); gboolean dvb_timer_has_expired (DVBTimer* self); gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2); DVBDeviceGroup* dvb_recorder_get_DeviceGroup (DVBRecorder* self); @@ -412,19 +415,21 @@ char* 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); +GType dvb_database_timers_store_get_type (void) G_GNUC_CONST; DVBdatabaseTimersStore* dvb_factory_get_timers_store (void); gboolean dvb_database_timers_store_add_timer_to_device_group (DVBdatabaseTimersStore* self, DVBTimer* timer, DVBDeviceGroup* dev, GError** error); -GType dvb_change_type_get_type (void); +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); +static gboolean dvb_recorder_real_AddTimerForEPGEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, guint32* timer_id, GError** error); 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); -GType dvb_database_epg_store_get_type (void); +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); 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); @@ -434,68 +439,74 @@ void dvb_event_audio_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_audio_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_audio_component (GValue* value, gpointer v_object); +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_audio_component (const GValue* value); -GType dvb_event_audio_component_get_type (void); +GType dvb_event_audio_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_video_component_ref (gpointer instance); void dvb_event_video_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_video_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_video_component (GValue* value, gpointer v_object); +void dvb_event_value_take_video_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_video_component (const GValue* value); -GType dvb_event_video_component_get_type (void); +GType dvb_event_video_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_teletext_component_ref (gpointer instance); void dvb_event_teletext_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_teletext_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_teletext_component (GValue* value, gpointer v_object); +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); -static gboolean dvb_recorder_real_AddTimerForEPGEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, guint32* timer_id, GError** error); -gboolean dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error); +GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; +static gboolean dvb_recorder_real_DeleteTimer (DVBIDBusRecorder* base, guint32 timer_id, GError** error); +gboolean dvb_recorder_delete_timer (DVBRecorder* self, guint32 timer_id); +gboolean dvb_recorder_is_timer_active (DVBRecorder* self, guint32 timer_id); void dvb_recorder_stop_recording (DVBRecorder* self, DVBTimer* timer); gboolean dvb_database_timers_store_remove_timer_from_device_group (DVBdatabaseTimersStore* self, guint timer_id, DVBDeviceGroup* dev, GError** error); -static gboolean dvb_recorder_real_DeleteTimer (DVBIDBusRecorder* base, guint32 timer_id, GError** error); static guint32* dvb_recorder_real_GetTimers (DVBIDBusRecorder* base, int* result_length1, GError** error); -guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1); static gboolean dvb_recorder_real_GetStartTime (DVBIDBusRecorder* base, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error); -void dvb_timer_set_start_time (DVBTimer* self, gint year, gint month, gint day, gint hour, gint minute); +guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1); static gboolean dvb_recorder_real_SetStartTime (DVBIDBusRecorder* base, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error); -guint* dvb_timer_get_end_time (DVBTimer* self, int* result_length1); +gboolean dvb_id_bus_recorder_IsTimerActive (DVBIDBusRecorder* self, guint32 timer_id, GError** error); +void dvb_timer_set_start_time (DVBTimer* self, gint year, gint month, gint day, gint hour, gint minute); static gboolean dvb_recorder_real_GetEndTime (DVBIDBusRecorder* base, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error); +guint* dvb_timer_get_end_time (DVBTimer* self, int* result_length1); static gboolean dvb_recorder_real_GetDuration (DVBIDBusRecorder* base, guint32 timer_id, guint* duration, GError** error); static gboolean dvb_recorder_real_SetDuration (DVBIDBusRecorder* base, guint32 timer_id, guint duration, GError** error); -GType dvb_channel_get_type (void); +static gboolean dvb_recorder_real_GetChannelName (DVBIDBusRecorder* base, guint32 timer_id, char** name, GError** error); +GType dvb_channel_get_type (void) G_GNUC_CONST; DVBChannel* dvb_timer_get_Channel (DVBTimer* self); const char* dvb_channel_get_Name (DVBChannel* self); -static gboolean dvb_recorder_real_GetChannelName (DVBIDBusRecorder* base, guint32 timer_id, char** name, GError** error); -GType dvb_schedule_get_type (void); +static gboolean dvb_recorder_real_GetTitle (DVBIDBusRecorder* base, guint32 timer_id, char** title, GError** error); +GType dvb_schedule_get_type (void) G_GNUC_CONST; DVBSchedule* dvb_channel_get_Schedule (DVBChannel* self); DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id); guint dvb_timer_get_EventID (DVBTimer* self); -static gboolean dvb_recorder_real_GetTitle (DVBIDBusRecorder* base, guint32 timer_id, char** title, GError** error); static gboolean dvb_recorder_real_GetAllInformations (DVBIDBusRecorder* base, guint32 timer_id, DVBTimerInfo* info, GError** error); static guint32* dvb_recorder_real_GetActiveTimers (DVBIDBusRecorder* base, int* result_length1, GError** error); static gboolean dvb_recorder_real_IsTimerActive (DVBIDBusRecorder* base, guint32 timer_id, GError** error); -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); static gboolean dvb_recorder_real_HasTimer (DVBIDBusRecorder* base, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error); +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); +static DVBOverlapType dvb_recorder_real_HasTimerForEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, GError** error); guint dvb_channel_get_Sid (DVBChannel* self); 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); -static DVBOverlapType dvb_recorder_real_HasTimerForEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, GError** error); void dvb_recorder_stop (DVBRecorder* self); -GType dvb_channel_list_get_type (void); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); gboolean dvb_channel_list_contains (DVBChannelList* self, guint sid); -GType dvb_recordings_store_get_type (void); +GType dvb_recordings_store_get_type (void) G_GNUC_CONST; DVBRecordingsStore* dvb_recordings_store_get_instance (void); guint32 dvb_recordings_store_get_next_id (DVBRecordingsStore* self); DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); DVBTimer* dvb_timer_new (guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); DVBTimer* dvb_timer_construct (GType object_type, guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); +void dvb_recorder_start_recording (DVBRecorder* self, DVBTimer* timer); static GFile* dvb_recorder_create_recording_dirs (DVBRecorder* self, DVBChannel* channel, guint* start, int start_length1); void dvb_timer_set_sink (DVBTimer* self, GstElement* value); -GType dvb_channel_factory_get_type (void); +GType dvb_channel_factory_get_type (void) G_GNUC_CONST; DVBChannelFactory* dvb_device_group_get_channel_factory (DVBDeviceGroup* self); -GType dvb_player_thread_get_type (void); +GType dvb_player_thread_get_type (void) G_GNUC_CONST; DVBPlayerThread* dvb_channel_factory_watch_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink_element, gboolean force, DVBForcedStopNotify notify_func, void* notify_func_target); GstElement* dvb_player_thread_get_pipeline (DVBPlayerThread* self); +gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); static void dvb_recorder_on_eit_structure (DVBRecorder* self, DVBPlayerThread* player, const GstStructure* structure); static void _dvb_recorder_on_eit_structure_dvb_player_thread_eit_structure (DVBPlayerThread* _sender, const GstStructure* structure, gpointer self); DVBRecording* dvb_recording_new (void); @@ -509,23 +520,20 @@ void dvb_recording_set_Name (DVBRecording* self, const char* value); void dvb_recording_set_Description (DVBRecording* self, const char* value); guint32 dvb_recording_get_Id (DVBRecording* self); -gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec, gboolean monitor); -void dvb_recorder_start_recording (DVBRecorder* self, DVBTimer* timer); +gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec); time_t dvb_utils_difftime (struct tm* t1, struct tm* t2); void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result); void dvb_recording_set_Length (DVBRecording* self, gint64 value); const char* dvb_recording_get_ChannelName (DVBRecording* self); gint64 dvb_recording_get_Length (DVBRecording* self); -void dvb_recording_save_to_disk (DVBRecording* self, GError** error); -gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); +void dvb_recording_save_to_disk (DVBRecording* self); GstElement* dvb_timer_get_sink (DVBTimer* self); -void dvb_recordings_store_monitor_recording (DVBRecordingsStore* self, DVBRecording* rec); +void dvb_recording_monitor_recording (DVBRecording* self); char* dvb_utils_remove_nonalphanums (const char* text); GFile* dvb_device_group_get_RecordingsDirectory (DVBDeviceGroup* self); void dvb_utils_mkdirs (GFile* directory, GError** error); gboolean dvb_timer_is_end_due (DVBTimer* self); gboolean dvb_timer_is_start_due (DVBTimer* self); -gboolean dvb_id_bus_recorder_DeleteTimer (DVBIDBusRecorder* self, guint32 timer_id, GError** error); static void _g_slist_free_g_object_unref (GSList* self); const char* dvb_recording_get_Name (DVBRecording* self); guint dvb_recording_get_ChannelSid (DVBRecording* self); @@ -534,6 +542,8 @@ guint dvb_recorder_get_count (DVBRecorder* self); void dvb_recordings_store_restore_from_dir (DVBRecordingsStore* self, GFile* recordingsbasedir); static GObject * dvb_recorder_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); @@ -541,8 +551,6 @@ static void dvb_recorder_finalize (GObject* obj); static void dvb_recorder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_recorder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -563,7 +571,7 @@ static GeeIterator* dvb_recorder_real_iterator (GeeIterable* base) { DVBRecorder * self; - GeeIterator* result; + GeeIterator* result = NULL; GeeCollection* _tmp0_; GeeIterator* _tmp1_; self = (DVBRecorder*) base; @@ -572,9 +580,23 @@ } +/** + * @channel: Channel number + * @start_year: The year when the recording should start + * @start_month: The month when recording should start + * @start_day: The day when recording should start + * @start_hour: The hour when recording should start + * @start_minute: The minute when recording should start + * @duration: How long the channel should be recorded (in minutes) + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * be created + * @returns: TRUE on success + * + * Add a new timer + */ 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; - gboolean result; + gboolean result = FALSE; DVBTimer* new_timer; self = (DVBRecorder*) base; new_timer = dvb_recorder_create_timer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration); @@ -592,22 +614,24 @@ } -static gpointer _g_object_ref0 (gpointer self) { - return self ? g_object_ref (self) : NULL; -} - - +/** + * Works the same way as AddTimer() but adds a margin before and + * after the timer. + * + * If the timer with added margins conflicts with a scheduled + * recording the margins are removed and adding the timer will + * be tried again. + */ 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; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBTimer* new_timer; DVBSettings* settings; gint start_margin; guint end_margin; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _inner_error_ = NULL; new_timer = dvb_recorder_create_timer (self, channel, start_year, start_month, start_day, start_hour, start_minute, duration); if (new_timer == NULL) { *timer_id = (guint32) 0; @@ -615,7 +639,7 @@ _g_object_unref0 (new_timer); return result; } - settings = _g_object_ref0 (dvb_factory_get_settings ()); + settings = dvb_factory_get_settings (); start_margin = 0; end_margin = (guint) 0; { @@ -624,10 +648,10 @@ _tmp0_ = dvb_settings_get_integer (settings, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_START, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch34_g_key_file_error; + goto __catch98_g_key_file_error; } - _g_object_unref0 (new_timer); _g_object_unref0 (settings); + _g_object_unref0 (new_timer); 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; @@ -636,10 +660,10 @@ _tmp1_ = dvb_settings_get_integer (settings, DVB_SETTINGS_TIMERS_SECTION, DVB_SETTINGS_MARGIN_END, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch34_g_key_file_error; + goto __catch98_g_key_file_error; } - _g_object_unref0 (new_timer); _g_object_unref0 (settings); + _g_object_unref0 (new_timer); 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; @@ -648,27 +672,27 @@ dvb_timer_set_Duration (new_timer, dvb_timer_get_Duration (new_timer) + end_margin); dvb_timer_add_to_start_time (new_timer, start_margin); } - goto __finally34; - __catch34_g_key_file_error: + goto __finally98; + __catch98_g_key_file_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Recorder.vala:132: Could not retrieve start/end margins: %s", e->message); + g_critical ("Recorder.vala:133: Could not retrieve start/end margins: %s", e->message); _g_error_free0 (e); } } - __finally34: + __finally98: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); - _g_object_unref0 (new_timer); _g_object_unref0 (settings); + _g_object_unref0 (new_timer); return FALSE; } else { - _g_object_unref0 (new_timer); _g_object_unref0 (settings); + _g_object_unref0 (new_timer); 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; @@ -681,104 +705,151 @@ ret = dvb_recorder_add_timer (self, new_timer, timer_id); } result = ret; - _g_object_unref0 (new_timer); _g_object_unref0 (settings); + _g_object_unref0 (new_timer); return result; } static gboolean _dvb_recorder_check_timers_gsource_func (gpointer self) { - return dvb_recorder_check_timers (self); + gboolean result; + result = dvb_recorder_check_timers (self); + return result; } gboolean dvb_recorder_add_timer (DVBRecorder* self, DVBTimer* new_timer, guint32* timer_id) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (new_timer != NULL, FALSE); - _inner_error_ = NULL; if (dvb_timer_has_expired (new_timer)) { result = FALSE; return result; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - gboolean has_conflict; - gint conflict_count; - has_conflict = FALSE; - conflict_count = 0; - { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _key_it; - _key_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint32 key; - DVBTimer* _tmp2_; - gboolean _tmp3_; - if (!gee_iterator_next (_key_it)) { - break; - } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - if ((_tmp3_ = dvb_timer_conflicts_with (_tmp2_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)), new_timer), _g_object_unref0 (_tmp2_), _tmp3_)) { - conflict_count++; - if (conflict_count >= dvb_device_group_get_size (self->priv->_DeviceGroup)) { - char* _tmp5_; - DVBTimer* _tmp4_; - g_debug ("Recorder.vala:160: Timer is conflicting with another timer: %s", _tmp5_ = dvb_timer_to_string (_tmp4_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)))); - _g_free0 (_tmp5_); - _g_object_unref0 (_tmp4_); - has_conflict = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + gboolean has_conflict; + gint conflict_count; + has_conflict = FALSE; + conflict_count = 0; + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _key_it; + _key_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint32 key; + DVBTimer* _tmp2_; + gboolean _tmp3_; + if (!gee_iterator_next (_key_it)) { break; } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + if ((_tmp3_ = dvb_timer_conflicts_with (_tmp2_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)), new_timer), _g_object_unref0 (_tmp2_), _tmp3_)) { + conflict_count++; + if (conflict_count >= dvb_device_group_get_size (self->priv->_DeviceGroup)) { + DVBTimer* _tmp4_; + char* _tmp5_; + g_debug ("Recorder.vala:161: Timer is conflicting with another timer: %s", _tmp5_ = dvb_timer_to_string (_tmp4_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)))); + _g_free0 (_tmp5_); + _g_object_unref0 (_tmp4_); + has_conflict = TRUE; + break; + } + } } + _g_object_unref0 (_key_it); } - _g_object_unref0 (_key_it); - } - if (!has_conflict) { - gboolean _tmp6_ = FALSE; - gee_abstract_map_set ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (dvb_timer_get_Id (new_timer)), new_timer); - dvb_database_timers_store_add_timer_to_device_group (dvb_factory_get_timers_store (), new_timer, self->priv->_DeviceGroup, &_inner_error_); - 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_emit_by_name ((DVBIDBusRecorder*) self, "changed", dvb_timer_get_Id (new_timer), (guint) DVB_CHANGE_TYPE_ADDED); - if (gee_map_get_size ((GeeMap*) self->priv->timers) == 1) { - _tmp6_ = !self->priv->have_check_timers_timeout; - } else { - _tmp6_ = FALSE; - } - if (_tmp6_) { - g_debug ("Recorder.vala:175: Creating new check timers"); - self->priv->check_timers_event_id = 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->have_check_timers_timeout = TRUE; + if (!has_conflict) { + gboolean _tmp7_ = FALSE; + gee_abstract_map_set ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (dvb_timer_get_Id (new_timer)), new_timer); + { + DVBdatabaseTimersStore* _tmp6_; + dvb_database_timers_store_add_timer_to_device_group (_tmp6_ = dvb_factory_get_timers_store (), new_timer, self->priv->_DeviceGroup, &_inner_error_); + _g_object_unref0 (_tmp6_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch100_dvb_database_sql_error; + } + { + 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 __finally100; + __catch100_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Recorder.vala:175: %s", e->message); + _g_error_free0 (e); + } + } + __finally100: + 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; + } + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", dvb_timer_get_Id (new_timer), (guint) DVB_CHANGE_TYPE_ADDED); + if (gee_map_get_size ((GeeMap*) self->priv->timers) == 1) { + _tmp7_ = !self->priv->have_check_timers_timeout; + } else { + _tmp7_ = FALSE; + } + if (_tmp7_) { + g_debug ("Recorder.vala:180: Creating new check timers"); + self->priv->check_timers_event_id = 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->have_check_timers_timeout = TRUE; + } + *timer_id = dvb_timer_get_Id (new_timer); + ret = TRUE; } - *timer_id = dvb_timer_get_Id (new_timer); - ret = TRUE; + } + __finally99: + { + 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_); + return FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @event_id: id of the EPG event + * @channel_sid: SID of channel + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * be created + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_AddTimerForEPGEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, guint32* timer_id, GError** error) { DVBRecorder * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; DVBdatabaseEPGStore* epgstore; DVBEvent* event; struct tm _tmp2_ = {0}; struct tm start; gboolean _tmp3_; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _inner_error_ = NULL; epgstore = dvb_factory_get_epg_store (); event = NULL; { @@ -787,44 +858,48 @@ _tmp0_ = dvb_database_epg_store_get_event (epgstore, event_id, channel_sid, dvb_device_group_get_Id (self->priv->_DeviceGroup), &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch35_dvb_database_sql_error; + goto __catch101_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; } event = (_tmp1_ = _tmp0_, _dvb_event_unref0 (event), _tmp1_); } - goto __finally35; - __catch35_dvb_database_sql_error: + goto __finally101; + __catch101_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Recorder.vala:204: %s", e->message); + g_critical ("Recorder.vala:209: %s", e->message); _g_error_free0 (e); } } - __finally35: + __finally101: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return FALSE; } else { _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); 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 (event == NULL) { - g_debug ("Recorder.vala:207: Could not find event with id %u", event_id); + g_debug ("Recorder.vala:212: Could not find event with id %u", event_id); *timer_id = (guint32) 0; result = FALSE; _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return result; } start = (dvb_event_get_local_start_time (event, &_tmp2_), _tmp2_); @@ -833,9 +908,11 @@ if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return FALSE; } else { _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); 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; @@ -843,169 +920,268 @@ } result = _tmp3_; _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return result; } +/** + * @timer_id: The id of the timer you want to delete + * @returns: TRUE on success + * + * Delete timer. If the id belongs to the currently + * active timer recording is aborted. + */ static gboolean dvb_recorder_real_DeleteTimer (DVBIDBusRecorder* base, guint32 timer_id, GError** error) { DVBRecorder * self; - gboolean result; - GError * _inner_error_; - gboolean val = FALSE; + gboolean result = FALSE; self = (DVBRecorder*) base; - _inner_error_ = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_timers); + result = dvb_recorder_delete_timer (self, timer_id); + return result; +} + + +gboolean dvb_recorder_delete_timer (DVBRecorder* self, guint32 timer_id) { + gboolean result = FALSE; + gboolean val = FALSE; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - gboolean _tmp0_; - _tmp0_ = dvb_id_bus_recorder_IsTimerActive ((DVBIDBusRecorder*) self, timer_id, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - return FALSE; - } 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 FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + if (dvb_recorder_is_timer_active (self, timer_id)) { + DVBTimer* timer; + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + dvb_recorder_stop_recording (self, timer); + _g_object_unref0 (timer); } - } - if (_tmp0_) { - DVBTimer* timer; - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - dvb_recorder_stop_recording (self, timer); - _g_object_unref0 (timer); - } - gee_map_remove ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id), NULL); - dvb_database_timers_store_remove_timer_from_device_group (dvb_factory_get_timers_store (), (guint) timer_id, self->priv->_DeviceGroup, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - return FALSE; - } 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); + gee_abstract_map_unset ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id), NULL); + { + DVBdatabaseTimersStore* _tmp0_; + dvb_database_timers_store_remove_timer_from_device_group (_tmp0_ = dvb_factory_get_timers_store (), (guint) timer_id, self->priv->_DeviceGroup, &_inner_error_); + _g_object_unref0 (_tmp0_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch103_dvb_database_sql_error; + } + { + 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 __finally103; + __catch103_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Recorder.vala:249: %s", e->message); + _g_error_free0 (e); + } + } + __finally103: + 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; } + g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (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; + } + __finally102: + { + 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_); + return FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = val; return result; } +/** + * dvb_recorder_GetTimers + * @returns: A list of all timer ids + */ static guint32* dvb_recorder_real_GetTimers (DVBIDBusRecorder* base, int* result_length1, GError** error) { DVBRecorder * self; - guint32* result; - gint timer_arr_size; + guint32* result = NULL; gint timer_arr_length1; + gint _timer_arr_size_; guint32* timer_arr; guint32* _tmp5_; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; timer_arr = (timer_arr_length1 = 0, NULL); - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - guint32* _tmp1_; - gint _tmp0_; - gint i; - timer_arr = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->timers)), timer_arr = (g_free (timer_arr), NULL), timer_arr_length1 = _tmp0_, timer_arr_size = timer_arr_length1, _tmp1_); - i = 0; - { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _key_it; - _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint32 key; - DVBTimer* _tmp4_; - if (!gee_iterator_next (_key_it)) { - break; - } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - timer_arr[i] = dvb_timer_get_Id (_tmp4_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key))); - _g_object_unref0 (_tmp4_); - i++; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + gint _tmp0_; + guint32* _tmp1_; + gint i; + timer_arr = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->timers)), timer_arr = (g_free (timer_arr), NULL), timer_arr_length1 = _tmp0_, _timer_arr_size_ = timer_arr_length1, _tmp1_); + i = 0; + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _key_it; + _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint32 key; + DVBTimer* _tmp4_; + if (!gee_iterator_next (_key_it)) { + break; + } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + timer_arr[i] = dvb_timer_get_Id (_tmp4_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key))); + _g_object_unref0 (_tmp4_); + i++; + } + _g_object_unref0 (_key_it); + } + } + __finally104: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + timer_arr = (g_free (timer_arr), NULL); + return NULL; + } else { + timer_arr = (g_free (timer_arr), 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_object_unref0 (_key_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = (_tmp5_ = timer_arr, *result_length1 = timer_arr_length1, _tmp5_); return result; timer_arr = (g_free (timer_arr), NULL); } +/** + * @timer_id: Timer's id + * @start_time: An array of length 5, where index 0 = year, 1 = month, + * 2 = day, 3 = hour and 4 = minute. + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_GetStartTime (DVBIDBusRecorder* base, guint32 timer_id, guint32** start_time, int* start_time_length1, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; if (start_time != NULL) { *start_time = NULL; } - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - guint32* _tmp2_; - gint _tmp1_; - DVBTimer* _tmp0_; - *start_time = (_tmp2_ = dvb_timer_get_start_time (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)), &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); - _g_object_unref0 (_tmp0_); - ret = TRUE; - } else { - guint32* _tmp4_; - guint* _tmp3_ = NULL; - *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); - ret = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* _tmp0_; + gint _tmp1_; + guint32* _tmp2_; + *start_time = (_tmp2_ = dvb_timer_get_start_time (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)), &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } else { + guint* _tmp3_ = NULL; + guint32* _tmp4_; + *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); + ret = FALSE; + } + } + __finally105: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @timer_id: The new timer's id on success, or 0 if timer couldn't + * @start_year: The year when the recording should start + * @start_month: The month when recording should start + * @start_day: The day when recording should start + * @start_hour: The hour when recording should start + * @start_minute: The minute when recording should start + * @duration: How long the channel should be recorded (in minutes) + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_SetStartTime (DVBIDBusRecorder* base, guint32 timer_id, gint start_year, gint start_month, gint start_day, gint start_hour, gint start_minute, GError** error) { DVBRecorder * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _inner_error_ = NULL; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - gboolean _tmp0_; - _tmp0_ = dvb_id_bus_recorder_IsTimerActive ((DVBIDBusRecorder*) self, timer_id, &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - return FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + gboolean _tmp0_; + _tmp0_ = dvb_id_bus_recorder_IsTimerActive ((DVBIDBusRecorder*) self, timer_id, &_inner_error_); + if (_inner_error_ != NULL) { + goto __finally106; + } + if (_tmp0_) { + g_warning ("Recorder.vala:319: Cannot change start time of already active timer"); } 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 FALSE; + DVBTimer* timer; + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + dvb_timer_set_start_time (timer, start_year, start_month, start_day, start_hour, start_minute); + ret = TRUE; + _g_object_unref0 (timer); } } - if (_tmp0_) { - g_warning ("Recorder.vala:306: Cannot change start time of already active timer"); + } + __finally106: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; } else { - DVBTimer* timer; - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - dvb_timer_set_start_time (timer, start_year, start_month, start_day, start_hour, start_minute); - ret = TRUE; - _g_object_unref0 (timer); + 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_static_rec_mutex_unlock (&self->priv->__lock_timers); if (ret) { g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_UPDATED); } @@ -1014,73 +1190,137 @@ } +/** + * @timer_id: Timer's id + * @end_time: Same as dvb_recorder_GetStartTime() + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_GetEndTime (DVBIDBusRecorder* base, guint32 timer_id, guint** end_time, int* end_time_length1, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; if (end_time != NULL) { *end_time = NULL; } - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - guint* _tmp2_; - gint _tmp1_; - DVBTimer* _tmp0_; - *end_time = (_tmp2_ = dvb_timer_get_end_time (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)), &_tmp1_), *end_time = (g_free (*end_time), NULL), *end_time_length1 = _tmp1_, _tmp2_); - _g_object_unref0 (_tmp0_); - ret = TRUE; - } else { - guint* _tmp4_; - guint* _tmp3_ = NULL; - *end_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *end_time = (g_free (*end_time), NULL), *end_time_length1 = 0, _tmp4_); - ret = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* _tmp0_; + gint _tmp1_; + guint* _tmp2_; + *end_time = (_tmp2_ = dvb_timer_get_end_time (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)), &_tmp1_), *end_time = (g_free (*end_time), NULL), *end_time_length1 = _tmp1_, _tmp2_); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } else { + guint* _tmp3_ = NULL; + guint* _tmp4_; + *end_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *end_time = (g_free (*end_time), NULL), *end_time_length1 = 0, _tmp4_); + ret = FALSE; + } + } + __finally107: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @timer_id: Timer's id + * @duration: Duration in seconds or 0 if there's no timer with + * the given id + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_GetDuration (DVBIDBusRecorder* base, guint32 timer_id, guint* duration, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - DVBTimer* _tmp0_; - *duration = dvb_timer_get_Duration (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))); - _g_object_unref0 (_tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* _tmp0_; + *duration = dvb_timer_get_Duration (_tmp0_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } + } + __finally108: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @timer_id: Timer's id + * @duration: Duration in minutes + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_SetDuration (DVBIDBusRecorder* base, guint32 timer_id, guint duration, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - ret = gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (ret) { - DVBTimer* timer; - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - dvb_timer_set_Duration (timer, duration); - _g_object_unref0 (timer); + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + ret = gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + if (ret) { + DVBTimer* timer; + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + dvb_timer_set_Duration (timer, duration); + _g_object_unref0 (timer); + } + } + __finally109: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (ret) { g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_UPDATED); } @@ -1089,66 +1329,111 @@ } +/** + * @timer_id: Timer's id + * @name: The name of the channel the timer belongs to or an + * empty string when a timer with the given id doesn't exist + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_GetChannelName (DVBIDBusRecorder* base, guint32 timer_id, char** name, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; if (name != NULL) { *name = NULL; } - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - DVBTimer* t; - char* _tmp0_; - t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - *name = (_tmp0_ = g_strdup (dvb_channel_get_Name (dvb_timer_get_Channel (t))), _g_free0 (*name), _tmp0_); - ret = TRUE; - _g_object_unref0 (t); - } else { - char* _tmp1_; - *name = (_tmp1_ = g_strdup (""), _g_free0 (*name), _tmp1_); - ret = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* t; + char* _tmp0_; + t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + *name = (_tmp0_ = g_strdup (dvb_channel_get_Name (dvb_timer_get_Channel (t))), _g_free0 (*name), _tmp0_); + ret = TRUE; + _g_object_unref0 (t); + } else { + char* _tmp1_; + *name = (_tmp1_ = g_strdup (""), _g_free0 (*name), _tmp1_); + ret = FALSE; + } + } + __finally110: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @timer_id: Timer's id + * @title: The name of the show the timer belongs to or an + * empty string if the timer doesn't exist or has no information + * about the title of the show + * @returns: TRUE on success + */ static gboolean dvb_recorder_real_GetTitle (DVBIDBusRecorder* base, guint32 timer_id, char** title, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; if (title != NULL) { *title = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - DVBTimer* t; - DVBEvent* event; - const char* _tmp0_; - char* _tmp1_; - t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - event = dvb_schedule_get_event (dvb_channel_get_Schedule (dvb_timer_get_Channel (t)), dvb_timer_get_EventID (t)); - _tmp0_ = NULL; - if (event == NULL) { - _tmp0_ = ""; - } else { - _tmp0_ = event->name; - } - *title = (_tmp1_ = g_strdup (_tmp0_), _g_free0 (*title), _tmp1_); - ret = TRUE; - _g_object_unref0 (t); - _dvb_event_unref0 (event); + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* t; + DVBEvent* event; + const char* _tmp0_; + char* _tmp1_; + t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + event = dvb_schedule_get_event (dvb_channel_get_Schedule (dvb_timer_get_Channel (t)), dvb_timer_get_EventID (t)); + _tmp0_ = NULL; + if (event == NULL) { + _tmp0_ = ""; + } else { + _tmp0_ = event->name; + } + *title = (_tmp1_ = g_strdup (_tmp0_), _g_free0 (*title), _tmp1_); + ret = TRUE; + _dvb_event_unref0 (event); + _g_object_unref0 (t); + } + } + __finally111: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); if (!ret) { char* _tmp2_; *title = (_tmp2_ = g_strdup (""), _g_free0 (*title), _tmp2_); @@ -1158,68 +1443,92 @@ } +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + static gboolean dvb_recorder_real_GetAllInformations (DVBIDBusRecorder* base, guint32 timer_id, DVBTimerInfo* info, GError** error) { DVBRecorder * self; - gboolean result; - DVBTimerInfo _tmp1_; + gboolean result = FALSE; DVBTimerInfo _tmp0_ = {0}; + DVBTimerInfo _tmp1_; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; *info = (_tmp1_ = (memset (&_tmp0_, 0, sizeof (DVBTimerInfo)), _tmp0_), dvb_timer_info_destroy (info), _tmp1_); - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - if (gee_map_contains ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { - DVBTimer* t; - DVBChannel* chan; - char* _tmp2_; - DVBEvent* event; - t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - (*info).id = timer_id; - (*info).duration = dvb_timer_get_Duration (t); - (*info).active = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); - chan = _g_object_ref0 (dvb_timer_get_Channel (t)); - (*info).channel_name = (_tmp2_ = g_strdup (dvb_channel_get_Name (chan)), _g_free0 ((*info).channel_name), _tmp2_); - event = dvb_schedule_get_event (dvb_channel_get_Schedule (chan), dvb_timer_get_EventID (t)); - if (event != NULL) { - char* _tmp3_; - (*info).title = (_tmp3_ = g_strdup (event->name), _g_free0 ((*info).title), _tmp3_); + g_static_rec_mutex_lock (&self->priv->__lock_timers); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id))) { + DVBTimer* t; + DVBChannel* chan; + char* _tmp2_; + DVBEvent* event; + t = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + (*info).id = timer_id; + (*info).duration = dvb_timer_get_Duration (t); + (*info).active = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); + chan = _g_object_ref0 (dvb_timer_get_Channel (t)); + (*info).channel_name = (_tmp2_ = g_strdup (dvb_channel_get_Name (chan)), _g_free0 ((*info).channel_name), _tmp2_); + event = dvb_schedule_get_event (dvb_channel_get_Schedule (chan), dvb_timer_get_EventID (t)); + if (event != NULL) { + char* _tmp3_; + (*info).title = (_tmp3_ = g_strdup (event->name), _g_free0 ((*info).title), _tmp3_); + } else { + char* _tmp4_; + (*info).title = (_tmp4_ = g_strdup (""), _g_free0 ((*info).title), _tmp4_); + } + ret = TRUE; + _dvb_event_unref0 (event); + _g_object_unref0 (chan); + _g_object_unref0 (t); } else { - char* _tmp4_; - (*info).title = (_tmp4_ = g_strdup (""), _g_free0 ((*info).title), _tmp4_); + char* _tmp5_; + char* _tmp6_; + (*info).id = (guint32) 0; + (*info).duration = (guint) 0; + (*info).active = FALSE; + (*info).channel_name = (_tmp5_ = g_strdup (""), _g_free0 ((*info).channel_name), _tmp5_); + (*info).title = (_tmp6_ = g_strdup (""), _g_free0 ((*info).title), _tmp6_); + ret = FALSE; + } + } + __finally112: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - ret = TRUE; - _g_object_unref0 (t); - _g_object_unref0 (chan); - _dvb_event_unref0 (event); - } else { - char* _tmp5_; - char* _tmp6_; - (*info).id = (guint32) 0; - (*info).duration = (guint) 0; - (*info).active = FALSE; - (*info).channel_name = (_tmp5_ = g_strdup (""), _g_free0 ((*info).channel_name), _tmp5_); - (*info).title = (_tmp6_ = g_strdup (""), _g_free0 ((*info).title), _tmp6_); - ret = FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = ret; return result; } +/** + * @returns: The currently active timers + */ static guint32* dvb_recorder_real_GetActiveTimers (DVBIDBusRecorder* base, int* result_length1, GError** error) { DVBRecorder * self; - guint32* result; - guint32* _tmp1_; - gint val_size; + guint32* result = NULL; gint val_length1; + gint _val_size_; + guint32* _tmp1_; gint _tmp0_; guint32* val; gint i; guint32* _tmp2_; self = (DVBRecorder*) base; - val = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers)), val_length1 = _tmp0_, val_size = val_length1, _tmp1_); + val = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers)), val_length1 = _tmp0_, _val_size_ = val_length1, _tmp1_); i = 0; { GeeIterator* _timer_id_it; @@ -1244,53 +1553,85 @@ } +/** + * @timer_id: Timer's id + * @returns: TRUE if timer is currently active + */ static gboolean dvb_recorder_real_IsTimerActive (DVBIDBusRecorder* base, guint32 timer_id, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; self = (DVBRecorder*) base; + result = dvb_recorder_is_timer_active (self, timer_id); + return result; +} + + +gboolean dvb_recorder_is_timer_active (DVBRecorder* self, guint32 timer_id) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); result = gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); return result; } +/** + * @returns: TRUE if a timer is already scheduled in the given + * period of time + */ static gboolean dvb_recorder_real_HasTimer (DVBIDBusRecorder* base, guint start_year, guint start_month, guint start_day, guint start_hour, guint start_minute, guint duration, GError** error) { DVBRecorder * self; - gboolean result; + gboolean result = FALSE; gboolean val; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; val = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { + g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _key_it; - _key_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint32 key; - DVBTimer* _tmp2_; - DVBOverlapType _tmp3_; - DVBOverlapType overlap; - gboolean _tmp4_ = FALSE; - if (!gee_iterator_next (_key_it)) { - break; - } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - overlap = (_tmp3_ = dvb_timer_get_overlap_local (_tmp2_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)), start_year, start_month, start_day, start_hour, start_minute, duration), _g_object_unref0 (_tmp2_), _tmp3_); - if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { - _tmp4_ = TRUE; - } else { - _tmp4_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; - } - if (_tmp4_) { - val = TRUE; - break; + { + GeeSet* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _key_it; + _key_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + guint32 key; + DVBTimer* _tmp2_; + DVBOverlapType _tmp3_; + DVBOverlapType overlap; + gboolean _tmp4_ = FALSE; + if (!gee_iterator_next (_key_it)) { + break; + } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + overlap = (_tmp3_ = dvb_timer_get_overlap_local (_tmp2_ = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)), start_year, start_month, start_day, start_hour, start_minute, duration), _g_object_unref0 (_tmp2_), _tmp3_); + if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { + _tmp4_ = TRUE; + } else { + _tmp4_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; + } + if (_tmp4_) { + val = TRUE; + break; + } } + _g_object_unref0 (_key_it); + } + } + __finally113: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - _g_object_unref0 (_key_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = val; return result; } @@ -1298,13 +1639,12 @@ static DVBOverlapType dvb_recorder_real_HasTimerForEvent (DVBIDBusRecorder* base, guint event_id, guint channel_sid, GError** error) { DVBRecorder * self; - DVBOverlapType result; - GError * _inner_error_; + DVBOverlapType result = 0; DVBdatabaseEPGStore* epgstore; DVBEvent* event; DVBOverlapType val; + GError * _inner_error_ = NULL; self = (DVBRecorder*) base; - _inner_error_ = NULL; epgstore = dvb_factory_get_epg_store (); event = NULL; { @@ -1313,129 +1653,164 @@ _tmp0_ = dvb_database_epg_store_get_event (epgstore, event_id, channel_sid, dvb_device_group_get_Id (self->priv->_DeviceGroup), &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch36_dvb_database_sql_error; + goto __catch114_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; } event = (_tmp1_ = _tmp0_, _dvb_event_unref0 (event), _tmp1_); } - goto __finally36; - __catch36_dvb_database_sql_error: + goto __finally114; + __catch114_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Recorder.vala:525: %s", e->message); + g_critical ("Recorder.vala:542: %s", e->message); _g_error_free0 (e); } } - __finally36: + __finally114: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return 0; } else { _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); 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 (event == NULL) { - g_debug ("Recorder.vala:528: Could not find event with id %u", event_id); + g_debug ("Recorder.vala:545: Could not find event with id %u", event_id); result = DVB_OVERLAP_TYPE_UNKNOWN; _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return result; } val = DVB_OVERLAP_TYPE_NONE; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { + g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _key_it; - _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint32 key; - DVBTimer* timer; - if (!gee_iterator_next (_key_it)) { - break; - } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - if (dvb_channel_get_Sid (dvb_timer_get_Channel (timer)) == channel_sid) { - DVBOverlapType overlap; - gboolean _tmp4_ = FALSE; - overlap = dvb_timer_get_overlap_utc (timer, event->year, event->month, event->day, event->hour, event->minute, event->duration / 60); - if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { - _tmp4_ = TRUE; - } else { - _tmp4_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; - } - if (_tmp4_) { - val = overlap; - _g_object_unref0 (timer); + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _key_it; + _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint32 key; + DVBTimer* timer; + if (!gee_iterator_next (_key_it)) { break; } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); + if (dvb_channel_get_Sid (dvb_timer_get_Channel (timer)) == channel_sid) { + DVBOverlapType overlap; + gboolean _tmp4_ = FALSE; + overlap = dvb_timer_get_overlap_utc (timer, event->year, event->month, event->day, event->hour, event->minute, event->duration / 60); + if (overlap == DVB_OVERLAP_TYPE_PARTIAL) { + _tmp4_ = TRUE; + } else { + _tmp4_ = overlap == DVB_OVERLAP_TYPE_COMPLETE; + } + if (_tmp4_) { + val = overlap; + _g_object_unref0 (timer); + break; + } + } + _g_object_unref0 (timer); } - _g_object_unref0 (timer); + _g_object_unref0 (_key_it); + } + } + __finally115: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); + return 0; + } else { + _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); + 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; } - _g_object_unref0 (_key_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = val; _dvb_event_unref0 (event); + _g_object_unref0 (epgstore); return result; } void dvb_recorder_stop (DVBRecorder* self) { + 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); } - g_static_rec_mutex_lock (&self->priv->__lock_timers); { + g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeIterator* _timer_id_it; - _timer_id_it = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); - while (TRUE) { - guint32 timer_id; - DVBTimer* timer; - if (!gee_iterator_next (_timer_id_it)) { - break; + { + GeeIterator* _timer_id_it; + _timer_id_it = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); + while (TRUE) { + guint32 timer_id; + DVBTimer* timer; + if (!gee_iterator_next (_timer_id_it)) { + break; + } + timer_id = GPOINTER_TO_UINT (gee_iterator_get (_timer_id_it)); + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + dvb_recorder_stop_recording (self, timer); + _g_object_unref0 (timer); } - timer_id = GPOINTER_TO_UINT (gee_iterator_get (_timer_id_it)); - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - dvb_recorder_stop_recording (self, timer); - _g_object_unref0 (timer); + _g_object_unref0 (_timer_id_it); } - _g_object_unref0 (_timer_id_it); + } + __finally116: + { + 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_); + return; } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); } 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; + DVBTimer* result = NULL; DVBChannelList* channels; guint32 timer_id; DVBChannel* _tmp0_; DVBTimer* _tmp1_; DVBTimer* new_timer; g_return_val_if_fail (self != NULL, NULL); - g_debug ("Recorder.vala:568: Creating new timer: channel: %u, start: %04d-%02d-%" \ + g_debug ("Recorder.vala:585: 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); channels = _g_object_ref0 (dvb_device_group_get_Channels (self->priv->_DeviceGroup)); if (!dvb_channel_list_contains (channels, channel)) { - g_warning ("Recorder.vala:574: No channel %u for device group %u", channel, dvb_device_group_get_Id (self->priv->_DeviceGroup)); + g_warning ("Recorder.vala:591: No channel %u for device group %u", channel, dvb_device_group_get_Id (self->priv->_DeviceGroup)); result = NULL; _g_object_unref0 (channels); return result; @@ -1448,6 +1823,9 @@ } +/** + * Start recording of specified timer + */ static gpointer _gst_object_ref0 (gpointer self) { return self ? gst_object_ref (self) : NULL; } @@ -1460,31 +1838,32 @@ void dvb_recorder_start_recording (DVBRecorder* self, DVBTimer* timer) { DVBChannel* channel; - guint* _tmp2_; - gint _tmp1__length1; - guint* _tmp1_; gint _tmp0_; + guint* _tmp1_; + gint _tmp1__length1; + guint* _tmp2_; GFile* _tmp3_; GFile* location; GstElement* filesink; char* _tmp4_; DVBChannelFactory* channel_factory; DVBPlayerThread* player; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (timer != NULL); channel = _g_object_ref0 (dvb_timer_get_Channel (timer)); location = (_tmp3_ = (_tmp2_ = (_tmp1_ = dvb_timer_get_start_time (timer, &_tmp0_), _tmp1__length1 = _tmp0_, _tmp1_), dvb_recorder_create_recording_dirs (self, channel, _tmp2_, _tmp0_)), _tmp1_ = (g_free (_tmp1_), NULL), _tmp3_); if (location == NULL) { - _g_object_unref0 (channel); _g_object_unref0 (location); + _g_object_unref0 (channel); return; } filesink = gst_element_factory_make ("filesink", NULL); if (filesink == NULL) { - g_critical ("Recorder.vala:600: Could not create filesink element"); - _g_object_unref0 (channel); - _g_object_unref0 (location); + g_critical ("Recorder.vala:617: Could not create filesink element"); _gst_object_unref0 (filesink); + _g_object_unref0 (location); + _g_object_unref0 (channel); return; } g_object_set ((GObject*) filesink, "location", _tmp4_ = g_file_get_path (location), NULL); @@ -1499,16 +1878,16 @@ DVBRecording* recording; struct tm _tmp7_ = {0}; struct tm _tmp8_; - g_debug ("Recorder.vala:610: Setting pipeline to playing"); + g_debug ("Recorder.vala:627: Setting pipeline to playing"); ret = (_tmp6_ = gst_element_set_state (_tmp5_ = dvb_player_thread_get_pipeline (player), GST_STATE_PLAYING), _gst_object_unref0 (_tmp5_), _tmp6_); if (ret == GST_STATE_CHANGE_FAILURE) { - g_critical ("Recorder.vala:614: Failed setting pipeline to playing"); - dvb_recorder_stop_recording (self, timer); - _g_object_unref0 (channel); - _g_object_unref0 (location); - _gst_object_unref0 (filesink); - _g_object_unref0 (channel_factory); + g_critical ("Recorder.vala:631: Failed setting pipeline to playing"); + dvb_channel_factory_stop_channel (channel_factory, channel, filesink); _g_object_unref0 (player); + _g_object_unref0 (channel_factory); + _gst_object_unref0 (filesink); + _g_object_unref0 (location); + _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); @@ -1525,31 +1904,50 @@ event = dvb_schedule_get_event (dvb_channel_get_Schedule (channel), dvb_timer_get_EventID (timer)); if (event != NULL) { char* _tmp9_; - g_debug ("Recorder.vala:635: Transfering event information from timer"); + g_debug ("Recorder.vala:652: Transfering event information from timer"); dvb_recording_set_Name (recording, event->name); dvb_recording_set_Description (recording, _tmp9_ = g_strdup_printf ("%s\n%s", event->description, event->extended_description)); _g_free0 (_tmp9_); } _dvb_event_unref0 (event); } - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - gee_map_set (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_recording_get_Id (recording)), recording); + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + gee_map_set (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_recording_get_Id (recording)), recording); + } + __finally117: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + _g_object_unref0 (recording); + _g_object_unref0 (player); + _g_object_unref0 (channel_factory); + _gst_object_unref0 (filesink); + _g_object_unref0 (location); + _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); + g_clear_error (&_inner_error_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - dvb_recordings_store_add (dvb_recordings_store_get_instance (), recording, FALSE); + dvb_recordings_store_add (dvb_recordings_store_get_instance (), recording); _g_object_unref0 (recording); } gee_collection_add ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (dvb_timer_get_Id (timer))); g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-started", dvb_timer_get_Id (timer)); - _g_object_unref0 (channel); - _g_object_unref0 (location); - _gst_object_unref0 (filesink); - _g_object_unref0 (channel_factory); _g_object_unref0 (player); + _g_object_unref0 (channel_factory); + _gst_object_unref0 (filesink); + _g_object_unref0 (location); + _g_object_unref0 (channel); } +/** + * Stop recording of specified timer + */ static void g_time_local (time_t time, struct tm* result) { struct tm _result_ = {0}; localtime_r (&time, &_result_); @@ -1559,82 +1957,83 @@ void dvb_recorder_stop_recording (DVBRecorder* self, DVBTimer* timer) { - GError * _inner_error_; DVBRecording* rec; guint32 timer_id; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (timer != NULL); - _inner_error_ = NULL; rec = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - DVBRecording* _tmp0_; - struct tm _tmp4_; - struct tm _tmp3_; - struct tm _tmp1_ = {0}; - struct tm _tmp2_ = {0}; - DVBChannelFactory* channel_factory; - rec = (_tmp0_ = (DVBRecording*) gee_map_get (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_timer_get_Id (timer))), _g_object_unref0 (rec), _tmp0_); - dvb_recording_set_Length (rec, (gint64) dvb_utils_difftime ((_tmp3_ = (g_time_local (time (NULL), &_tmp1_), _tmp1_), &_tmp3_), (_tmp4_ = (dvb_recording_get_StartTime (rec, &_tmp2_), _tmp2_), &_tmp4_))); - g_debug ("Recording of channel %s stopped after %" G_GINT64_FORMAT " seconds", dvb_recording_get_ChannelName (rec), dvb_recording_get_Length (rec)); + g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - dvb_recording_save_to_disk (rec, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch37_g_error; - } + DVBRecording* _tmp0_; + struct tm _tmp1_ = {0}; + struct tm _tmp2_ = {0}; + struct tm _tmp3_; + struct tm _tmp4_; + DVBChannelFactory* channel_factory; + rec = (_tmp0_ = (DVBRecording*) gee_map_get (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_timer_get_Id (timer))), _g_object_unref0 (rec), _tmp0_); + dvb_recording_set_Length (rec, (gint64) dvb_utils_difftime ((_tmp3_ = (g_time_local (time (NULL), &_tmp1_), _tmp1_), &_tmp3_), (_tmp4_ = (dvb_recording_get_StartTime (rec, &_tmp2_), _tmp2_), &_tmp4_))); + g_debug ("Recording of channel %s stopped after %" G_GINT64_FORMAT " seconds", dvb_recording_get_ChannelName (rec), dvb_recording_get_Length (rec)); + dvb_recording_save_to_disk (rec); + channel_factory = _g_object_ref0 (dvb_device_group_get_channel_factory (self->priv->_DeviceGroup)); + dvb_channel_factory_stop_channel (channel_factory, dvb_timer_get_Channel (timer), dvb_timer_get_sink (timer)); + gee_map_unset (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_timer_get_Id (timer)), NULL); + _g_object_unref0 (channel_factory); } - goto __finally37; - __catch37_g_error: + __finally118: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("Recorder.vala:672: Could not save recording: %s", e->message); - _g_error_free0 (e); - } + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally37: 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); g_clear_error (&_inner_error_); return; } - channel_factory = _g_object_ref0 (dvb_device_group_get_channel_factory (self->priv->_DeviceGroup)); - dvb_channel_factory_stop_channel (channel_factory, dvb_timer_get_Channel (timer), dvb_timer_get_sink (timer)); - gee_map_remove (self->priv->recordings, GUINT_TO_POINTER ((guint) dvb_timer_get_Id (timer)), NULL); - _g_object_unref0 (channel_factory); } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); timer_id = dvb_timer_get_Id (timer); - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - gee_collection_remove ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (timer_id)); - gee_map_remove ((GeeMap*) self->priv->timers, GUINT_TO_POINTER (timer_id), NULL); + 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); + } + __finally119: + { + 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); + g_clear_error (&_inner_error_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); - dvb_recordings_store_monitor_recording (dvb_recordings_store_get_instance (), rec); + dvb_recording_monitor_recording (rec); g_signal_emit_by_name ((DVBIDBusRecorder*) self, "changed", timer_id, (guint) DVB_CHANGE_TYPE_DELETED); g_signal_emit_by_name ((DVBIDBusRecorder*) self, "recording-finished", dvb_recording_get_Id (rec)); _g_object_unref0 (rec); } +/** + * @returns: File on success, NULL otherwise + * + * Create directories and set location of recording + */ static GFile* dvb_recorder_create_recording_dirs (DVBRecorder* self, DVBChannel* channel, guint* start, int start_length1) { - GFile* result; - GError * _inner_error_; + GFile* result = NULL; char* channel_name; char* time; GFile* _tmp0_; GFile* _tmp1_; GFile* dir; - char* attributes; GFileInfo* info; GFile* recording; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (channel != NULL, NULL); - _inner_error_ = NULL; channel_name = dvb_utils_remove_nonalphanums (dvb_channel_get_Name (channel)); time = g_strdup_printf ("%u-%u-%u_%u-%u", start[0], start[1], start[2], start[3], start[4]); dir = (_tmp1_ = g_file_get_child (_tmp0_ = g_file_get_child (dvb_device_group_get_RecordingsDirectory (self->priv->_DeviceGroup), channel_name), time), _g_object_unref0 (_tmp0_), _tmp1_); @@ -1642,121 +2041,114 @@ { dvb_utils_mkdirs (dir, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch38_g_error; + goto __catch120_g_error; } } - goto __finally38; - __catch38_g_error: + goto __finally120; + __catch120_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { char* _tmp2_; - g_error ("Recorder.vala:708: Could not create directory %s: %s", _tmp2_ = g_file_get_path (dir), e->message); + g_critical ("Recorder.vala:722: Could not create directory %s: %s", _tmp2_ = g_file_get_path (dir), e->message); _g_free0 (_tmp2_); result = NULL; _g_error_free0 (e); - _g_free0 (channel_name); - _g_free0 (time); _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } } - __finally38: + __finally120: if (_inner_error_ != NULL) { - _g_free0 (channel_name); - _g_free0 (time); _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_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; } } - attributes = g_strdup_printf ("%s,%s", G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); info = NULL; { GFileInfo* _tmp3_; GFileInfo* _tmp4_; - _tmp3_ = g_file_query_info (dir, attributes, 0, NULL, &_inner_error_); + _tmp3_ = g_file_query_info (dir, DVB_RECORDER_ATTRIBUTES, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch39_g_error; + goto __catch121_g_error; } info = (_tmp4_ = _tmp3_, _g_object_unref0 (info), _tmp4_); } - goto __finally39; - __catch39_g_error: + goto __finally121; + __catch121_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Recorder.vala:720: Could not retrieve attributes: %s", e->message); + g_critical ("Recorder.vala:732: Could not retrieve attributes: %s", e->message); result = NULL; _g_error_free0 (e); - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } } - __finally39: + __finally121: if (_inner_error_ != NULL) { - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_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; } if (g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_STANDARD_TYPE) != G_FILE_TYPE_DIRECTORY) { char* _tmp5_; - g_critical ("Recorder.vala:726: %s is not a directory", _tmp5_ = g_file_get_path (dir)); + g_critical ("Recorder.vala:738: %s is not a directory", _tmp5_ = g_file_get_path (dir)); _g_free0 (_tmp5_); result = NULL; - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } if (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) { char* _tmp6_; - g_critical ("Recorder.vala:731: Cannot write to %s", _tmp6_ = g_file_get_path (dir)); + g_critical ("Recorder.vala:743: Cannot write to %s", _tmp6_ = g_file_get_path (dir)); _g_free0 (_tmp6_); result = NULL; - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } recording = g_file_get_child (dir, "001.mpeg"); if (g_file_query_exists (recording, NULL)) { char* _tmp7_; - g_warning ("Recorder.vala:737: Recording %s already exists", _tmp7_ = g_file_get_path (recording)); + g_warning ("Recorder.vala:749: Recording %s already exists", _tmp7_ = g_file_get_path (recording)); _g_free0 (_tmp7_); result = NULL; - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); - _g_object_unref0 (info); _g_object_unref0 (recording); + _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } result = recording; - _g_free0 (channel_name); - _g_free0 (time); - _g_object_unref0 (dir); - _g_free0 (attributes); _g_object_unref0 (info); + _g_object_unref0 (dir); + _g_free0 (time); + _g_free0 (channel_name); return result; } @@ -1768,136 +2160,139 @@ static gboolean dvb_recorder_check_timers (DVBRecorder* self) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean val = FALSE; GSList* ended_recordings; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; - g_debug ("Recorder.vala:744: Checking timers"); + g_debug ("Recorder.vala:756: Checking timers"); ended_recordings = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GSList* deleteable_items; - gboolean _tmp7_ = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_timers); { - GeeIterator* _timer_id_it; - _timer_id_it = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); - while (TRUE) { - guint32 timer_id; - DVBTimer* timer; - if (!gee_iterator_next (_timer_id_it)) { - break; - } - timer_id = GPOINTER_TO_UINT (gee_iterator_get (_timer_id_it)); - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); - if (dvb_timer_is_end_due (timer)) { - ended_recordings = g_slist_prepend (ended_recordings, _g_object_ref0 (timer)); - } - _g_object_unref0 (timer); - } - _g_object_unref0 (_timer_id_it); - } - { - gint i; - i = 0; + GSList* deleteable_items; + gboolean _tmp7_ = FALSE; { - gboolean _tmp0_; - _tmp0_ = TRUE; + GeeIterator* _timer_id_it; + _timer_id_it = gee_iterable_iterator ((GeeIterable*) self->priv->active_timers); while (TRUE) { + guint32 timer_id; DVBTimer* timer; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < g_slist_length (ended_recordings))) { + if (!gee_iterator_next (_timer_id_it)) { break; } - timer = _g_object_ref0 ((DVBTimer*) g_slist_nth_data (ended_recordings, (guint) i)); - dvb_recorder_stop_recording (self, timer); + timer_id = GPOINTER_TO_UINT (gee_iterator_get (_timer_id_it)); + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (timer_id)); + if (dvb_timer_is_end_due (timer)) { + ended_recordings = g_slist_prepend (ended_recordings, _g_object_ref0 (timer)); + } _g_object_unref0 (timer); } + _g_object_unref0 (_timer_id_it); } - } - deleteable_items = NULL; - { - GeeSet* _tmp1_; - GeeIterator* _tmp2_; - GeeIterator* _key_it; - _key_it = (_tmp2_ = gee_iterable_iterator ((GeeIterable*) (_tmp1_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp1_), _tmp2_); - while (TRUE) { - guint32 key; - DVBTimer* timer; - char* _tmp3_; - gboolean _tmp4_ = FALSE; - if (!gee_iterator_next (_key_it)) { - break; - } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); - g_debug ("Recorder.vala:770: Checking timer: %s", _tmp3_ = dvb_timer_to_string (timer)); - _g_free0 (_tmp3_); - if (dvb_timer_is_start_due (timer)) { - _tmp4_ = !gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (dvb_timer_get_Id (timer))); - } else { - _tmp4_ = FALSE; - } - if (_tmp4_) { - dvb_recorder_start_recording (self, timer); - } else { - if (dvb_timer_has_expired (timer)) { - char* _tmp5_; - g_debug ("Recorder.vala:778: Removing expired timer: %s", _tmp5_ = dvb_timer_to_string (timer)); - _g_free0 (_tmp5_); - deleteable_items = g_slist_prepend (deleteable_items, GUINT_TO_POINTER (key)); + { + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + DVBTimer* timer; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_slist_length (ended_recordings))) { + break; + } + timer = _g_object_ref0 ((DVBTimer*) g_slist_nth_data (ended_recordings, (guint) i)); + dvb_recorder_stop_recording (self, timer); + _g_object_unref0 (timer); } } - _g_object_unref0 (timer); } - _g_object_unref0 (_key_it); - } - { - gint i; - i = 0; + deleteable_items = NULL; { - gboolean _tmp6_; - _tmp6_ = TRUE; + GeeSet* _tmp1_; + GeeIterator* _tmp2_; + GeeIterator* _key_it; + _key_it = (_tmp2_ = gee_iterable_iterator ((GeeIterable*) (_tmp1_ = gee_map_get_keys ((GeeMap*) self->priv->timers))), _g_object_unref0 (_tmp1_), _tmp2_); while (TRUE) { - if (!_tmp6_) { - i++; - } - _tmp6_ = FALSE; - if (!(i < g_slist_length (deleteable_items))) { + guint32 key; + DVBTimer* timer; + char* _tmp3_; + gboolean _tmp4_ = FALSE; + if (!gee_iterator_next (_key_it)) { break; } - dvb_id_bus_recorder_DeleteTimer ((DVBIDBusRecorder*) self, GPOINTER_TO_UINT (g_slist_nth_data (deleteable_items, (guint) i)), &_inner_error_); - if (_inner_error_ != NULL) { - _g_slist_free0 (deleteable_items); - __g_slist_free_g_object_unref0 (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); - g_clear_error (&_inner_error_); - return FALSE; + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + timer = (DVBTimer*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->timers, GUINT_TO_POINTER (key)); + g_debug ("Recorder.vala:782: Checking timer: %s", _tmp3_ = dvb_timer_to_string (timer)); + _g_free0 (_tmp3_); + if (dvb_timer_is_start_due (timer)) { + _tmp4_ = !gee_collection_contains ((GeeCollection*) self->priv->active_timers, GUINT_TO_POINTER (dvb_timer_get_Id (timer))); + } else { + _tmp4_ = FALSE; + } + if (_tmp4_) { + dvb_recorder_start_recording (self, timer); + } else { + if (dvb_timer_has_expired (timer)) { + char* _tmp5_; + g_debug ("Recorder.vala:790: Removing expired timer: %s", _tmp5_ = dvb_timer_to_string (timer)); + _g_free0 (_tmp5_); + deleteable_items = g_slist_prepend (deleteable_items, GUINT_TO_POINTER (key)); + } + } + _g_object_unref0 (timer); + } + _g_object_unref0 (_key_it); + } + { + gint i; + i = 0; + { + gboolean _tmp6_; + _tmp6_ = TRUE; + while (TRUE) { + if (!_tmp6_) { + i++; + } + _tmp6_ = FALSE; + if (!(i < g_slist_length (deleteable_items))) { + break; + } + dvb_recorder_delete_timer (self, GPOINTER_TO_UINT (g_slist_nth_data (deleteable_items, (guint) i))); } } } + if (gee_map_get_size ((GeeMap*) self->priv->timers) == 0) { + _tmp7_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers) == 0; + } else { + _tmp7_ = FALSE; + } + if (_tmp7_) { + g_debug ("Recorder.vala:802: 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 { + g_debug ("Recorder.vala:808: %d timers and %d active recordings left", gee_map_get_size ((GeeMap*) self->priv->timers), gee_collection_get_size ((GeeCollection*) self->priv->active_timers)); + val = TRUE; + } + _g_slist_free0 (deleteable_items); } - if (gee_map_get_size ((GeeMap*) self->priv->timers) == 0) { - _tmp7_ = gee_collection_get_size ((GeeCollection*) self->priv->active_timers) == 0; - } else { - _tmp7_ = FALSE; + __finally122: + { + g_static_rec_mutex_unlock (&self->priv->__lock_timers); } - if (_tmp7_) { - g_debug ("Recorder.vala:790: 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 { - g_debug ("Recorder.vala:796: %d timers and %d active recordings left", gee_map_get_size ((GeeMap*) self->priv->timers), gee_collection_get_size ((GeeCollection*) self->priv->active_timers)); - val = TRUE; + if (_inner_error_ != NULL) { + __g_slist_free_g_object_unref0 (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); + g_clear_error (&_inner_error_); + return FALSE; } - _g_slist_free0 (deleteable_items); } - g_static_rec_mutex_unlock (&self->priv->__lock_timers); result = val; __g_slist_free_g_object_unref0 (ended_recordings); return result; @@ -1906,53 +2301,64 @@ static void dvb_recorder_on_eit_structure (DVBRecorder* self, DVBPlayerThread* player, const GstStructure* structure) { guint sid = 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", &sid); - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { + g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - GeeCollection* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _rec_it; - _rec_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values (self->priv->recordings))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - DVBRecording* rec; - gboolean _tmp2_ = FALSE; - if (!gee_iterator_next (_rec_it)) { - break; - } - rec = (DVBRecording*) gee_iterator_get (_rec_it); - if (dvb_recording_get_Name (rec) == NULL) { - _tmp2_ = sid == dvb_recording_get_ChannelSid (rec); - } else { - _tmp2_ = FALSE; - } - if (_tmp2_) { - DVBChannel* chan; - DVBSchedule* sched; - DVBEvent* event; - chan = dvb_channel_list_get_channel (dvb_device_group_get_Channels (self->priv->_DeviceGroup), sid); - sched = _g_object_ref0 (dvb_channel_get_Schedule (chan)); - event = dvb_schedule_get_running_event (sched); - if (event != NULL) { - char* _tmp3_; - g_debug ("Recorder.vala:818: Found running event for active recording"); - dvb_recording_set_Name (rec, event->name); - dvb_recording_set_Description (rec, _tmp3_ = g_strdup_printf ("%s\n%s", event->description, event->extended_description)); - _g_free0 (_tmp3_); - } - _g_object_unref0 (chan); - _g_object_unref0 (sched); - _dvb_event_unref0 (event); + { + GeeCollection* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _rec_it; + _rec_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_values (self->priv->recordings))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + DVBRecording* rec; + gboolean _tmp2_ = FALSE; + if (!gee_iterator_next (_rec_it)) { + break; + } + rec = (DVBRecording*) gee_iterator_get (_rec_it); + if (dvb_recording_get_Name (rec) == NULL) { + _tmp2_ = sid == dvb_recording_get_ChannelSid (rec); + } else { + _tmp2_ = FALSE; + } + if (_tmp2_) { + DVBChannel* chan; + DVBSchedule* sched; + DVBEvent* event; + chan = dvb_channel_list_get_channel (dvb_device_group_get_Channels (self->priv->_DeviceGroup), sid); + sched = _g_object_ref0 (dvb_channel_get_Schedule (chan)); + event = dvb_schedule_get_running_event (sched); + if (event != NULL) { + char* _tmp3_; + g_debug ("Recorder.vala:830: Found running event for active recording"); + dvb_recording_set_Name (rec, event->name); + dvb_recording_set_Description (rec, _tmp3_ = g_strdup_printf ("%s\n%s", event->description, event->extended_description)); + _g_free0 (_tmp3_); + } + _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); + } + __finally123: + { + 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_); + return; } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } @@ -2010,6 +2416,25 @@ } +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_) { } @@ -2130,17 +2555,23 @@ } +/** + * This class is responsible for managing upcoming recordings and + * already recorded items for a single group of devices + */ GType dvb_recorder_get_type (void) { - static GType dvb_recorder_type_id = 0; - if (dvb_recorder_type_id == 0) { + static volatile gsize dvb_recorder_type_id__volatile = 0; + if (g_once_init_enter (&dvb_recorder_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBRecorderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_recorder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBRecorder), 0, (GInstanceInitFunc) dvb_recorder_instance_init, NULL }; static const GInterfaceInfo dvb_id_bus_recorder_info = { (GInterfaceInitFunc) dvb_recorder_dvb_id_bus_recorder_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; static const GInterfaceInfo gee_iterable_info = { (GInterfaceInitFunc) dvb_recorder_gee_iterable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_recorder_type_id; dvb_recorder_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBRecorder", &g_define_type_info, 0); g_type_add_interface_static (dvb_recorder_type_id, DVB_TYPE_ID_BUS_RECORDER, &dvb_id_bus_recorder_info); g_type_add_interface_static (dvb_recorder_type_id, GEE_TYPE_ITERABLE, &gee_iterable_info); + g_once_init_leave (&dvb_recorder_type_id__volatile, dvb_recorder_type_id); } - return dvb_recorder_type_id; + return dvb_recorder_type_id__volatile; } @@ -2178,24 +2609,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/Recorder.vala gnome-dvb-daemon-0.1.21/src/Recorder.vala --- gnome-dvb-daemon-0.1.16/src/Recorder.vala 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Recorder.vala 2010-08-09 13:35:27.000000000 +0000 @@ -45,7 +45,8 @@ // Maps timer id to Recording private Map recordings; - private static const int CHECK_TIMERS_INTERVAL = 5; + private const int CHECK_TIMERS_INTERVAL = 5; + private const string ATTRIBUTES = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_WRITE; construct { this.active_timers = new HashSet (); @@ -167,8 +168,12 @@ if (!has_conflict) { this.timers.set (new_timer.Id, new_timer); - Factory.get_timers_store ().add_timer_to_device_group (new_timer, - this.DeviceGroup); + try { + Factory.get_timers_store ().add_timer_to_device_group (new_timer, + this.DeviceGroup); + } catch (SqlError e) { + critical ("%s", e.message); + } this.changed (new_timer.Id, ChangeType.ADDED); if (this.timers.size == 1 && !this.have_check_timers_timeout) { @@ -196,7 +201,7 @@ */ public bool AddTimerForEPGEvent (uint event_id, uint channel_sid, out uint32 timer_id) throws DBus.Error { - weak EPGStore epgstore = Factory.get_epg_store (); + EPGStore epgstore = Factory.get_epg_store (); Event? event = null; try { event = epgstore.get_event (event_id, channel_sid, this.DeviceGroup.Id); @@ -224,17 +229,25 @@ * active timer recording is aborted. */ public bool DeleteTimer (uint32 timer_id) throws DBus.Error { + return this.delete_timer (timer_id); + } + + protected bool delete_timer (uint32 timer_id) { bool val; lock (this.timers) { - if (this.timers.contains (timer_id)) { - if (this.IsTimerActive (timer_id)) { + if (this.timers.has_key (timer_id)) { + if (this.is_timer_active (timer_id)) { // Abort recording Timer timer = this.timers.get (timer_id); this.stop_recording (timer); } - this.timers.remove (timer_id); - Factory.get_timers_store ().remove_timer_from_device_group ( - timer_id, this.DeviceGroup); + this.timers.unset (timer_id); + try { + Factory.get_timers_store ().remove_timer_from_device_group ( + timer_id, this.DeviceGroup); + } catch (SqlError e) { + critical ("%s", e.message); + } this.changed (timer_id, ChangeType.DELETED); val = true; } else { @@ -274,7 +287,7 @@ { bool ret; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { start_time = this.timers.get(timer_id).get_start_time (); ret = true; } else { @@ -301,7 +314,7 @@ { bool ret = false; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { if (this.IsTimerActive (timer_id)) { warning ("Cannot change start time of already active timer"); } else { @@ -330,7 +343,7 @@ { bool ret; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { end_time = this.timers.get(timer_id).get_end_time (); ret = true; } else { @@ -352,7 +365,7 @@ { bool ret = false; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { duration = this.timers.get(timer_id).Duration; ret = true; } @@ -370,7 +383,7 @@ { bool ret; lock (this.timers) { - ret = this.timers.contains (timer_id); + ret = this.timers.has_key (timer_id); if (ret) { Timer timer = this.timers.get (timer_id); timer.Duration = duration; @@ -394,7 +407,7 @@ { bool ret; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { Timer t = this.timers.get (timer_id); name = t.Channel.Name; ret = true; @@ -418,7 +431,7 @@ { bool ret = false; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { Timer t = this.timers.get (timer_id); Event? event = t.Channel.Schedule.get_event (t.EventID); title = (event == null) ? "" : event.name; @@ -435,7 +448,7 @@ info = TimerInfo (); bool ret; lock (this.timers) { - if (this.timers.contains (timer_id)) { + if (this.timers.has_key (timer_id)) { Timer t = this.timers.get (timer_id); info.id = timer_id; @@ -484,6 +497,10 @@ * @returns: TRUE if timer is currently active */ public bool IsTimerActive (uint32 timer_id) throws DBus.Error { + return this.is_timer_active (timer_id); + } + + protected bool is_timer_active (uint32 timer_id) { return this.active_timers.contains (timer_id); } @@ -516,7 +533,7 @@ public OverlapType HasTimerForEvent (uint event_id, uint channel_sid) throws DBus.Error { - weak EPGStore epgstore = Factory.get_epg_store (); + EPGStore epgstore = Factory.get_epg_store (); Event? event = null; try { event = epgstore.get_event (event_id, channel_sid, @@ -612,10 +629,10 @@ Gst.State.PLAYING); if (ret == Gst.StateChangeReturn.FAILURE) { critical ("Failed setting pipeline to playing"); - this.stop_recording (timer); + channel_factory.stop_channel (channel, filesink); return; } - player.eit_structure += this.on_eit_structure; + player.eit_structure.connect (this.on_eit_structure); Recording recording = new Recording (); recording.Id = timer.Id; @@ -644,7 +661,7 @@ this.recordings.set (recording.Id, recording); } - RecordingsStore.get_instance().add (recording, false); + RecordingsStore.get_instance().add (recording); } this.active_timers.add (timer.Id); @@ -665,23 +682,20 @@ debug ("Recording of channel %s stopped after %" + int64.FORMAT +" seconds", rec.ChannelName, rec.Length); - - try { - rec.save_to_disk (); - } catch (Error e) { - critical ("Could not save recording: %s", e.message); - } + + rec.save_to_disk (); + ChannelFactory channel_factory = this.DeviceGroup.channel_factory; channel_factory.stop_channel (timer.Channel, timer.sink); - this.recordings.remove (timer.Id); + this.recordings.unset (timer.Id); } uint32 timer_id = timer.Id; lock (this.timers) { this.active_timers.remove (timer_id); - this.timers.remove (timer_id); + this.timers.unset (timer_id); } - RecordingsStore.get_instance().monitor_recording (rec); + rec.monitor_recording (); this.changed (timer_id, ChangeType.DELETED); @@ -705,17 +719,15 @@ try { Utils.mkdirs (dir); } catch (Error e) { - error ("Could not create directory %s: %s", + critical ("Could not create directory %s: %s", dir.get_path (), e.message); return null; } } - - string attributes = "%s,%s".printf (FILE_ATTRIBUTE_STANDARD_TYPE, - FILE_ATTRIBUTE_ACCESS_CAN_WRITE); + FileInfo info; try { - info = dir.query_info (attributes, 0, null); + info = dir.query_info (ATTRIBUTES, 0, null); } catch (Error e) { critical ("Could not retrieve attributes: %s", e.message); return null; @@ -782,7 +794,7 @@ // Delete items from this.timers using this.DeleteTimer for (int i=0; i #include #include -#include #define DVB_TYPE_RECORDING (dvb_recording_get_type ()) @@ -41,6 +40,27 @@ typedef struct _DVBRecordingPrivate DVBRecordingPrivate; #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))) + +#define DVB_IO_TYPE_RECORDING_WRITER (dvb_io_recording_writer_get_type ()) +#define DVB_IO_RECORDING_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriter)) +#define DVB_IO_RECORDING_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriterClass)) +#define DVB_IO_IS_RECORDING_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_RECORDING_WRITER)) +#define DVB_IO_IS_RECORDING_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_RECORDING_WRITER)) +#define DVB_IO_RECORDING_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_RECORDING_WRITER, DVBioRecordingWriterClass)) + +typedef struct _DVBioRecordingWriter DVBioRecordingWriter; +typedef struct _DVBioRecordingWriterClass DVBioRecordingWriterClass; + +#define DVB_TYPE_RECORDINGS_STORE (dvb_recordings_store_get_type ()) +#define DVB_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStore)) +#define DVB_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) +#define DVB_IS_RECORDINGS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_IS_RECORDINGS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_RECORDINGS_STORE)) +#define DVB_RECORDINGS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStoreClass)) + +typedef struct _DVBRecordingsStore DVBRecordingsStore; +typedef struct _DVBRecordingsStoreClass DVBRecordingsStoreClass; struct _DVBRecording { GObject parent_instance; @@ -66,7 +86,7 @@ static gpointer dvb_recording_parent_class = NULL; -GType dvb_recording_get_type (void); +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)) enum { DVB_RECORDING_DUMMY_PROPERTY, @@ -79,44 +99,46 @@ DVB_RECORDING_LENGTH, DVB_RECORDING_FILE_MONITOR }; -void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result); 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); GFile* dvb_recording_get_Location (DVBRecording* self); -char* dvb_recording_serialize (DVBRecording* self); -void dvb_recording_save_to_disk (DVBRecording* self, GError** error); -const char* dvb_recording_get_Name (DVBRecording* self); -const char* dvb_recording_get_Description (DVBRecording* self); -guint32 dvb_recording_get_Id (DVBRecording* self); -const char* dvb_recording_get_ChannelName (DVBRecording* self); -gint64 dvb_recording_get_Length (DVBRecording* self); -char* dvb_utils_read_file_contents (GFile* file, GError** error); +void dvb_recording_set_file_monitor (DVBRecording* self, GFileMonitor* value); +GFileMonitor* dvb_recording_get_file_monitor (DVBRecording* self); +static void dvb_recording_on_recording_file_changed (DVBRecording* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event); +static void _dvb_recording_on_recording_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self); +void dvb_recording_save_to_disk (DVBRecording* self); +DVBioRecordingWriter* dvb_io_recording_writer_new (DVBRecording* rec); +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); +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); DVBRecording* dvb_recording_new (void); DVBRecording* dvb_recording_construct (GType object_type); +guint32 dvb_recording_get_Id (DVBRecording* self); void dvb_recording_set_Id (DVBRecording* self, guint32 value); +guint dvb_recording_get_ChannelSid (DVBRecording* self); +void dvb_recording_set_ChannelSid (DVBRecording* self, guint value); +const char* dvb_recording_get_ChannelName (DVBRecording* self); void dvb_recording_set_ChannelName (DVBRecording* self, const char* value); void dvb_recording_set_Location (DVBRecording* self, GFile* value); -void dvb_utils_create_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); -void dvb_recording_set_StartTime (DVBRecording* self, struct tm* value); -void dvb_recording_set_Length (DVBRecording* self, gint64 value); +const char* dvb_recording_get_Name (DVBRecording* self); void dvb_recording_set_Name (DVBRecording* self, const char* value); +const char* dvb_recording_get_Description (DVBRecording* self); void dvb_recording_set_Description (DVBRecording* self, const char* value); -DVBRecording* dvb_recording_deserialize (GFile* file, GError** error); -guint dvb_recording_get_ChannelSid (DVBRecording* self); -void dvb_recording_set_ChannelSid (DVBRecording* self, guint value); -GFileMonitor* dvb_recording_get_file_monitor (DVBRecording* self); -void dvb_recording_set_file_monitor (DVBRecording* self, GFileMonitor* value); +void dvb_recording_set_StartTime (DVBRecording* self, struct tm* value); +gint64 dvb_recording_get_Length (DVBRecording* self); +void dvb_recording_set_Length (DVBRecording* self, gint64 value); static void dvb_recording_finalize (GObject* obj); static void dvb_recording_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_recording_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 gint _vala_array_length (gpointer array); -static int _vala_strcmp0 (const char * str1, const char * str2); guint* dvb_recording_get_start (DVBRecording* self, int* result_length1) { - guint* result; + guint* result = NULL; guint* _tmp0_ = NULL; guint* _tmp1_; g_return_val_if_fail (self != NULL, NULL); @@ -125,225 +147,90 @@ } -void dvb_recording_save_to_disk (DVBRecording* self, GError** error) { - GError * _inner_error_; - GFile* parentdir; - GFile* recfile; - char* _tmp0_; - GFileOutputStream* stream; - char* text; +static void _dvb_recording_on_recording_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) { + dvb_recording_on_recording_file_changed (self, _sender, file, other_file, event_type); +} + + +void dvb_recording_monitor_recording (DVBRecording* self) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _inner_error_ = NULL; - parentdir = g_file_get_parent (self->priv->_Location); - recfile = g_file_get_child (parentdir, "info.rec"); - g_debug ("Recording.vala:58: Saving recording to %s", _tmp0_ = g_file_get_path (recfile)); - _g_free0 (_tmp0_); - if (g_file_query_exists (recfile, NULL)) { - g_debug ("Recording.vala:61: Deleting old info.rec"); - g_file_delete (recfile, NULL, &_inner_error_); + { + GFileMonitor* _tmp0_; + GFileMonitor* _tmp1_; + _tmp0_ = g_file_monitor_file (self->priv->_Location, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (parentdir); - _g_object_unref0 (recfile); - return; + goto __catch124_g_error; + } + dvb_recording_set_file_monitor (self, _tmp1_ = _tmp0_); + _g_object_unref0 (_tmp1_); + g_signal_connect_object (self->priv->_file_monitor, "changed", (GCallback) _dvb_recording_on_recording_file_changed_g_file_monitor_changed, self, 0); + } + goto __finally124; + __catch124_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_warning ("Recording.vala:54: Could not create FileMonitor: %s", e->message); + _g_error_free0 (e); } } - stream = g_file_create (recfile, 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (parentdir); - _g_object_unref0 (recfile); - return; - } - text = dvb_recording_serialize (self); - g_output_stream_write ((GOutputStream*) stream, text, strlen (text), NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (parentdir); - _g_object_unref0 (recfile); - _g_object_unref0 (stream); - _g_free0 (text); - return; - } - g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); + __finally124: if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (parentdir); - _g_object_unref0 (recfile); - _g_object_unref0 (stream); - _g_free0 (text); + 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_object_unref0 (parentdir); - _g_object_unref0 (recfile); - _g_object_unref0 (stream); - _g_free0 (text); } -char* dvb_recording_serialize (DVBRecording* self) { - char* result; - guint* _tmp1_; - gint started_size; - gint started_length1; - gint _tmp0_; - guint* started; - const char* _tmp2_; - const char* _tmp3_; - char* _tmp4_; - char* _tmp5_; - g_return_val_if_fail (self != NULL, NULL); - started = (_tmp1_ = dvb_recording_get_start (self, &_tmp0_), started_length1 = _tmp0_, started_size = started_length1, _tmp1_); - _tmp2_ = NULL; - if (self->priv->_Name == NULL) { - _tmp2_ = ""; - } else { - _tmp2_ = self->priv->_Name; +void dvb_recording_save_to_disk (DVBRecording* self) { + DVBioRecordingWriter* writer; + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + writer = dvb_io_recording_writer_new (self); + { + dvb_io_recording_writer_write (writer, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch125_g_error; + } } - _tmp3_ = NULL; - if (self->priv->_Description == NULL) { - _tmp3_ = ""; - } else { - _tmp3_ = self->priv->_Description; + goto __finally125; + __catch125_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Recording.vala:63: Could not save recording: %s", e->message); + _g_error_free0 (e); + } } - result = (_tmp5_ = g_strdup_printf ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%" G_GINT64_FORMAT "\n%s\n%s", self->priv->_Id, self->priv->_ChannelName, _tmp4_ = g_file_get_path (self->priv->_Location), started[0], started[1], started[2], started[3], started[4], self->priv->_Length, _tmp2_, _tmp3_), _g_free0 (_tmp4_), _tmp5_); - started = (g_free (started), NULL); - return result; - started = (g_free (started), NULL); + __finally125: + 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); + g_clear_error (&_inner_error_); + return; + } + _g_object_unref0 (writer); } -DVBRecording* dvb_recording_deserialize (GFile* file, GError** error) { - DVBRecording* result; - GError * _inner_error_; - char* contents; - char** _tmp1_; - gint fields_size; - gint fields_length1; - char** _tmp0_; - char** fields; - DVBRecording* rec; - char* field; - gint i; - g_return_val_if_fail (file != NULL, NULL); - _inner_error_ = NULL; - contents = dvb_utils_read_file_contents (file, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - return NULL; - } - if (contents == NULL) { - result = NULL; - _g_free0 (contents); - return result; - } - fields = (_tmp1_ = _tmp0_ = g_strsplit (contents, "\n", 7), fields_length1 = _vala_array_length (_tmp0_), fields_size = fields_length1, _tmp1_); - rec = dvb_recording_new (); - field = NULL; - i = 0; - while (TRUE) { - char* _tmp2_; - if (!((field = (_tmp2_ = g_strdup (fields[i]), _g_free0 (field), _tmp2_)) != NULL)) { - break; - } - switch (i) { - case 0: - { - dvb_recording_set_Id (rec, (guint32) atoi (field)); - break; - } - case 1: - { - dvb_recording_set_ChannelName (rec, field); - break; - } - case 2: - { - if (_vala_strcmp0 (field, "") == 0) { - dvb_recording_set_Location (rec, NULL); - } else { - GFile* _tmp3_; - dvb_recording_set_Location (rec, _tmp3_ = g_file_new_for_path (field)); - _g_object_unref0 (_tmp3_); - } - break; - } - case 3: - { - { - gint year; - gint month; - gint day; - gint hour; - gint minute; - gboolean _tmp4_ = FALSE; - gboolean _tmp5_ = FALSE; - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; - year = 0; - month = 0; - day = 0; - hour = 0; - minute = 0; - sscanf (field, "%d-%d-%d %d:%d", &year, &month, &day, &hour, &minute); - if (year >= 1900) { - _tmp7_ = month >= 1; - } else { - _tmp7_ = FALSE; - } - if (_tmp7_) { - _tmp6_ = day >= 1; - } else { - _tmp6_ = FALSE; - } - if (_tmp6_) { - _tmp5_ = hour >= 0; - } else { - _tmp5_ = FALSE; - } - if (_tmp5_) { - _tmp4_ = minute >= 0; - } else { - _tmp4_ = FALSE; - } - if (_tmp4_) { - struct tm _tmp8_ = {0}; - struct tm _tmp9_; - dvb_recording_set_StartTime (rec, (_tmp9_ = (dvb_utils_create_time (year, month, day, hour, minute, 0, &_tmp8_), _tmp8_), &_tmp9_)); - } - break; - } - } - case 4: - { - dvb_recording_set_Length (rec, (gint64) atoi (field)); - break; - } - case 5: - { - const char* _tmp10_; - _tmp10_ = NULL; - if (_vala_strcmp0 (field, "") == 0) { - _tmp10_ = NULL; - } else { - _tmp10_ = field; - } - dvb_recording_set_Name (rec, _tmp10_); - break; - } - default: - { - dvb_recording_set_Description (rec, field); - break; - } - } - i++; +static void dvb_recording_on_recording_file_changed (DVBRecording* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event) { + 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) { + char* location; + location = g_file_get_path (file); + g_debug ("Recording.vala:71: %s has been deleted", location); + g_file_monitor_cancel (monitor); + dvb_recordings_store_remove (dvb_recordings_store_get_instance (), self); + _g_free0 (location); } - result = rec; - _g_free0 (contents); - fields = (_vala_array_free (fields, fields_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (field); - return result; } @@ -536,13 +423,18 @@ } +/** + * This class represents a finished recording + */ GType dvb_recording_get_type (void) { - static GType dvb_recording_type_id = 0; - if (dvb_recording_type_id == 0) { + static volatile gsize dvb_recording_type_id__volatile = 0; + if (g_once_init_enter (&dvb_recording_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBRecordingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_recording_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBRecording), 0, (GInstanceInitFunc) dvb_recording_instance_init, NULL }; + GType dvb_recording_type_id; dvb_recording_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBRecording", &g_define_type_info, 0); + g_once_init_leave (&dvb_recording_type_id__volatile, dvb_recording_type_id); } - return dvb_recording_type_id; + return dvb_recording_type_id__volatile; } @@ -616,46 +508,5 @@ } -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); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - -static int _vala_strcmp0 (const char * str1, const char * str2) { - if (str1 == NULL) { - return -(str1 != str2); - } - if (str2 == NULL) { - return str1 != str2; - } - return strcmp (str1, str2); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/RecordingsStore.c gnome-dvb-daemon-0.1.21/src/RecordingsStore.c --- gnome-dvb-daemon-0.1.16/src/RecordingsStore.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/RecordingsStore.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* RecordingsStore.c generated by valac, the Vala compiler +/* RecordingsStore.c generated by valac 0.9.7, the Vala compiler * generated from RecordingsStore.vala, do not modify */ /* @@ -66,8 +66,18 @@ #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_CHANGE_TYPE (dvb_change_type_get_type ()) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (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))) + +#define DVB_IO_TYPE_RECORDING_READER (dvb_io_recording_reader_get_type ()) +#define DVB_IO_RECORDING_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReader)) +#define DVB_IO_RECORDING_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReaderClass)) +#define DVB_IO_IS_RECORDING_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_RECORDING_READER)) +#define DVB_IO_IS_RECORDING_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_RECORDING_READER)) +#define DVB_IO_RECORDING_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_RECORDING_READER, DVBioRecordingReaderClass)) + +typedef struct _DVBioRecordingReader DVBioRecordingReader; +typedef struct _DVBioRecordingReaderClass DVBioRecordingReaderClass; typedef struct _DBusObjectVTable _DBusObjectVTable; struct _DVBRecordingInfo { @@ -107,7 +117,6 @@ GeeHashMap* recordings; GStaticRecMutex __lock_recordings; guint32 last_id; - GStaticRecMutex __lock_last_id; }; typedef enum { @@ -128,68 +137,69 @@ static gpointer dvb_recordings_store_parent_class = NULL; static DVBIDBusRecordingsStoreIface* dvb_recordings_store_dvb_id_bus_recordings_store_parent_iface = NULL; -GType dvb_recording_info_get_type (void); +DVBIDBusRecordingsStore* dvb_id_bus_recordings_store_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); -GType dvb_recordings_store_get_type (void); -GType dvb_recording_get_type (void); +GType dvb_id_bus_recordings_store_get_type (void) G_GNUC_CONST; +GType dvb_recordings_store_get_type (void) G_GNUC_CONST; +GType dvb_recording_get_type (void) G_GNUC_CONST; #define DVB_RECORDINGS_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_RECORDINGS_STORE, DVBRecordingsStorePrivate)) enum { DVB_RECORDINGS_STORE_DUMMY_PROPERTY }; +DVBRecordingsStore* dvb_recordings_store_get_instance (void); DVBRecordingsStore* dvb_recordings_store_new (void); DVBRecordingsStore* dvb_recordings_store_construct (GType object_type); -DVBRecordingsStore* dvb_recordings_store_get_instance (void); void dvb_recordings_store_shutdown (void); 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_recordings_store_monitor_recording (DVBRecordingsStore* self, DVBRecording* rec); -GType dvb_change_type_get_type (void); -gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec, gboolean monitor); -GFile* dvb_recording_get_Location (DVBRecording* self); -static void dvb_recordings_store_on_recording_file_changed (DVBRecordingsStore* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event); -static void _dvb_recordings_store_on_recording_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self); -void dvb_recording_set_file_monitor (DVBRecording* self, GFileMonitor* value); +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); +void dvb_recordings_store_remove (DVBRecordingsStore* self, DVBRecording* rec); guint32 dvb_recordings_store_get_next_id (DVBRecordingsStore* self); static guint32* dvb_recordings_store_real_GetRecordings (DVBIDBusRecordingsStore* base, int* result_length1, GError** error); static gboolean dvb_recordings_store_real_GetLocation (DVBIDBusRecordingsStore* base, guint32 rec_id, char** location, GError** error); -const char* dvb_recording_get_Name (DVBRecording* self); +GFile* dvb_recording_get_Location (DVBRecording* self); static gboolean dvb_recordings_store_real_GetName (DVBIDBusRecordingsStore* base, guint32 rec_id, char** name, GError** error); -const char* dvb_recording_get_Description (DVBRecording* self); +const char* dvb_recording_get_Name (DVBRecording* self); static gboolean dvb_recordings_store_real_GetDescription (DVBIDBusRecordingsStore* base, guint32 rec_id, char** description, GError** error); -guint* dvb_recording_get_start (DVBRecording* self, int* result_length1); +const char* dvb_recording_get_Description (DVBRecording* self); static gboolean dvb_recordings_store_real_GetStartTime (DVBIDBusRecordingsStore* base, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error); -void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result); +guint* dvb_recording_get_start (DVBRecording* self, int* result_length1); static gboolean dvb_recordings_store_real_GetStartTimestamp (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* timestamp, GError** error); -gint64 dvb_recording_get_Length (DVBRecording* self); +void dvb_recording_get_StartTime (DVBRecording* self, struct tm* result); static gboolean dvb_recordings_store_real_GetLength (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* length, GError** error); -void dvb_utils_delete_dir_recursively (GFile* dir, GError** error); +gint64 dvb_recording_get_Length (DVBRecording* self); static gboolean dvb_recordings_store_real_Delete (DVBIDBusRecordingsStore* base, guint32 rec_id, GError** error); -const char* dvb_recording_get_ChannelName (DVBRecording* self); +void dvb_utils_delete_dir_recursively (GFile* dir, GError** error); static gboolean dvb_recordings_store_real_GetChannelName (DVBIDBusRecordingsStore* base, guint32 rec_id, char** name, GError** error); +const char* dvb_recording_get_ChannelName (DVBRecording* self); static gboolean dvb_recordings_store_real_GetAllInformations (DVBIDBusRecordingsStore* base, guint32 rec_id, DVBRecordingInfo* info, GError** error); void dvb_recordings_store_restore_from_dir (DVBRecordingsStore* self, GFile* recordingsbasedir); -DVBRecording* dvb_recording_deserialize (GFile* file, GError** error); -static gboolean dvb_recordings_store_delete_recording_by_location (DVBRecordingsStore* self, const char* location); +DVBioRecordingReader* dvb_io_recording_reader_new (GFile* recordingsbasedir, DVBRecordingsStore* recstore); +DVBioRecordingReader* dvb_io_recording_reader_construct (GType object_type, GFile* recordingsbasedir, DVBRecordingsStore* recstore); +GType dvb_io_recording_reader_get_type (void) G_GNUC_CONST; +gboolean dvb_io_recording_reader_load_into (DVBioRecordingReader* self); static GObject * dvb_recordings_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); static void dvb_recordings_store_finalize (GObject* obj); -static int _vala_strcmp0 (const char * str1, const char * str2); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; DVBRecordingsStore* dvb_recordings_store_get_instance (void) { - DVBRecordingsStore* result; + DVBRecordingsStore* result = NULL; g_static_rec_mutex_lock (&dvb_recordings_store_instance_mutex); if (dvb_recordings_store_instance == NULL) { DVBRecordingsStore* _tmp0_; @@ -221,156 +231,218 @@ void dvb_recordings_store_update_last_id (DVBRecordingsStore* self, guint32 new_last_id) { + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_static_rec_mutex_lock (&self->priv->__lock_last_id); { - if (new_last_id > self->priv->last_id) { - self->priv->last_id = new_last_id; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (new_last_id > self->priv->last_id) { + self->priv->last_id = new_last_id; + } + } + __finally126: + { + 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_); + return; } } - g_static_rec_mutex_unlock (&self->priv->__lock_last_id); } -gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec, gboolean monitor) { - gboolean result; +gboolean dvb_recordings_store_add (DVBRecordingsStore* self, DVBRecording* rec) { + gboolean result = FALSE; guint32 id; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (rec != NULL, FALSE); id = dvb_recording_get_Id (rec); - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (id))) { - g_critical ("RecordingsStore.vala:70: Recording with id %u already available", (guint) id); - result = FALSE; - return result; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (id))) { + 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; + } + if (dvb_recording_get_Id (rec) > self->priv->last_id) { + self->priv->last_id = dvb_recording_get_Id (rec); + } + 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); } - if (monitor) { - dvb_recordings_store_monitor_recording (self, rec); + __finally127: + { + 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_); + return FALSE; } - 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); } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = TRUE; return result; } -static void _dvb_recordings_store_on_recording_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) { - dvb_recordings_store_on_recording_file_changed (self, _sender, file, other_file, event_type); +gboolean dvb_recordings_store_add_and_monitor (DVBRecordingsStore* self, DVBRecording* rec) { + gboolean result = FALSE; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (rec != NULL, FALSE); + if (dvb_recordings_store_add (self, rec)) { + dvb_recording_monitor_recording (rec); + result = TRUE; + return result; + } + result = FALSE; + return result; } -void dvb_recordings_store_monitor_recording (DVBRecordingsStore* self, DVBRecording* rec) { - GError * _inner_error_; +void dvb_recordings_store_remove (DVBRecordingsStore* self, DVBRecording* rec) { + guint32 rec_id; g_return_if_fail (self != NULL); g_return_if_fail (rec != NULL); - _inner_error_ = NULL; - { - GFileMonitor* monitor; - monitor = g_file_monitor_file (dvb_recording_get_Location (rec), 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch40_g_error; - } - g_signal_connect_object (monitor, "changed", (GCallback) _dvb_recordings_store_on_recording_file_changed_g_file_monitor_changed, self, 0); - dvb_recording_set_file_monitor (rec, monitor); - _g_object_unref0 (monitor); - } - goto __finally40; - __catch40_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_warning ("RecordingsStore.vala:91: Could not create FileMonitor: %s", e->message); - _g_error_free0 (e); - } - } - __finally40: - 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; - } + rec_id = dvb_recording_get_Id (rec); + gee_abstract_map_unset ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id), NULL); + g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", rec_id, (guint) DVB_CHANGE_TYPE_DELETED); } guint32 dvb_recordings_store_get_next_id (DVBRecordingsStore* self) { - guint32 result; + guint32 result = 0U; guint32 val = 0U; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0U); - g_static_rec_mutex_lock (&self->priv->__lock_last_id); { - val = self->priv->last_id = self->priv->last_id + 1; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + val = self->priv->last_id = self->priv->last_id + 1; + } + __finally128: + { + 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_); + return 0U; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_last_id); result = val; return result; } +/** + * @returns: A list of ids for all recordings + */ static guint32* dvb_recordings_store_real_GetRecordings (DVBIDBusRecordingsStore* base, int* result_length1, GError** error) { DVBRecordingsStore * self; - guint32* result; - gint ids_size; + guint32* result = NULL; gint ids_length1; + gint _ids_size_; guint32* ids; guint32* _tmp4_; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ids = (ids_length1 = 0, NULL); - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - guint32* _tmp1_; - gint _tmp0_; - gint i; - ids = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->recordings)), ids = (g_free (ids), NULL), ids_length1 = _tmp0_, ids_size = ids_length1, _tmp1_); - i = 0; - { - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _key_it; - _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->recordings))), _g_object_unref0 (_tmp2_), _tmp3_); - while (TRUE) { - guint32 key; - if (!gee_iterator_next (_key_it)) { - break; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + gint _tmp0_; + guint32* _tmp1_; + gint i; + ids = (_tmp1_ = g_new0 (guint32, _tmp0_ = gee_map_get_size ((GeeMap*) self->priv->recordings)), ids = (g_free (ids), NULL), ids_length1 = _tmp0_, _ids_size_ = ids_length1, _tmp1_); + i = 0; + { + GeeSet* _tmp2_; + GeeIterator* _tmp3_; + GeeIterator* _key_it; + _key_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_keys ((GeeMap*) self->priv->recordings))), _g_object_unref0 (_tmp2_), _tmp3_); + while (TRUE) { + guint32 key; + if (!gee_iterator_next (_key_it)) { + break; + } + key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); + ids[i] = key; + i++; } - key = GPOINTER_TO_UINT (gee_iterator_get (_key_it)); - ids[i] = key; - i++; + _g_object_unref0 (_key_it); + } + } + __finally129: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + ids = (g_free (ids), NULL); + return NULL; + } else { + ids = (g_free (ids), 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_object_unref0 (_key_it); } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = (_tmp4_ = ids, *result_length1 = ids_length1, _tmp4_); return result; ids = (g_free (ids), NULL); } +/** + * @rec_id: The id of the recording + * @location: The location of the recording on the filesystem + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetLocation (DVBIDBusRecordingsStore* base, guint32 rec_id, char** location, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; if (location != NULL) { *location = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - char* _tmp1_; - DVBRecording* _tmp0_; - *location = (_tmp1_ = g_file_get_uri (dvb_recording_get_Location (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_free0 (*location), _tmp1_); - _g_object_unref0 (_tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + char* _tmp1_; + *location = (_tmp1_ = g_file_get_uri (dvb_recording_get_Location (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_free0 (*location), _tmp1_); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } + } + __finally130: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (!ret) { char* _tmp2_; *location = (_tmp2_ = g_strdup (""), _g_free0 (*location), _tmp2_); @@ -380,36 +452,58 @@ } +/** + * @rec_id: The id of the recording + * @name: The name of the recording (e.g. the name of + * a TV show) + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetName (DVBIDBusRecordingsStore* base, guint32 rec_id, char** name, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; if (name != NULL) { *name = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - DVBRecording* _tmp0_; - char* _tmp1_; - char* val; - const char* _tmp2_; - char* _tmp3_; - val = (_tmp1_ = g_strdup (dvb_recording_get_Name (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_object_unref0 (_tmp0_), _tmp1_); - _tmp2_ = NULL; - if (val == NULL) { - _tmp2_ = ""; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + char* _tmp1_; + char* val; + const char* _tmp2_; + char* _tmp3_; + val = (_tmp1_ = g_strdup (dvb_recording_get_Name (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_object_unref0 (_tmp0_), _tmp1_); + _tmp2_ = NULL; + if (val == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = val; + } + *name = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (*name), _tmp3_); + ret = TRUE; + _g_free0 (val); + } + } + __finally131: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; } else { - _tmp2_ = 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); + g_clear_error (&_inner_error_); + return FALSE; } - *name = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (*name), _tmp3_); - ret = TRUE; - _g_free0 (val); } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (!ret) { char* _tmp4_; *name = (_tmp4_ = g_strdup (""), _g_free0 (*name), _tmp4_); @@ -419,36 +513,58 @@ } +/** + * @rec_id: The id of the recording + * @description: A short text describing the recorded item + * (e.g. the description from EPG) + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetDescription (DVBIDBusRecordingsStore* base, guint32 rec_id, char** description, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; if (description != NULL) { *description = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - DVBRecording* _tmp0_; - char* _tmp1_; - char* val; - const char* _tmp2_; - char* _tmp3_; - val = (_tmp1_ = g_strdup (dvb_recording_get_Description (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_object_unref0 (_tmp0_), _tmp1_); - _tmp2_ = NULL; - if (val == NULL) { - _tmp2_ = ""; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + char* _tmp1_; + char* val; + const char* _tmp2_; + char* _tmp3_; + val = (_tmp1_ = g_strdup (dvb_recording_get_Description (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)))), _g_object_unref0 (_tmp0_), _tmp1_); + _tmp2_ = NULL; + if (val == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = val; + } + *description = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (*description), _tmp3_); + ret = TRUE; + _g_free0 (val); + } + } + __finally132: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; } else { - _tmp2_ = 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); + g_clear_error (&_inner_error_); + return FALSE; } - *description = (_tmp3_ = g_strdup (_tmp2_), _g_free0 (*description), _tmp3_); - ret = TRUE; - _g_free0 (val); } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (!ret) { char* _tmp4_; *description = (_tmp4_ = g_strdup (""), _g_free0 (*description), _tmp4_); @@ -458,162 +574,265 @@ } +/** + * @rec_id: The id of the recording + * @start_time: The starting time of the recording + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetStartTime (DVBIDBusRecordingsStore* base, guint32 rec_id, guint** start_time, int* start_time_length1, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; if (start_time != NULL) { *start_time = NULL; } - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - guint* _tmp2_; - gint _tmp1_; - DVBRecording* _tmp0_; - *start_time = (_tmp2_ = dvb_recording_get_start (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)), &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); - _g_object_unref0 (_tmp0_); - ret = TRUE; - } else { - guint* _tmp4_; - guint* _tmp3_ = NULL; - *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); - ret = FALSE; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + gint _tmp1_; + guint* _tmp2_; + *start_time = (_tmp2_ = dvb_recording_get_start (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)), &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } else { + guint* _tmp3_ = NULL; + guint* _tmp4_; + *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); + ret = FALSE; + } + } + __finally133: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = ret; return result; } +/** + * @rec_id: The id of the recording + * @timestamp: Start time as UNIX timestamp + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetStartTimestamp (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* timestamp, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - struct tm _tmp2_; - DVBRecording* _tmp0_; - struct tm _tmp1_ = {0}; - *timestamp = (gint64) mktime ((_tmp2_ = (dvb_recording_get_StartTime (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)), &_tmp1_), _tmp1_), &_tmp2_)); - _g_object_unref0 (_tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + struct tm _tmp1_ = {0}; + struct tm _tmp2_; + *timestamp = (gint64) mktime ((_tmp2_ = (dvb_recording_get_StartTime (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)), &_tmp1_), _tmp1_), &_tmp2_)); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } + } + __finally134: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = ret; return result; } +/** + * @rec_id: The id of the recording + * @length: The length of the recording in seconds + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetLength (DVBIDBusRecordingsStore* base, guint32 rec_id, gint64* length, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - DVBRecording* _tmp0_; - *length = dvb_recording_get_Length (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))); - _g_object_unref0 (_tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* _tmp0_; + *length = dvb_recording_get_Length (_tmp0_ = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))); + _g_object_unref0 (_tmp0_); + ret = TRUE; + } + } + __finally135: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = ret; return result; } +/** + * @rec_id: The id of the recording + * @returns: TRUE on success, FALSE otherwises + * + * Delete the recording. This deletes all files in the directory + * created by the Recorder + */ static gboolean dvb_recordings_store_real_Delete (DVBIDBusRecordingsStore* base, guint32 rec_id, GError** error) { DVBRecordingsStore * self; - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean val; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; - _inner_error_ = NULL; val = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (!gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - val = FALSE; - } else { - DVBRecording* rec; - g_debug ("RecordingsStore.vala:242: Deleting recording %u", (guint) rec_id); - rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - { - GFile* _tmp0_; - dvb_utils_delete_dir_recursively (_tmp0_ = g_file_get_parent (dvb_recording_get_Location (rec)), &_inner_error_); - _g_object_unref0 (_tmp0_); - if (_inner_error_ != NULL) { - goto __catch41_g_error; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (!gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + val = FALSE; + } else { + DVBRecording* rec; + g_debug ("RecordingsStore.vala:245: Deleting recording %u", (guint) rec_id); + rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); + { + GFile* _tmp0_; + dvb_utils_delete_dir_recursively (_tmp0_ = g_file_get_parent (dvb_recording_get_Location (rec)), &_inner_error_); + _g_object_unref0 (_tmp0_); + if (_inner_error_ != NULL) { + goto __catch137_g_error; + } + val = TRUE; } - gee_map_remove ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id), NULL); - val = TRUE; - } - goto __finally41; - __catch41_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; + goto __finally137; + __catch137_g_error: { - g_critical ("RecordingsStore.vala:249: Could not delete recording: %s", e->message); - val = FALSE; - _g_error_free0 (e); + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("RecordingsStore.vala:251: Could not delete recording: %s", e->message); + val = FALSE; + _g_error_free0 (e); + } } - } - __finally41: - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); + __finally137: + if (_inner_error_ != NULL) { _g_object_unref0 (rec); - return FALSE; - } else { _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); + { + 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); + } + } + __finally136: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", rec_id, (guint) DVB_CHANGE_TYPE_DELETED); - _g_object_unref0 (rec); } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); result = val; return result; } +/** + * @rec_id: The id of the recording + * @name: The channel's name or an empty string if + * rec_id doesn't exist + * @returns: TRUE on success + */ static gboolean dvb_recordings_store_real_GetChannelName (DVBIDBusRecordingsStore* base, guint32 rec_id, char** name, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; if (name != NULL) { *name = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - DVBRecording* rec; - char* _tmp0_; - rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - *name = (_tmp0_ = g_strdup (dvb_recording_get_ChannelName (rec)), _g_free0 (*name), _tmp0_); - ret = TRUE; - _g_object_unref0 (rec); + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* rec; + char* _tmp0_; + rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); + *name = (_tmp0_ = g_strdup (dvb_recording_get_ChannelName (rec)), _g_free0 (*name), _tmp0_); + ret = TRUE; + _g_object_unref0 (rec); + } + } + __finally138: + { + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); if (!ret) { char* _tmp1_; *name = (_tmp1_ = g_strdup (""), _g_free0 (*name), _tmp1_); @@ -625,365 +844,99 @@ static gboolean dvb_recordings_store_real_GetAllInformations (DVBIDBusRecordingsStore* base, guint32 rec_id, DVBRecordingInfo* info, GError** error) { DVBRecordingsStore * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; - DVBRecordingInfo _tmp1_; DVBRecordingInfo _tmp0_ = {0}; + DVBRecordingInfo _tmp1_; + GError * _inner_error_ = NULL; self = (DVBRecordingsStore*) base; *info = (_tmp1_ = (memset (&_tmp0_, 0, sizeof (DVBRecordingInfo)), _tmp0_), dvb_recording_info_destroy (info), _tmp1_); - g_static_rec_mutex_lock (&self->priv->__lock_recordings); - { - if (gee_map_contains ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { - DVBRecording* rec; - char* name; - const char* _tmp2_; - char* _tmp3_; - const char* _tmp4_; - char* _tmp5_; - char* _tmp6_; - struct tm _tmp8_; - struct tm _tmp7_ = {0}; - char* _tmp9_; - rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); - name = g_strdup (dvb_recording_get_Name (rec)); - _tmp2_ = NULL; - if (name == NULL) { - _tmp2_ = ""; - } else { - _tmp2_ = name; - } - (*info).name = (_tmp3_ = g_strdup (_tmp2_), _g_free0 ((*info).name), _tmp3_); - (*info).id = rec_id; - (*info).length = dvb_recording_get_Length (rec); - _tmp4_ = NULL; - if (dvb_recording_get_Description (rec) == NULL) { - _tmp4_ = ""; - } else { - _tmp4_ = dvb_recording_get_Description (rec); - } - (*info).description = (_tmp5_ = g_strdup (_tmp4_), _g_free0 ((*info).description), _tmp5_); - (*info).location = (_tmp6_ = g_file_get_path (dvb_recording_get_Location (rec)), _g_free0 ((*info).location), _tmp6_); - (*info).start_timestamp = (gint64) mktime ((_tmp8_ = (dvb_recording_get_StartTime (rec, &_tmp7_), _tmp7_), &_tmp8_)); - (*info).channel = (_tmp9_ = g_strdup (dvb_recording_get_ChannelName (rec)), _g_free0 ((*info).channel), _tmp9_); - ret = TRUE; - _g_object_unref0 (rec); - _g_free0 (name); - } else { - char* _tmp10_; - char* _tmp11_; - char* _tmp12_; - char* _tmp13_; - (*info).name = (_tmp10_ = g_strdup (""), _g_free0 ((*info).name), _tmp10_); - (*info).id = (guint32) 0; - (*info).length = (gint64) 0; - (*info).description = (_tmp11_ = g_strdup (""), _g_free0 ((*info).description), _tmp11_); - (*info).location = (_tmp12_ = g_strdup (""), _g_free0 ((*info).location), _tmp12_); - (*info).start_timestamp = (gint64) 0; - (*info).channel = (_tmp13_ = g_strdup (""), _g_free0 ((*info).channel), _tmp13_); - ret = FALSE; - } - } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - result = ret; - return result; -} - - -void dvb_recordings_store_restore_from_dir (DVBRecordingsStore* self, GFile* recordingsbasedir) { - GError * _inner_error_; - char* attrs; - GFileInfo* info; - GFileEnumerator* files; - g_return_if_fail (self != NULL); - g_return_if_fail (recordingsbasedir != NULL); - _inner_error_ = NULL; - if (!g_file_query_exists (recordingsbasedir, NULL)) { - char* _tmp0_; - g_debug ("RecordingsStore.vala:316: Directory %s does not exist", _tmp0_ = g_file_get_path (recordingsbasedir)); - _g_free0 (_tmp0_); - return; - } - attrs = g_strdup_printf ("%s,%s,%s", G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, G_FILE_ATTRIBUTE_STANDARD_NAME); - info = NULL; { - GFileInfo* _tmp1_; - GFileInfo* _tmp2_; - _tmp1_ = g_file_query_info (recordingsbasedir, attrs, 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch42_g_error; - } - info = (_tmp2_ = _tmp1_, _g_object_unref0 (info), _tmp2_); - } - goto __finally42; - __catch42_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("RecordingsStore.vala:326: Could not retrieve attributes: %s", e->message); - _g_error_free0 (e); - _g_free0 (attrs); - _g_object_unref0 (info); - return; - } - } - __finally42: - if (_inner_error_ != NULL) { - _g_free0 (attrs); - _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; - } - if (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY) { - char* _tmp3_; - g_critical ("RecordingsStore.vala:331: %s is not a directory", _tmp3_ = g_file_get_path (recordingsbasedir)); - _g_free0 (_tmp3_); - _g_free0 (attrs); - _g_object_unref0 (info); - return; - } - if (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) { - char* _tmp4_; - g_critical ("RecordingsStore.vala:336: Cannot read %s", _tmp4_ = g_file_get_path (recordingsbasedir)); - _g_free0 (_tmp4_); - _g_free0 (attrs); - _g_object_unref0 (info); - return; - } - files = NULL; - { - GFileEnumerator* _tmp5_; - GFileEnumerator* _tmp6_; - _tmp5_ = g_file_enumerate_children (recordingsbasedir, attrs, 0, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch43_g_error; - } - files = (_tmp6_ = _tmp5_, _g_object_unref0 (files), _tmp6_); - } - goto __finally43; - __catch43_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("RecordingsStore.vala:345: Could not read directory: %s", e->message); - _g_error_free0 (e); - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (files); - return; - } - } - __finally43: - if (_inner_error_ != NULL) { - _g_free0 (attrs); - _g_object_unref0 (info); - _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; - } - { - GFileInfo* childinfo; - childinfo = NULL; - while (TRUE) { - GFileInfo* _tmp7_; - GFileInfo* _tmp8_; - guint32 type; - GFile* child; - _tmp7_ = g_file_enumerator_next_file (files, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - _g_object_unref0 (childinfo); - goto __catch44_g_error; - } - if (!((childinfo = (_tmp8_ = _tmp7_, _g_object_unref0 (childinfo), _tmp8_)) != NULL)) { - break; - } - type = g_file_info_get_attribute_uint32 (childinfo, G_FILE_ATTRIBUTE_STANDARD_TYPE); - child = g_file_get_child (recordingsbasedir, g_file_info_get_name (childinfo)); - switch (type) { - case G_FILE_TYPE_DIRECTORY: - { - dvb_recordings_store_restore_from_dir (self, child); - break; + g_static_rec_mutex_lock (&self->priv->__lock_recordings); + { + if (gee_abstract_map_has_key ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id))) { + DVBRecording* rec; + char* name; + const char* _tmp2_; + char* _tmp3_; + const char* _tmp4_; + char* _tmp5_; + char* _tmp6_; + struct tm _tmp7_ = {0}; + struct tm _tmp8_; + char* _tmp9_; + rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id)); + name = g_strdup (dvb_recording_get_Name (rec)); + _tmp2_ = NULL; + if (name == NULL) { + _tmp2_ = ""; + } else { + _tmp2_ = name; } - case G_FILE_TYPE_REGULAR: - { - if (_vala_strcmp0 (g_file_info_get_name (childinfo), "info.rec") == 0) { - DVBRecording* rec; - rec = NULL; - { - DVBRecording* _tmp9_; - DVBRecording* _tmp10_; - _tmp9_ = dvb_recording_deserialize (child, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch46_g_error; - } - rec = (_tmp10_ = _tmp9_, _g_object_unref0 (rec), _tmp10_); - } - goto __finally46; - __catch46_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("RecordingsStore.vala:369: Could not deserialize recording: %s", e->message); - _g_error_free0 (e); - } - } - __finally46: - if (_inner_error_ != NULL) { - _g_object_unref0 (rec); - _g_object_unref0 (child); - _g_object_unref0 (childinfo); - goto __catch44_g_error; - } - if (rec != NULL) { - char* _tmp11_; - g_debug ("RecordingsStore.vala:374: Restored recording from %s", _tmp11_ = g_file_get_path (child)); - _g_free0 (_tmp11_); - g_static_rec_mutex_lock (&self->priv->__lock_recordings); - { - dvb_recordings_store_add (self, rec, TRUE); - } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - g_static_rec_mutex_lock (&self->priv->__lock_last_id); - { - if (dvb_recording_get_Id (rec) > self->priv->last_id) { - self->priv->last_id = dvb_recording_get_Id (rec); - } - } - g_static_rec_mutex_unlock (&self->priv->__lock_last_id); - } - _g_object_unref0 (rec); - } - break; + (*info).name = (_tmp3_ = g_strdup (_tmp2_), _g_free0 ((*info).name), _tmp3_); + (*info).id = rec_id; + (*info).length = dvb_recording_get_Length (rec); + _tmp4_ = NULL; + if (dvb_recording_get_Description (rec) == NULL) { + _tmp4_ = ""; + } else { + _tmp4_ = dvb_recording_get_Description (rec); } - } - _g_object_unref0 (child); - } - _g_object_unref0 (childinfo); - } - goto __finally44; - __catch44_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("RecordingsStore.vala:391: %s", e->message); - _g_error_free0 (e); - } - } - __finally44: - { - { - g_file_enumerator_close (files, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch45_g_error; + (*info).description = (_tmp5_ = g_strdup (_tmp4_), _g_free0 ((*info).description), _tmp5_); + (*info).location = (_tmp6_ = g_file_get_path (dvb_recording_get_Location (rec)), _g_free0 ((*info).location), _tmp6_); + (*info).start_timestamp = (gint64) mktime ((_tmp8_ = (dvb_recording_get_StartTime (rec, &_tmp7_), _tmp7_), &_tmp8_)); + (*info).channel = (_tmp9_ = g_strdup (dvb_recording_get_ChannelName (rec)), _g_free0 ((*info).channel), _tmp9_); + ret = TRUE; + _g_free0 (name); + _g_object_unref0 (rec); + } else { + char* _tmp10_; + char* _tmp11_; + char* _tmp12_; + char* _tmp13_; + (*info).name = (_tmp10_ = g_strdup (""), _g_free0 ((*info).name), _tmp10_); + (*info).id = (guint32) 0; + (*info).length = (gint64) 0; + (*info).description = (_tmp11_ = g_strdup (""), _g_free0 ((*info).description), _tmp11_); + (*info).location = (_tmp12_ = g_strdup (""), _g_free0 ((*info).location), _tmp12_); + (*info).start_timestamp = (gint64) 0; + (*info).channel = (_tmp13_ = g_strdup (""), _g_free0 ((*info).channel), _tmp13_); + ret = FALSE; } } - goto __finally45; - __catch45_g_error: + __finally139: { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("RecordingsStore.vala:396: Could not close file: %s", e->message); - _g_error_free0 (e); - } + g_static_rec_mutex_unlock (&self->priv->__lock_recordings); } - __finally45: if (_inner_error_ != NULL) { - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (files); - } - } - if (_inner_error_ != NULL) { - _g_free0 (attrs); - _g_object_unref0 (info); - _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; - } - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (files); -} - - -static gboolean dvb_recordings_store_delete_recording_by_location (DVBRecordingsStore* self, const char* location) { - gboolean result; - gboolean _result_; - guint32 rec_id; - g_return_val_if_fail (self != NULL, FALSE); - g_return_val_if_fail (location != NULL, FALSE); - _result_ = FALSE; - rec_id = (guint32) 0; - g_static_rec_mutex_lock (&self->priv->__lock_recordings); - { - { - GeeSet* _tmp0_; - GeeIterator* _tmp1_; - GeeIterator* _id_it; - _id_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = gee_map_get_keys ((GeeMap*) self->priv->recordings))), _g_object_unref0 (_tmp0_), _tmp1_); - while (TRUE) { - guint32 id; - DVBRecording* rec; - char* _tmp2_; - gboolean _tmp3_; - if (!gee_iterator_next (_id_it)) { - break; - } - id = GPOINTER_TO_UINT (gee_iterator_get (_id_it)); - rec = (DVBRecording*) gee_abstract_map_get ((GeeAbstractMap*) self->priv->recordings, GUINT_TO_POINTER (id)); - if ((_tmp3_ = _vala_strcmp0 (_tmp2_ = g_file_get_path (dvb_recording_get_Location (rec)), location) == 0, _g_free0 (_tmp2_), _tmp3_)) { - rec_id = id; - _g_object_unref0 (rec); - break; - } - _g_object_unref0 (rec); + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - _g_object_unref0 (_id_it); - } - if (rec_id != 0) { - g_debug ("RecordingsStore.vala:420: Deleting recording %u", (guint) rec_id); - gee_map_remove ((GeeMap*) self->priv->recordings, GUINT_TO_POINTER (rec_id), NULL); - g_signal_emit_by_name ((DVBIDBusRecordingsStore*) self, "changed", rec_id, (guint) DVB_CHANGE_TYPE_DELETED); - _result_ = TRUE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_recordings); - result = _result_; + result = ret; return result; } -static void dvb_recordings_store_on_recording_file_changed (DVBRecordingsStore* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event) { +void dvb_recordings_store_restore_from_dir (DVBRecordingsStore* self, GFile* recordingsbasedir) { + DVBioRecordingReader* reader; 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) { - char* location; - location = g_file_get_path (file); - g_debug ("RecordingsStore.vala:434: %s has been deleted", location); - dvb_recordings_store_delete_recording_by_location (self, location); - g_file_monitor_cancel (monitor); - _g_free0 (location); - } + g_return_if_fail (recordingsbasedir != NULL); + reader = dvb_io_recording_reader_new (recordingsbasedir, self); + dvb_io_recording_reader_load_into (reader); + _g_object_unref0 (reader); } DVBRecordingsStore* dvb_recordings_store_construct (GType object_type) { DVBRecordingsStore * self; - self = g_object_newv (object_type, 0, NULL); + self = (DVBRecordingsStore*) g_object_new (object_type, NULL); return self; } @@ -1009,6 +962,25 @@ } +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_) { } @@ -1096,7 +1068,6 @@ static void dvb_recordings_store_instance_init (DVBRecordingsStore * self) { self->priv = DVB_RECORDINGS_STORE_GET_PRIVATE (self); g_static_rec_mutex_init (&self->priv->__lock_recordings); - g_static_rec_mutex_init (&self->priv->__lock_last_id); } @@ -1105,50 +1076,24 @@ self = DVB_RECORDINGS_STORE (obj); g_static_rec_mutex_free (&self->priv->__lock_recordings); _g_object_unref0 (self->priv->recordings); - g_static_rec_mutex_free (&self->priv->__lock_last_id); G_OBJECT_CLASS (dvb_recordings_store_parent_class)->finalize (obj); } +/** + * This class manages the recordings off all devices + */ GType dvb_recordings_store_get_type (void) { - static GType dvb_recordings_store_type_id = 0; - if (dvb_recordings_store_type_id == 0) { + static volatile gsize dvb_recordings_store_type_id__volatile = 0; + if (g_once_init_enter (&dvb_recordings_store_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBRecordingsStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_recordings_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBRecordingsStore), 0, (GInstanceInitFunc) dvb_recordings_store_instance_init, NULL }; static const GInterfaceInfo dvb_id_bus_recordings_store_info = { (GInterfaceInitFunc) dvb_recordings_store_dvb_id_bus_recordings_store_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_recordings_store_type_id; dvb_recordings_store_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBRecordingsStore", &g_define_type_info, 0); g_type_add_interface_static (dvb_recordings_store_type_id, DVB_TYPE_ID_BUS_RECORDINGS_STORE, &dvb_id_bus_recordings_store_info); + g_once_init_leave (&dvb_recordings_store_type_id__volatile, dvb_recordings_store_type_id); } - return dvb_recordings_store_type_id; -} - - -static int _vala_strcmp0 (const char * str1, const char * str2) { - if (str1 == NULL) { - return -(str1 != str2); - } - if (str2 == NULL) { - return str1 != str2; - } - return strcmp (str1, str2); -} - - -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); + return dvb_recordings_store_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/RecordingsStore.vala gnome-dvb-daemon-0.1.21/src/RecordingsStore.vala --- gnome-dvb-daemon-0.1.16/src/RecordingsStore.vala 2009-10-15 10:03:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/RecordingsStore.vala 2010-08-09 13:25:25.000000000 +0000 @@ -37,7 +37,7 @@ this.last_id = 0; } - public static weak RecordingsStore get_instance () { + public static unowned RecordingsStore get_instance () { instance_mutex.lock (); if (instance == null) { instance = new RecordingsStore (); @@ -55,46 +55,49 @@ } instance_mutex.unlock (); } - + public void update_last_id (uint32 new_last_id) { - lock (this.last_id) { + lock (this.recordings) { if (new_last_id > this.last_id) this.last_id = new_last_id; } } - - public bool add (Recording rec, bool monitor) { + + public bool add (Recording rec) { uint32 id = rec.Id; lock (this.recordings) { - if (this.recordings.contains (id)) { + if (this.recordings.has_key (id)) { critical ("Recording with id %u already available", id); return false; } - if (monitor) { - this.monitor_recording (rec); + if (rec.Id > this.last_id) { + this.last_id = rec.Id; } - + this.recordings.set (id, rec); this.changed (id, ChangeType.ADDED); } return true; } - public void monitor_recording (Recording rec) { - // Monitor the recording - try { - FileMonitor monitor = rec.Location.monitor_file (0, null); - monitor.changed += this.on_recording_file_changed; - rec.file_monitor = monitor; - } catch (Error e) { - warning ("Could not create FileMonitor: %s", e.message); + public bool add_and_monitor (Recording rec) { + if (this.add (rec)) { + rec.monitor_recording (); + return true; } + return false; } - + + public void remove (Recording rec) { + uint32 rec_id = rec.Id; + this.recordings.unset (rec_id); + this.changed (rec_id, ChangeType.DELETED); + } + public uint32 get_next_id () { uint32 val; - lock (this.last_id) { + lock (this.recordings) { val = (++this.last_id); } return val; @@ -126,7 +129,7 @@ public bool GetLocation (uint32 rec_id, out string location) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { location = this.recordings.get(rec_id).Location.get_uri (); ret = true; } @@ -144,7 +147,7 @@ public bool GetName (uint32 rec_id, out string name) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { string val = this.recordings.get(rec_id).Name; name = (val == null) ? "" : val; ret = true; @@ -163,7 +166,7 @@ public bool GetDescription (uint32 rec_id, out string description) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { string val = this.recordings.get(rec_id).Description; description = (val == null) ? "" : val; ret = true; @@ -181,7 +184,7 @@ public bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBus.Error { bool ret; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { start_time = this.recordings.get(rec_id).get_start (); ret = true; } else { @@ -201,7 +204,7 @@ public bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { timestamp = (int64)this.recordings.get(rec_id).StartTime.mktime (); ret = true; } @@ -218,7 +221,7 @@ public bool GetLength (uint32 rec_id, out int64 length) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { length = this.recordings.get(rec_id).Length; ret = true; } @@ -237,19 +240,18 @@ public bool Delete (uint32 rec_id) throws DBus.Error { bool val = false; lock (this.recordings) { - if (!this.recordings.contains (rec_id)) val = false; + if (!this.recordings.has_key (rec_id)) val = false; else { debug ("Deleting recording %u", rec_id); var rec = this.recordings.get (rec_id); try { Utils.delete_dir_recursively (rec.Location.get_parent ()); - this.recordings.remove (rec_id); val = true; } catch (Error e) { critical ("Could not delete recording: %s", e.message); val = false; } - this.changed (rec_id, ChangeType.DELETED); + this.remove (rec); } } @@ -265,7 +267,7 @@ public bool GetChannelName (uint32 rec_id, out string name) throws DBus.Error { bool ret = false; lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { Recording rec = this.recordings.get (rec_id); name = rec.ChannelName; ret = true; @@ -279,7 +281,7 @@ bool ret; info = RecordingInfo (); lock (this.recordings) { - if (this.recordings.contains (rec_id)) { + if (this.recordings.has_key (rec_id)) { Recording rec = this.recordings.get (rec_id); string name = rec.Name; info.name = (name == null) ? "" : name; @@ -303,141 +305,12 @@ } return ret; } - - /** - * @recordingsbasedir: The directory to search - * - * Searches recursively in the given directory - * for "info.rec" files, restores a new Recording - * from that file and adds it to itsself. - */ + public void restore_from_dir (File recordingsbasedir) { - if (!recordingsbasedir.query_exists (null)) { - debug ("Directory %s does not exist", recordingsbasedir.get_path ()); - return; - } - - string attrs = "%s,%s,%s".printf (FILE_ATTRIBUTE_STANDARD_TYPE, - FILE_ATTRIBUTE_ACCESS_CAN_READ, FILE_ATTRIBUTE_STANDARD_NAME); - FileInfo info; - try { - info = recordingsbasedir.query_info (attrs, 0, null); - } catch (Error e) { - critical ("Could not retrieve attributes: %s", e.message); - return; - } - - if (info.get_file_type () != FileType.DIRECTORY) { - critical ("%s is not a directory", recordingsbasedir.get_path ()); - return; - } - - if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) { - critical ("Cannot read %s", recordingsbasedir.get_path ()); - return; - } - - FileEnumerator files; - try { - files = recordingsbasedir.enumerate_children ( - attrs, 0, null); - } catch (Error e) { - critical ("Could not read directory: %s", e.message); - return; - } - - try { - FileInfo childinfo; - while ((childinfo = files.next_file (null)) != null) { - 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); - break; - - case FileType.REGULAR: - if (childinfo.get_name () == "info.rec") { - Recording rec = null; - try { - rec = Recording.deserialize (child); - } catch (Error e) { - critical ( - "Could not deserialize recording: %s", - e.message); - } - if (rec != null) { - debug ("Restored recording from %s", - child.get_path ()); - lock (this.recordings) { - this.add (rec, true); - } - - lock (this.last_id) { - if (rec.Id > this.last_id) { - this.last_id = rec.Id; - } - } - } - } - break; - } - } - } catch (Error e) { - critical ("%s", e.message); - } finally { - try { - files.close (null); - } catch (Error e) { - critical ("Could not close file: %s", e.message); - } - } + var reader = new io.RecordingReader (recordingsbasedir, this); + reader.load_into (); } - - /** - * @location: Path to the .ts file of the recording - * @returns: TRUE on success - * - * Delete a recording by the path of the recording - */ - private bool delete_recording_by_location (string location) { - bool result = false; - uint32 rec_id = 0; - lock (this.recordings) { - foreach (uint32 id in this.recordings.keys) { - Recording rec = this.recordings.get (id); - if (rec.Location.get_path () == location) { - rec_id = id; - break; - } - } - - if (rec_id != 0) { - debug ("Deleting recording %u", rec_id); - this.recordings.remove (rec_id); - this.changed (rec_id, ChangeType.DELETED); - result = true; - } - } - - return result; - } - - private void on_recording_file_changed (FileMonitor monitor, - File file, File? other_file, FileMonitorEvent event) { - if (event == FileMonitorEvent.DELETED) { - string location = file.get_path (); - debug ("%s has been deleted", location); - this.delete_recording_by_location (location); - - monitor.cancel (); - } - } - + } } diff -Nru gnome-dvb-daemon-0.1.16/src/Recording.vala gnome-dvb-daemon-0.1.21/src/Recording.vala --- gnome-dvb-daemon-0.1.16/src/Recording.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Recording.vala 2010-06-08 19:17:25.000000000 +0000 @@ -45,103 +45,36 @@ this.StartTime.minute }; } - - /** - * Stores all information of the timer in info.rec - * in the directory of this.Location - */ - public void save_to_disk () throws GLib.Error { - File parentdir = this.Location.get_parent (); - - File recfile = parentdir.get_child ("info.rec"); - - debug ("Saving recording to %s", recfile.get_path() ); - - if (recfile.query_exists (null)) { - debug ("Deleting old info.rec"); - recfile.delete (null); + + public void monitor_recording () { + try { + this.file_monitor = this.Location.monitor_file (0, null); + this.file_monitor.changed.connect (this.on_recording_file_changed); + } catch (Error e) { + warning ("Could not create FileMonitor: %s", e.message); } - - FileOutputStream stream = recfile.create (0, null); - - string text = this.serialize (); - stream.write (text, text.size (), null); - - stream.close (null); } - - public string serialize () { - uint[] started = this.get_start (); - return ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%"+int64.FORMAT+"\n%s\n%s").printf ( - this.Id, this.ChannelName, this.Location.get_path (), - started[0], started[1], started[2], started[3], - started[4], this.Length, - (this.Name == null) ? "" : this.Name, - (this.Description == null) ? "" : this.Description - ); + + public void save_to_disk () { + var writer = new io.RecordingWriter (this); + try { + writer.write (); + } catch (Error e) { + critical ("Could not save recording: %s", e.message); + } } - - // TODO throw error - public static Recording? deserialize (File file) throws Error { - string? contents = Utils.read_file_contents (file); - - if (contents == null) return null; - - string [] fields = contents.split ("\n", 7); - - var rec = new Recording (); - - string field; - int i = 0; - while ((field = fields[i]) != null) { - switch (i) { - case 0: - rec.Id = (uint32)field.to_int (); - break; - - case 1: - rec.ChannelName = field; - break; - - case 2: - if (field == "") rec.Location = null; - else rec.Location = File.new_for_path (field); - break; - - case 3: { - int year = 0; - int month = 0; - int day = 0; - int hour = 0; - int minute = 0; - field.scanf ("%d-%d-%d %d:%d", &year, &month, &day, - &hour, &minute); - if (year >= 1900 && month >= 1 && day >= 1 && hour >= 0 - && minute >= 0) { - rec.StartTime = Utils.create_time (year, month, day, hour, minute); - } - break; - } - - case 4: - rec.Length = (int64)field.to_int (); - break; - - case 5: - rec.Name = (field == "") ? null : field; - break; - - default: - rec.Description = field; - break; - } - - i++; + + private void on_recording_file_changed (FileMonitor monitor, + File file, File? other_file, FileMonitorEvent event) { + if (event == FileMonitorEvent.DELETED) { + string location = file.get_path (); + debug ("%s has been deleted", location); + + monitor.cancel (); + + RecordingsStore.get_instance().remove (this); } - - return rec; } - } } diff -Nru gnome-dvb-daemon-0.1.16/src/rtsp/MediaFactory.c gnome-dvb-daemon-0.1.21/src/rtsp/MediaFactory.c --- gnome-dvb-daemon-0.1.16/src/rtsp/MediaFactory.c 2010-02-23 13:10:58.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rtsp/MediaFactory.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* MediaFactory.c generated by valac, the Vala compiler +/* MediaFactory.c generated by valac 0.9.7, the Vala compiler * generated from MediaFactory.vala, do not modify */ /* @@ -24,10 +24,10 @@ #include #include #include +#include #include #include #include -#include #define DVB_TYPE_MEDIA_FACTORY (dvb_media_factory_get_type ()) @@ -141,30 +141,30 @@ static gpointer dvb_media_factory_parent_class = NULL; static gpointer dvb_dvb_media_parent_class = NULL; -GType dvb_media_factory_get_type (void); +GType dvb_media_factory_get_type (void) G_GNUC_CONST; enum { DVB_MEDIA_FACTORY_DUMMY_PROPERTY }; -GType dvb_manager_get_type (void); +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); +GType dvb_device_group_get_type (void) G_GNUC_CONST; DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id); -GType dvb_channel_list_get_type (void); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); -GType dvb_channel_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); -GType dvb_channel_factory_get_type (void); +GType dvb_channel_factory_get_type (void) G_GNUC_CONST; DVBChannelFactory* dvb_device_group_get_channel_factory (DVBDeviceGroup* self); -GType dvb_player_thread_get_type (void); +GType dvb_player_thread_get_type (void) G_GNUC_CONST; 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); 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); -GType dvb_dvb_media_get_type (void); +GType dvb_dvb_media_get_type (void) G_GNUC_CONST; GstElement* dvb_player_thread_get_pipeline (DVBPlayerThread* self); -static GstRTSPMedia* dvb_media_factory_real_construct (GstRTSPMediaFactory* base, GstRTSPUrl* url); static char* dvb_media_factory_real_gen_key (GstRTSPMediaFactory* base, GstRTSPUrl* url); DVBMediaFactory* dvb_media_factory_new (void); DVBMediaFactory* dvb_media_factory_construct (GType object_type); @@ -172,8 +172,8 @@ enum { DVB_DVB_MEDIA_DUMMY_PROPERTY }; -gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); static gboolean dvb_dvb_media_real_unprepare (GstRTSPMedia* base); +gboolean dvb_channel_factory_stop_channel (DVBChannelFactory* self, DVBChannel* channel, GstElement* sink); static void dvb_dvb_media_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); @@ -198,12 +198,12 @@ static GstRTSPMedia* dvb_media_factory_real_construct (GstRTSPMediaFactory* base, GstRTSPUrl* url) { DVBMediaFactory * self; - GstRTSPMedia* result; + GstRTSPMedia* result = NULL; guint sidnr; guint grpnr; - char** _tmp1_; - gint path_elements_size; gint path_elements_length1; + gint _path_elements_size_; + char** _tmp1_; char** _tmp0_; char** path_elements; gint i; @@ -221,7 +221,7 @@ g_return_val_if_fail (url != NULL, NULL); sidnr = (guint) 0; grpnr = (guint) 0; - path_elements = (_tmp1_ = _tmp0_ = g_strsplit (url->abspath, "/", 0), path_elements_length1 = _vala_array_length (_tmp0_), path_elements_size = path_elements_length1, _tmp1_); + path_elements = (_tmp1_ = _tmp0_ = g_strsplit (url->abspath, "/", 0), path_elements_length1 = _vala_array_length (_tmp0_), _path_elements_size_ = path_elements_length1, _tmp1_); i = 0; elem = NULL; while (TRUE) { @@ -243,21 +243,21 @@ if (devgrp == NULL) { g_warning ("MediaFactory.vala:51: Unknown group %u", grpnr); result = NULL; - path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (elem); - _g_object_unref0 (manager); _g_object_unref0 (devgrp); + _g_object_unref0 (manager); + _g_free0 (elem); + path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } payload = gst_element_factory_make ("rtpmp2tpay", "pay0"); if (payload == NULL) { g_critical ("MediaFactory.vala:58: Could not create rtpmp2tpay element"); result = NULL; - path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (elem); - _g_object_unref0 (manager); - _g_object_unref0 (devgrp); _gst_object_unref0 (payload); + _g_object_unref0 (devgrp); + _g_object_unref0 (manager); + _g_free0 (elem); + path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } g_object_set ((GObject*) payload, "pt", 96, NULL); @@ -265,12 +265,12 @@ if (channel == NULL) { g_critical ("MediaFactory.vala:65: No channel with SID %u", sidnr); result = NULL; - path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (elem); - _g_object_unref0 (manager); - _g_object_unref0 (devgrp); - _gst_object_unref0 (payload); _g_object_unref0 (channel); + _gst_object_unref0 (payload); + _g_object_unref0 (devgrp); + _g_object_unref0 (manager); + _g_free0 (elem); + path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } channels_factory = _g_object_ref0 (dvb_device_group_get_channel_factory (devgrp)); @@ -278,14 +278,14 @@ if (player == NULL) { g_debug ("MediaFactory.vala:73: Could not create player"); result = NULL; - path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (elem); - _g_object_unref0 (manager); - _g_object_unref0 (devgrp); - _gst_object_unref0 (payload); - _g_object_unref0 (channel); - _g_object_unref0 (channels_factory); _g_object_unref0 (player); + _g_object_unref0 (channels_factory); + _g_object_unref0 (channel); + _gst_object_unref0 (payload); + _g_object_unref0 (devgrp); + _g_object_unref0 (manager); + _g_free0 (elem); + 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"); @@ -295,22 +295,22 @@ media->pipeline = (_tmp3_ = dvb_player_thread_get_pipeline (player), _gst_object_unref0 (media->pipeline), _tmp3_); gst_rtsp_media_factory_collect_streams ((GstRTSPMediaFactory*) self, url, media); result = media; - path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (elem); - _g_object_unref0 (manager); - _g_object_unref0 (devgrp); - _gst_object_unref0 (payload); - _g_object_unref0 (channel); - _g_object_unref0 (channels_factory); - _g_object_unref0 (player); _gst_object_unref0 (bin); + _g_object_unref0 (player); + _g_object_unref0 (channels_factory); + _g_object_unref0 (channel); + _gst_object_unref0 (payload); + _g_object_unref0 (devgrp); + _g_object_unref0 (manager); + _g_free0 (elem); + path_elements = (_vala_array_free (path_elements, path_elements_length1, (GDestroyNotify) g_free), NULL); return result; } static char* dvb_media_factory_real_gen_key (GstRTSPMediaFactory* base, GstRTSPUrl* url) { DVBMediaFactory * self; - char* result; + char* result = NULL; self = (DVBMediaFactory*) base; g_return_val_if_fail (url != NULL, NULL); result = g_strdup (url->abspath); @@ -357,12 +357,14 @@ GType dvb_media_factory_get_type (void) { - static GType dvb_media_factory_type_id = 0; - if (dvb_media_factory_type_id == 0) { + static volatile gsize dvb_media_factory_type_id__volatile = 0; + if (g_once_init_enter (&dvb_media_factory_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBMediaFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaFactory), 0, (GInstanceInitFunc) dvb_media_factory_instance_init, NULL }; + GType dvb_media_factory_type_id; dvb_media_factory_type_id = g_type_register_static (GST_TYPE_RTSP_MEDIA_FACTORY, "DVBMediaFactory", &g_define_type_info, 0); + g_once_init_leave (&dvb_media_factory_type_id__volatile, dvb_media_factory_type_id); } - return dvb_media_factory_type_id; + return dvb_media_factory_type_id__volatile; } @@ -389,7 +391,7 @@ static gboolean dvb_dvb_media_real_unprepare (GstRTSPMedia* base) { DVBDVBMedia * self; - gboolean result; + gboolean result = FALSE; DVBChannelFactory* channels_factory; self = (DVBDVBMedia*) base; gst_rtsp_media_remove_elements ((GstRTSPMedia*) self); @@ -423,12 +425,14 @@ GType dvb_dvb_media_get_type (void) { - static GType dvb_dvb_media_type_id = 0; - if (dvb_dvb_media_type_id == 0) { + static volatile gsize dvb_dvb_media_type_id__volatile = 0; + if (g_once_init_enter (&dvb_dvb_media_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBDVBMediaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_dvb_media_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBDVBMedia), 0, (GInstanceInitFunc) dvb_dvb_media_instance_init, NULL }; + GType dvb_dvb_media_type_id; dvb_dvb_media_type_id = g_type_register_static (GST_TYPE_RTSP_MEDIA, "DVBDVBMedia", &g_define_type_info, 0); + g_once_init_leave (&dvb_dvb_media_type_id__volatile, dvb_dvb_media_type_id); } - return dvb_dvb_media_type_id; + return dvb_dvb_media_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/rtsp/MediaMapping.c gnome-dvb-daemon-0.1.21/src/rtsp/MediaMapping.c --- gnome-dvb-daemon-0.1.16/src/rtsp/MediaMapping.c 2009-10-01 10:38:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rtsp/MediaMapping.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* MediaMapping.c generated by valac, the Vala compiler +/* MediaMapping.c generated by valac 0.9.7, the Vala compiler * generated from MediaMapping.vala, do not modify */ /* @@ -62,13 +62,13 @@ static GstRTSPMediaFactory* dvb_media_mapping_factory_instance = NULL; static gpointer dvb_media_mapping_parent_class = NULL; -GType dvb_media_mapping_get_type (void); +GType dvb_media_mapping_get_type (void) G_GNUC_CONST; enum { DVB_MEDIA_MAPPING_DUMMY_PROPERTY }; DVBMediaFactory* dvb_media_factory_new (void); DVBMediaFactory* dvb_media_factory_construct (GType object_type); -GType dvb_media_factory_get_type (void); +GType dvb_media_factory_get_type (void) G_GNUC_CONST; static GstRTSPMediaFactory* dvb_media_mapping_real_find_media (GstRTSPMediaMapping* base, GstRTSPUrl* url); DVBMediaMapping* dvb_media_mapping_new (void); DVBMediaMapping* dvb_media_mapping_construct (GType object_type); @@ -83,7 +83,7 @@ static GstRTSPMediaFactory* dvb_media_mapping_real_find_media (GstRTSPMediaMapping* base, GstRTSPUrl* url) { DVBMediaMapping * self; - GstRTSPMediaFactory* result; + GstRTSPMediaFactory* result = NULL; self = (DVBMediaMapping*) base; g_return_val_if_fail (url != NULL, NULL); result = _g_object_ref0 (dvb_media_mapping_factory_instance); @@ -123,12 +123,14 @@ GType dvb_media_mapping_get_type (void) { - static GType dvb_media_mapping_type_id = 0; - if (dvb_media_mapping_type_id == 0) { + static volatile gsize dvb_media_mapping_type_id__volatile = 0; + if (g_once_init_enter (&dvb_media_mapping_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBMediaMappingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_mapping_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaMapping), 0, (GInstanceInitFunc) dvb_media_mapping_instance_init, NULL }; + GType dvb_media_mapping_type_id; dvb_media_mapping_type_id = g_type_register_static (GST_TYPE_RTSP_MEDIA_MAPPING, "DVBMediaMapping", &g_define_type_info, 0); + g_once_init_leave (&dvb_media_mapping_type_id__volatile, dvb_media_mapping_type_id); } - return dvb_media_mapping_type_id; + return dvb_media_mapping_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/rtsp/Server.c gnome-dvb-daemon-0.1.21/src/rtsp/Server.c --- gnome-dvb-daemon-0.1.16/src/rtsp/Server.c 2009-10-01 10:38:16.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rtsp/Server.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Server.c generated by valac, the Vala compiler +/* Server.c generated by valac 0.9.7, the Vala compiler * generated from Server.vala, do not modify */ /* @@ -96,13 +96,14 @@ guint dvb_rtsp_server_timeout_id = 0U; static gpointer dvb_rtsp_server_stop_channel_helper_parent_class = NULL; +gboolean dvb_rtsp_server_start (void); DVBMediaMapping* dvb_media_mapping_new (void); DVBMediaMapping* dvb_media_mapping_construct (GType object_type); -GType dvb_media_mapping_get_type (void); +GType dvb_media_mapping_get_type (void) G_GNUC_CONST; gboolean dvb_rtsp_server_timeout (void); -gboolean dvb_rtsp_server_start (void); void dvb_rtsp_server_shutdown (void); -GType dvb_channel_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +void dvb_rtsp_server_stop_streaming (DVBChannel* channel); const char* dvb_channel_get_Name (DVBChannel* self); char* dvb_channel_get_URL (DVBChannel* self); DVBRTSPServerStopChannelHelper* dvb_rtsp_server_stop_channel_helper_new (const char* url_str); @@ -111,12 +112,12 @@ void dvb_rtsp_server_stop_channel_helper_unref (gpointer instance); GParamSpec* dvb_rtsp_server_param_spec_stop_channel_helper (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_rtsp_server_value_set_stop_channel_helper (GValue* value, gpointer v_object); +void dvb_rtsp_server_value_take_stop_channel_helper (GValue* value, gpointer v_object); gpointer dvb_rtsp_server_value_get_stop_channel_helper (const GValue* value); -GType dvb_rtsp_server_stop_channel_helper_get_type (void); +GType dvb_rtsp_server_stop_channel_helper_get_type (void) G_GNUC_CONST; GstRTSPFilterResult dvb_rtsp_server_stop_channel_helper_session_filter_func (DVBRTSPServerStopChannelHelper* self, GstRTSPSessionPool* pool, GstRTSPSession* session); static GstRTSPFilterResult _dvb_rtsp_server_stop_channel_helper_session_filter_func_gst_rtsp_session_filter_func (GstRTSPSessionPool* pool, GstRTSPSession* session, gpointer self); static void _g_list_free_g_object_unref (GList* self); -void dvb_rtsp_server_stop_streaming (DVBChannel* channel); #define DVB_RTSP_SERVER_STOP_CHANNEL_HELPER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_RTSP_SERVER_TYPE_STOP_CHANNEL_HELPER, DVBRTSPServerStopChannelHelperPrivate)) enum { DVB_RTSP_SERVER_STOP_CHANNEL_HELPER_DUMMY_PROPERTY @@ -126,7 +127,7 @@ gboolean dvb_rtsp_server_start (void) { - gboolean result; + gboolean result = FALSE; GstRTSPServer* _tmp0_; DVBMediaMapping* _tmp1_; g_message ("Server.vala:26: Starting RTSP server"); @@ -148,7 +149,9 @@ static GstRTSPFilterResult _dvb_rtsp_server_stop_channel_helper_session_filter_func_gst_rtsp_session_filter_func (GstRTSPSessionPool* pool, GstRTSPSession* session, gpointer self) { - return dvb_rtsp_server_stop_channel_helper_session_filter_func (self, pool, session); + GstRTSPFilterResult result; + result = dvb_rtsp_server_stop_channel_helper_session_filter_func (self, pool, session); + return result; } @@ -173,7 +176,7 @@ gboolean dvb_rtsp_server_timeout (void) { - gboolean result; + gboolean result = FALSE; GstRTSPSessionPool* pool; pool = gst_rtsp_server_get_session_pool (dvb_rtsp_server_server); gst_rtsp_session_pool_cleanup (pool); @@ -185,14 +188,12 @@ DVBRTSPServerStopChannelHelper* dvb_rtsp_server_stop_channel_helper_construct (GType object_type, const char* url_str) { DVBRTSPServerStopChannelHelper* self; - GstRTSPUrl* _tmp2_; - GstRTSPResult _tmp1_; GstRTSPUrl* _tmp0_ = NULL; + GstRTSPUrl* _tmp1_; g_return_val_if_fail (url_str != NULL, NULL); self = (DVBRTSPServerStopChannelHelper*) g_type_create_instance (object_type); - _tmp1_ = gst_rtsp_url_parse (url_str, &_tmp0_); - self->priv->url = (_tmp2_ = _tmp0_, _gst_rtsp_url_free0 (self->priv->url), _tmp2_); - _tmp1_; + gst_rtsp_url_parse (url_str, &_tmp0_); + self->priv->url = (_tmp1_ = _tmp0_, _gst_rtsp_url_free0 (self->priv->url), _tmp1_); return self; } @@ -203,7 +204,7 @@ GstRTSPFilterResult dvb_rtsp_server_stop_channel_helper_session_filter_func (DVBRTSPServerStopChannelHelper* self, GstRTSPSessionPool* pool, GstRTSPSession* session) { - GstRTSPFilterResult result; + GstRTSPFilterResult result = 0; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (pool != NULL, 0); g_return_val_if_fail (session != NULL, 0); @@ -310,6 +311,23 @@ } +void dvb_rtsp_server_value_take_stop_channel_helper (GValue* value, gpointer v_object) { + DVBRTSPServerStopChannelHelper* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DVB_RTSP_SERVER_TYPE_STOP_CHANNEL_HELPER)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DVB_RTSP_SERVER_TYPE_STOP_CHANNEL_HELPER)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + dvb_rtsp_server_stop_channel_helper_unref (old); + } +} + + static void dvb_rtsp_server_stop_channel_helper_class_init (DVBRTSPServerStopChannelHelperClass * klass) { dvb_rtsp_server_stop_channel_helper_parent_class = g_type_class_peek_parent (klass); DVB_RTSP_SERVER_STOP_CHANNEL_HELPER_CLASS (klass)->finalize = dvb_rtsp_server_stop_channel_helper_finalize; @@ -331,14 +349,16 @@ GType dvb_rtsp_server_stop_channel_helper_get_type (void) { - static GType dvb_rtsp_server_stop_channel_helper_type_id = 0; - if (dvb_rtsp_server_stop_channel_helper_type_id == 0) { + static volatile gsize dvb_rtsp_server_stop_channel_helper_type_id__volatile = 0; + if (g_once_init_enter (&dvb_rtsp_server_stop_channel_helper_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { dvb_rtsp_server_value_stop_channel_helper_init, dvb_rtsp_server_value_stop_channel_helper_free_value, dvb_rtsp_server_value_stop_channel_helper_copy_value, dvb_rtsp_server_value_stop_channel_helper_peek_pointer, "p", dvb_rtsp_server_value_stop_channel_helper_collect_value, "p", dvb_rtsp_server_value_stop_channel_helper_lcopy_value }; static const GTypeInfo g_define_type_info = { sizeof (DVBRTSPServerStopChannelHelperClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_rtsp_server_stop_channel_helper_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBRTSPServerStopChannelHelper), 0, (GInstanceInitFunc) dvb_rtsp_server_stop_channel_helper_instance_init, &g_define_type_value_table }; static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType dvb_rtsp_server_stop_channel_helper_type_id; dvb_rtsp_server_stop_channel_helper_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DVBRTSPServerStopChannelHelper", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&dvb_rtsp_server_stop_channel_helper_type_id__volatile, dvb_rtsp_server_stop_channel_helper_type_id); } - return dvb_rtsp_server_stop_channel_helper_type_id; + return dvb_rtsp_server_stop_channel_helper_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/rygel/Interfaces2.c gnome-dvb-daemon-0.1.21/src/rygel/Interfaces2.c --- gnome-dvb-daemon-0.1.16/src/rygel/Interfaces2.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Interfaces2.c 2010-08-21 20:42:33.000000000 +0000 @@ -0,0 +1,3341 @@ +/* Interfaces2.c generated by valac 0.9.7, the Vala compiler + * generated from Interfaces2.vala, do not modify */ + +/* + * Copyright (C) 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 + + +#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)) +#define MEDIA_OBJECT2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_OBJECT2, MediaObject2Iface)) + +typedef struct _MediaObject2 MediaObject2; +typedef struct _MediaObject2Iface MediaObject2Iface; +typedef struct _DBusObjectVTable _DBusObjectVTable; +#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)) +#define IS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_CONTAINER2)) +#define MEDIA_CONTAINER2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_CONTAINER2, MediaContainer2Iface)) + +typedef struct _MediaContainer2 MediaContainer2; +typedef struct _MediaContainer2Iface MediaContainer2Iface; +typedef struct _MediaContainer2DBusProxy MediaContainer2DBusProxy; +typedef DBusGProxyClass MediaContainer2DBusProxyClass; + +#define TYPE_MEDIA_ITEM2 (media_item2_get_type ()) +#define MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_ITEM2, MediaItem2)) +#define IS_MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_ITEM2)) +#define MEDIA_ITEM2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_ITEM2, MediaItem2Iface)) + +typedef struct _MediaItem2 MediaItem2; +typedef struct _MediaItem2Iface MediaItem2Iface; +typedef struct _MediaItem2DBusProxy MediaItem2DBusProxy; +typedef DBusGProxyClass MediaItem2DBusProxyClass; + +struct _MediaObject2Iface { + GTypeInterface parent_iface; + char* (*get_Parent) (MediaObject2* self); + char* (*get_DisplayName) (MediaObject2* self); + char* (*get_Type) (MediaObject2* self); + char* (*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, char** filter, int filter_length1, int* result_length1, GError** error); + GHashTable** (*ListContainers) (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); + GHashTable** (*ListItems) (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); + guint (*get_ChildCount) (MediaContainer2* self); + guint (*get_ItemCount) (MediaContainer2* self); + guint (*get_ContainerCount) (MediaContainer2* self); + gboolean (*get_Searchable) (MediaContainer2* self); +}; + +struct _MediaContainer2DBusProxy { + DBusGProxy parent_instance; + gboolean disposed; +}; + +struct _MediaItem2Iface { + GTypeInterface parent_iface; + char** (*get_URLs) (MediaItem2* self, int* result_length1); + char* (*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); +char* media_object2_get_Parent (MediaObject2* self); +char* media_object2_get_DisplayName (MediaObject2* self); +char* media_object2_get_Type (MediaObject2* self); +char* 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 char* media_object2_dbus_proxy_get_Parent (MediaObject2* self); +static char* media_object2_dbus_proxy_get_DisplayName (MediaObject2* self); +static char* media_object2_dbus_proxy_get_Type (MediaObject2* self); +static char* media_object2_dbus_proxy_get_Path (MediaObject2* self); +static void media_object2_dbus_proxy_media_object2__interface_init (MediaObject2Iface* iface); +static void media_object2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void 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); +GType media_container2_get_type (void) G_GNUC_CONST; +GHashTable** media_container2_ListChildren (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +guint media_container2_get_ChildCount (MediaContainer2* self); +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, char** filter, int filter_length1, int* result_length1, GError** error); +static GHashTable** media_container2_dbus_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +static GHashTable** media_container2_dbus_proxy_ListItems (MediaContainer2* self, guint offset, guint max, char** 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 media_container2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void media_container2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType media_item2_get_type (void) G_GNUC_CONST; +MediaItem2* media_item2_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +char** media_item2_get_URLs (MediaItem2* self, int* result_length1); +char* 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 char** media_item2_dbus_proxy_get_URLs (MediaItem2* self, int* result_length1); +static char* media_item2_dbus_proxy_get_MIMEType (MediaItem2* self); +static void media_item2_dbus_proxy_media_item2__interface_init (MediaItem2Iface* iface); +static void media_item2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void media_item2_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_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}; + + +char* media_object2_get_Parent (MediaObject2* self) { + return MEDIA_OBJECT2_GET_INTERFACE (self)->get_Parent (self); +} + + +char* media_object2_get_DisplayName (MediaObject2* self) { + return MEDIA_OBJECT2_GET_INTERFACE (self)->get_DisplayName (self); +} + + +char* media_object2_get_Type (MediaObject2* self) { + return MEDIA_OBJECT2_GET_INTERFACE (self)->get_Type (self); +} + + +char* media_object2_get_Path (MediaObject2* self) { + 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)) { + char* 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)) { + char* 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)) { + char* 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); + } + { + char* 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); + } + { + char* 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); + } + { + char* 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)); + } +} + + +GType media_object2_get_type (void) { + static volatile gsize media_object2_type_id__volatile = 0; + if (g_once_init_enter (&media_object2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (MediaObject2Iface), (GBaseInitFunc) media_object2_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_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; +} + + +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_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 = media_object2_dbus_proxy_get_property; + G_OBJECT_CLASS (klass)->set_property = 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 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_; + 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; + } + dbus_message_iter_get_basic (&_subiter, &_tmp483_); + dbus_message_iter_next (&_subiter); + _result = g_strdup (_tmp483_); + dbus_message_unref (_reply); + return _result; +} + + +static char* 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_; + char* _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; + } + dbus_message_iter_get_basic (&_subiter, &_tmp486_); + dbus_message_iter_next (&_subiter); + _result = g_strdup (_tmp486_); + dbus_message_unref (_reply); + return _result; +} + + +static char* 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_; + char* _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; + } + dbus_message_iter_get_basic (&_subiter, &_tmp489_); + dbus_message_iter_next (&_subiter); + _result = g_strdup (_tmp489_); + dbus_message_unref (_reply); + return _result; +} + + +static char* 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_; + char* _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; + } + dbus_message_iter_get_basic (&_subiter, &_tmp492_); + dbus_message_iter_next (&_subiter); + _result = g_strdup (_tmp492_); + dbus_message_unref (_reply); + return _result; +} + + +static void media_object2_dbus_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; + iface->get_Path = media_object2_dbus_proxy_get_Path; +} + + +static void media_object2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +} + + +static void media_object2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +} + + +GHashTable** media_container2_ListChildren (MediaContainer2* self, guint offset, guint max, char** 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); +} + + +GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, char** 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); +} + + +GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, char** 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); +} + + +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); +} + + +void _media_container2_dbus_unregister (DBusConnection* connection, void* _user_data_) { +} + + +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; + } +} + + +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 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; + } +} + + +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_; + char** filter = NULL; + int filter_length1; + char** _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 (char*, 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 (char*, _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_)) { + char* _key; + GValue* _value; + const char* _tmp24_; + DBusMessageIter _tmp25_; + dbus_message_iter_open_container (&_tmp19_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp20_); + _key = (char*) _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 char** _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; + } +} + + +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_; + char** filter = NULL; + int filter_length1; + char** _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 (char*, 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 (char*, _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_)) { + char* _key; + GValue* _value; + const char* _tmp51_; + DBusMessageIter _tmp52_; + dbus_message_iter_open_container (&_tmp46_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp47_); + _key = (char*) _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 char** _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; + } +} + + +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_; + char** filter = NULL; + int filter_length1; + char** _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 (char*, 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 (char*, _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_)) { + char* _key; + GValue* _value; + const char* _tmp78_; + DBusMessageIter _tmp79_; + dbus_message_iter_open_container (&_tmp73_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp74_); + _key = (char*) _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 char** _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; + } +} + + +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; + } +} + + +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); +} + + +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); +} + + +static void media_container2_base_init (MediaContainer2Iface * iface) { + 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)); + } +} + + +GType media_container2_get_type (void) { + static volatile gsize media_container2_type_id__volatile = 0; + if (g_once_init_enter (&media_container2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (MediaContainer2Iface), (GBaseInitFunc) media_container2_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_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; +} + + +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); + 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; + } + ((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 = media_container2_dbus_proxy_get_property; + G_OBJECT_CLASS (klass)->set_property = 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_dbus_proxy_init (MediaContainer2DBusProxy* self) { +} + + +static GHashTable** media_container2_dbus_proxy_ListChildren (MediaContainer2* self, guint offset, guint max, char** 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_; + char** _tmp495_; + DBusMessageIter _tmp496_; + int _tmp497_; + 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"); + 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; + gint _ecode; + 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); + 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); + _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_)) { + char* _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 char** _tmp519_; + int _tmp519__length; + int _tmp519__size; + int _tmp519__length1; + DBusMessageIter _tmp520_; + _tmp519_ = g_new (const char*, 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 char*, _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_; + *result_length1 = _result_length1; + dbus_message_unref (_reply); + return _result; +} + + +static GHashTable** media_container2_dbus_proxy_ListContainers (MediaContainer2* self, guint offset, guint max, char** 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_; + char** _tmp525_; + DBusMessageIter _tmp526_; + int _tmp527_; + 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"); + 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; + gint _ecode; + 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); + 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); + _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_)) { + char* _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 char** _tmp549_; + int _tmp549__length; + int _tmp549__size; + int _tmp549__length1; + DBusMessageIter _tmp550_; + _tmp549_ = g_new (const char*, 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 char*, _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_; + *result_length1 = _result_length1; + dbus_message_unref (_reply); + return _result; +} + + +static GHashTable** media_container2_dbus_proxy_ListItems (MediaContainer2* self, guint offset, guint max, char** 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_; + char** _tmp555_; + DBusMessageIter _tmp556_; + int _tmp557_; + 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; + gint _ecode; + 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); + 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); + _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_)) { + char* _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 char** _tmp579_; + int _tmp579__length; + int _tmp579__size; + int _tmp579__length1; + DBusMessageIter _tmp580_; + _tmp579_ = g_new (const char*, 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 char*, _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_; + *result_length1 = _result_length1; + dbus_message_unref (_reply); + 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_; + 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); + 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_; + 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); + 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_; + 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); + 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_; + 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); + 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; + 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; + iface->get_Searchable = media_container2_dbus_proxy_get_Searchable; +} + + +static void media_container2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +} + + +static void media_container2_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +} + + +char** media_item2_get_URLs (MediaItem2* self, int* result_length1) { + return MEDIA_ITEM2_GET_INTERFACE (self)->get_URLs (self, result_length1); +} + + +char* media_item2_get_MIMEType (MediaItem2* self) { + return MEDIA_ITEM2_GET_INTERFACE (self)->get_MIMEType (self); +} + + +void _media_item2_dbus_unregister (DBusConnection* connection, void* _user_data_) { +} + + +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 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)) { + char** result; + int result_length1; + char** _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)) { + char* 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 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); + { + char** result; + int result_length1; + char** _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); + } + { + char* 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; + } +} + + +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; + } +} + + +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); + } +} + + +static void media_item2_base_init (MediaItem2Iface * 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_type_set_qdata (TYPE_MEDIA_ITEM2, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_media_item2_dbus_vtable)); + } +} + + +GType media_item2_get_type (void) { + static volatile gsize media_item2_type_id__volatile = 0; + if (g_once_init_enter (&media_item2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (MediaItem2Iface), (GBaseInitFunc) media_item2_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_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); +} + + +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 = media_item2_dbus_proxy_get_property; + G_OBJECT_CLASS (klass)->set_property = 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_dbus_proxy_init (MediaItem2DBusProxy* self) { +} + + +static char** 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_; + char** _result; + int _result_length1; + char** _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; + } + _result_length1 = 0; + _tmp597_ = g_new (char*, 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 (char*, _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_; + *result_length1 = _result_length1; + dbus_message_unref (_reply); + return _result; +} + + +static char* 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_; + char* _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; + } + dbus_message_iter_get_basic (&_subiter, &_tmp602_); + dbus_message_iter_next (&_subiter); + _result = g_strdup (_tmp602_); + dbus_message_unref (_reply); + return _result; +} + + +static void media_item2_dbus_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 media_item2_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +} + + +static void media_item2_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.16/src/rygel/Interfaces2.vala gnome-dvb-daemon-0.1.21/src/rygel/Interfaces2.vala --- gnome-dvb-daemon-0.1.16/src/rygel/Interfaces2.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Interfaces2.vala 2010-07-21 19:59:20.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (C) 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 . + */ +[DBus (name = "org.gnome.UPnP.MediaObject2")] +public interface MediaObject2 : GLib.Object { + + public abstract DBus.ObjectPath Parent { + owned get; + } + + public abstract string DisplayName { + owned get; + } + + public abstract string Type { + owned get; + } + + public abstract string Path { + owned get; + } +} + +[DBus (name = "org.gnome.UPnP.MediaContainer2")] +public interface MediaContainer2 : GLib.Object { + + public abstract signal void Updated (); + + public abstract uint ChildCount { + get; + } + + public abstract uint ItemCount { + get; + } + + public abstract uint ContainerCount { + get; + } + + public abstract bool Searchable { + get; + } + + public abstract GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBus.Error; + + public abstract GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBus.Error; + + public abstract GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBus.Error; + +} + +[DBus (name = "org.gnome.UPnP.MediaItem2")] +public interface MediaItem2 : GLib.Object { + + public abstract string[] URLs { + owned get; + } + + public abstract string MIMEType { + owned get; + } +} + diff -Nru gnome-dvb-daemon-0.1.16/src/rygel/Interfaces.c gnome-dvb-daemon-0.1.21/src/rygel/Interfaces.c --- gnome-dvb-daemon-0.1.16/src/rygel/Interfaces.c 2010-02-23 13:10:58.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Interfaces.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Interfaces.c generated by valac, the Vala compiler +/* Interfaces.c generated by valac 0.9.7, the Vala compiler * generated from Interfaces.vala, do not modify */ /* @@ -36,6 +36,7 @@ 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; @@ -59,7 +60,6 @@ typedef struct _MediaItem1Iface MediaItem1Iface; typedef struct _MediaItem1DBusProxy MediaItem1DBusProxy; typedef DBusGProxyClass MediaItem1DBusProxyClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _MediaObject1Iface { GTypeInterface parent_iface; @@ -67,6 +67,10 @@ char* (*get_DisplayName) (MediaObject1* self); }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _MediaObject1DBusProxy { DBusGProxy parent_instance; gboolean disposed; @@ -97,23 +101,21 @@ gboolean disposed; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -GType media_object1_get_type (void); +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); char* 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); -MediaObject1* media_object1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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, @@ -125,7 +127,8 @@ static void media_object1_dbus_proxy_media_object1__interface_init (MediaObject1Iface* iface); static void media_object1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void media_object1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType media_container1_get_type (void); +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); @@ -137,8 +140,7 @@ 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); -MediaContainer1* media_container1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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 { @@ -153,7 +155,8 @@ static void media_container1_dbus_proxy_media_container1__interface_init (MediaContainer1Iface* iface); static void media_container1_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void media_container1_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType media_item1_get_type (void); +GType media_item1_get_type (void) G_GNUC_CONST; +MediaItem1* media_item1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); char** media_item1_get_URLs (MediaItem1* self, int* result_length1); char* media_item1_get_MIMEType (MediaItem1* self); char* media_item1_get_Type (MediaItem1* self); @@ -163,11 +166,11 @@ 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); -MediaItem1* media_item1_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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 }; @@ -179,8 +182,6 @@ static void 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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -200,6 +201,25 @@ } +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_) { } @@ -385,14 +405,16 @@ GType media_object1_get_type (void) { - static GType media_object1_type_id = 0; - if (media_object1_type_id == 0) { + 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; + return media_object1_type_id__volatile; } @@ -460,19 +482,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp7_; - const char* _tmp8_; + const char* _tmp448_; + const char* _tmp449_; char* _result; - const char* _tmp9_; + 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); - _tmp7_ = "org.gnome.UPnP.MediaObject1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp7_); - _tmp8_ = "Parent"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp8_); + _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); @@ -495,9 +517,9 @@ dbus_message_unref (_reply); return NULL; } - dbus_message_iter_get_basic (&_subiter, &_tmp9_); + dbus_message_iter_get_basic (&_subiter, &_tmp450_); dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp9_); + _result = g_strdup (_tmp450_); dbus_message_unref (_reply); return _result; } @@ -508,19 +530,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp10_; - const char* _tmp11_; + const char* _tmp451_; + const char* _tmp452_; char* _result; - const char* _tmp12_; + 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); - _tmp10_ = "org.gnome.UPnP.MediaObject1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp10_); - _tmp11_ = "DisplayName"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp11_); + _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); @@ -543,9 +565,9 @@ dbus_message_unref (_reply); return NULL; } - dbus_message_iter_get_basic (&_subiter, &_tmp12_); + dbus_message_iter_get_basic (&_subiter, &_tmp453_); dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp12_); + _result = g_strdup (_tmp453_); dbus_message_unref (_reply); return _result; } @@ -621,74 +643,74 @@ DBusMessage* reply; DBusMessageIter iter, reply_iter, subiter; char* interface_name; - const char* _tmp13_; + const char* _tmp0_; char* property_name; - const char* _tmp14_; + 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, &_tmp13_); + dbus_message_iter_get_basic (&iter, &_tmp0_); dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp13_); - dbus_message_iter_get_basic (&iter, &_tmp14_); + interface_name = g_strdup (_tmp0_); + dbus_message_iter_get_basic (&iter, &_tmp1_); dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp14_); + 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** _tmp15_; - DBusMessageIter _tmp16_; - int _tmp17_; + 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); - _tmp15_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "o", &_tmp16_); - for (_tmp17_ = 0; _tmp17_ < result_length1; _tmp17_++) { - const char* _tmp18_; - _tmp18_ = *_tmp15_; - dbus_message_iter_append_basic (&_tmp16_, DBUS_TYPE_OBJECT_PATH, &_tmp18_); - _tmp15_++; + _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, &_tmp16_); + 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 _tmp19_; + dbus_uint32_t _tmp6_; dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); result = media_container1_get_ItemCount (self); - _tmp19_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp19_); + _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** _tmp20_; - DBusMessageIter _tmp21_; - int _tmp22_; + 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); - _tmp20_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "o", &_tmp21_); - for (_tmp22_ = 0; _tmp22_ < result_length1; _tmp22_++) { - const char* _tmp23_; - _tmp23_ = *_tmp20_; - dbus_message_iter_append_basic (&_tmp21_, DBUS_TYPE_OBJECT_PATH, &_tmp23_); - _tmp20_++; + _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, &_tmp21_); + 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 _tmp24_; + dbus_uint32_t _tmp11_; dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "u", &subiter); result = media_container1_get_ContainerCount (self); - _tmp24_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_UINT32, &_tmp24_); + _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); @@ -710,7 +732,7 @@ DBusMessage* reply; DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; char* interface_name; - const char* _tmp25_; + const char* _tmp12_; const char* property_name; if (strcmp (dbus_message_get_signature (message), "s")) { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -718,82 +740,82 @@ 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, &_tmp25_); + dbus_message_iter_get_basic (&iter, &_tmp12_); dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp25_); + 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** _tmp26_; - DBusMessageIter _tmp27_; - int _tmp28_; + 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); - _tmp26_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "o", &_tmp27_); - for (_tmp28_ = 0; _tmp28_ < result_length1; _tmp28_++) { - const char* _tmp29_; - _tmp29_ = *_tmp26_; - dbus_message_iter_append_basic (&_tmp27_, DBUS_TYPE_OBJECT_PATH, &_tmp29_); - _tmp26_++; + _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, &_tmp27_); + 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 _tmp30_; + 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); - _tmp30_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp30_); + _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** _tmp31_; - DBusMessageIter _tmp32_; - int _tmp33_; + 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); - _tmp31_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "o", &_tmp32_); - for (_tmp33_ = 0; _tmp33_ < result_length1; _tmp33_++) { - const char* _tmp34_; - _tmp34_ = *_tmp31_; - dbus_message_iter_append_basic (&_tmp32_, DBUS_TYPE_OBJECT_PATH, &_tmp34_); - _tmp31_++; + _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, &_tmp32_); + 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 _tmp35_; + 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); - _tmp35_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_UINT32, &_tmp35_); + _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); } @@ -866,14 +888,16 @@ GType media_container1_get_type (void) { - static GType media_container1_type_id = 0; - if (media_container1_type_id == 0) { + 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; + return media_container1_type_id__volatile; } @@ -955,24 +979,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp36_; - const char* _tmp37_; + const char* _tmp454_; + const char* _tmp455_; char** _result; int _result_length1; - char** _tmp38_; - int _tmp38__length; - int _tmp38__size; - int _tmp38__length1; - DBusMessageIter _tmp39_; + 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); - _tmp36_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp36_); - _tmp37_ = "Items"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp37_); + _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); @@ -996,25 +1020,25 @@ return NULL; } _result_length1 = 0; - _tmp38_ = g_new (char*, 5); - _tmp38__length = 0; - _tmp38__size = 4; - _tmp38__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp39_); - for (; dbus_message_iter_get_arg_type (&_tmp39_); _tmp38__length1++) { - const char* _tmp40_; - if (_tmp38__size == _tmp38__length) { - _tmp38__size = 2 * _tmp38__size; - _tmp38_ = g_renew (char*, _tmp38_, _tmp38__size + 1); + _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 (&_tmp39_, &_tmp40_); - dbus_message_iter_next (&_tmp39_); - _tmp38_[_tmp38__length++] = g_strdup (_tmp40_); + dbus_message_iter_get_basic (&_tmp457_, &_tmp458_); + dbus_message_iter_next (&_tmp457_); + _tmp456_[_tmp456__length++] = g_strdup (_tmp458_); } - _result_length1 = _tmp38__length1; - _tmp38_[_tmp38__length] = NULL; + _result_length1 = _tmp456__length1; + _tmp456_[_tmp456__length] = NULL; dbus_message_iter_next (&_subiter); - _result = _tmp38_; + _result = _tmp456_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -1026,19 +1050,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp41_; - const char* _tmp42_; + const char* _tmp459_; + const char* _tmp460_; guint _result; - dbus_uint32_t _tmp43_; + 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); - _tmp41_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp41_); - _tmp42_ = "ItemCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp42_); + _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); @@ -1061,9 +1085,9 @@ dbus_message_unref (_reply); return 0U; } - dbus_message_iter_get_basic (&_subiter, &_tmp43_); + dbus_message_iter_get_basic (&_subiter, &_tmp461_); dbus_message_iter_next (&_subiter); - _result = _tmp43_; + _result = _tmp461_; dbus_message_unref (_reply); return _result; } @@ -1074,24 +1098,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp44_; - const char* _tmp45_; + const char* _tmp462_; + const char* _tmp463_; char** _result; int _result_length1; - char** _tmp46_; - int _tmp46__length; - int _tmp46__size; - int _tmp46__length1; - DBusMessageIter _tmp47_; + 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); - _tmp44_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp44_); - _tmp45_ = "Containers"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp45_); + _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); @@ -1115,25 +1139,25 @@ return NULL; } _result_length1 = 0; - _tmp46_ = g_new (char*, 5); - _tmp46__length = 0; - _tmp46__size = 4; - _tmp46__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp47_); - for (; dbus_message_iter_get_arg_type (&_tmp47_); _tmp46__length1++) { - const char* _tmp48_; - if (_tmp46__size == _tmp46__length) { - _tmp46__size = 2 * _tmp46__size; - _tmp46_ = g_renew (char*, _tmp46_, _tmp46__size + 1); + _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 (&_tmp47_, &_tmp48_); - dbus_message_iter_next (&_tmp47_); - _tmp46_[_tmp46__length++] = g_strdup (_tmp48_); + dbus_message_iter_get_basic (&_tmp465_, &_tmp466_); + dbus_message_iter_next (&_tmp465_); + _tmp464_[_tmp464__length++] = g_strdup (_tmp466_); } - _result_length1 = _tmp46__length1; - _tmp46_[_tmp46__length] = NULL; + _result_length1 = _tmp464__length1; + _tmp464_[_tmp464__length] = NULL; dbus_message_iter_next (&_subiter); - _result = _tmp46_; + _result = _tmp464_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -1145,19 +1169,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp49_; - const char* _tmp50_; + const char* _tmp467_; + const char* _tmp468_; guint _result; - dbus_uint32_t _tmp51_; + 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); - _tmp49_ = "org.gnome.UPnP.MediaContainer1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp49_); - _tmp50_ = "ContainerCount"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp50_); + _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); @@ -1180,9 +1204,9 @@ dbus_message_unref (_reply); return 0U; } - dbus_message_iter_get_basic (&_subiter, &_tmp51_); + dbus_message_iter_get_basic (&_subiter, &_tmp469_); dbus_message_iter_next (&_subiter); - _result = _tmp51_; + _result = _tmp469_; dbus_message_unref (_reply); return _result; } @@ -1255,56 +1279,56 @@ DBusMessage* reply; DBusMessageIter iter, reply_iter, subiter; char* interface_name; - const char* _tmp52_; + const char* _tmp0_; char* property_name; - const char* _tmp53_; + 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, &_tmp52_); + dbus_message_iter_get_basic (&iter, &_tmp0_); dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp52_); - dbus_message_iter_get_basic (&iter, &_tmp53_); + interface_name = g_strdup (_tmp0_); + dbus_message_iter_get_basic (&iter, &_tmp1_); dbus_message_iter_next (&iter); - property_name = g_strdup (_tmp53_); + property_name = g_strdup (_tmp1_); if ((strcmp (interface_name, "org.gnome.UPnP.MediaItem1") == 0) && (strcmp (property_name, "URLs") == 0)) { char** result; int result_length1; - char** _tmp54_; - DBusMessageIter _tmp55_; - int _tmp56_; + char** _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); - _tmp54_ = result; - dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "s", &_tmp55_); - for (_tmp56_ = 0; _tmp56_ < result_length1; _tmp56_++) { - const char* _tmp57_; - _tmp57_ = *_tmp54_; - dbus_message_iter_append_basic (&_tmp55_, DBUS_TYPE_STRING, &_tmp57_); - _tmp54_++; + _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, &_tmp55_); + 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)) { char* result; - const char* _tmp58_; + const char* _tmp6_; dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); result = media_item1_get_MIMEType (self); - _tmp58_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp58_); + _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)) { char* result; - const char* _tmp59_; + const char* _tmp7_; dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter); result = media_item1_get_Type (self); - _tmp59_ = result; - dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp59_); + _tmp7_ = result; + dbus_message_iter_append_basic (&subiter, DBUS_TYPE_STRING, &_tmp7_); _g_free0 (result); dbus_message_iter_close_container (&reply_iter, &subiter); } else { @@ -1327,7 +1351,7 @@ DBusMessage* reply; DBusMessageIter iter, reply_iter, subiter, entry_iter, value_iter; char* interface_name; - const char* _tmp60_; + const char* _tmp8_; const char* property_name; if (strcmp (dbus_message_get_signature (message), "s")) { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -1335,59 +1359,59 @@ 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, &_tmp60_); + dbus_message_iter_get_basic (&iter, &_tmp8_); dbus_message_iter_next (&iter); - interface_name = g_strdup (_tmp60_); + 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); { char** result; int result_length1; - char** _tmp61_; - DBusMessageIter _tmp62_; - int _tmp63_; + char** _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); - _tmp61_ = result; - dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "s", &_tmp62_); - for (_tmp63_ = 0; _tmp63_ < result_length1; _tmp63_++) { - const char* _tmp64_; - _tmp64_ = *_tmp61_; - dbus_message_iter_append_basic (&_tmp62_, DBUS_TYPE_STRING, &_tmp64_); - _tmp61_++; + _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, &_tmp62_); + 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); } { char* result; - const char* _tmp65_; + 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); - _tmp65_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp65_); + _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); } { char* result; - const char* _tmp66_; + 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); - _tmp66_ = result; - dbus_message_iter_append_basic (&value_iter, DBUS_TYPE_STRING, &_tmp66_); + _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); @@ -1439,6 +1463,7 @@ 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)); @@ -1447,14 +1472,16 @@ GType media_item1_get_type (void) { - static GType media_item1_type_id = 0; - if (media_item1_type_id == 0) { + 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; + return media_item1_type_id__volatile; } @@ -1508,6 +1535,7 @@ G_OBJECT_CLASS (klass)->dispose = media_item1_dbus_proxy_dispose; G_OBJECT_CLASS (klass)->get_property = media_item1_dbus_proxy_get_property; G_OBJECT_CLASS (klass)->set_property = 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"); } @@ -1522,24 +1550,24 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp67_; - const char* _tmp68_; + const char* _tmp470_; + const char* _tmp471_; char** _result; int _result_length1; - char** _tmp69_; - int _tmp69__length; - int _tmp69__size; - int _tmp69__length1; - DBusMessageIter _tmp70_; + char** _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); - _tmp67_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp67_); - _tmp68_ = "URLs"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp68_); + _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); @@ -1563,25 +1591,25 @@ return NULL; } _result_length1 = 0; - _tmp69_ = g_new (char*, 5); - _tmp69__length = 0; - _tmp69__size = 4; - _tmp69__length1 = 0; - dbus_message_iter_recurse (&_subiter, &_tmp70_); - for (; dbus_message_iter_get_arg_type (&_tmp70_); _tmp69__length1++) { - const char* _tmp71_; - if (_tmp69__size == _tmp69__length) { - _tmp69__size = 2 * _tmp69__size; - _tmp69_ = g_renew (char*, _tmp69_, _tmp69__size + 1); + _tmp472_ = g_new (char*, 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 (char*, _tmp472_, _tmp472__size + 1); } - dbus_message_iter_get_basic (&_tmp70_, &_tmp71_); - dbus_message_iter_next (&_tmp70_); - _tmp69_[_tmp69__length++] = g_strdup (_tmp71_); + dbus_message_iter_get_basic (&_tmp473_, &_tmp474_); + dbus_message_iter_next (&_tmp473_); + _tmp472_[_tmp472__length++] = g_strdup (_tmp474_); } - _result_length1 = _tmp69__length1; - _tmp69_[_tmp69__length] = NULL; + _result_length1 = _tmp472__length1; + _tmp472_[_tmp472__length] = NULL; dbus_message_iter_next (&_subiter); - _result = _tmp69_; + _result = _tmp472_; *result_length1 = _result_length1; dbus_message_unref (_reply); return _result; @@ -1593,19 +1621,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp72_; - const char* _tmp73_; + const char* _tmp475_; + const char* _tmp476_; char* _result; - const char* _tmp74_; + 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); - _tmp72_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp72_); - _tmp73_ = "MIMEType"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp73_); + _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); @@ -1628,9 +1656,9 @@ dbus_message_unref (_reply); return NULL; } - dbus_message_iter_get_basic (&_subiter, &_tmp74_); + dbus_message_iter_get_basic (&_subiter, &_tmp477_); dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp74_); + _result = g_strdup (_tmp477_); dbus_message_unref (_reply); return _result; } @@ -1641,19 +1669,19 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter, _subiter; - const char* _tmp75_; - const char* _tmp76_; + const char* _tmp478_; + const char* _tmp479_; char* _result; - const char* _tmp77_; + 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); - _tmp75_ = "org.gnome.UPnP.MediaItem1"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp75_); - _tmp76_ = "Type"; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp76_); + _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); @@ -1676,9 +1704,9 @@ dbus_message_unref (_reply); return NULL; } - dbus_message_iter_get_basic (&_subiter, &_tmp77_); + dbus_message_iter_get_basic (&_subiter, &_tmp480_); dbus_message_iter_next (&_subiter); - _result = g_strdup (_tmp77_); + _result = g_strdup (_tmp480_); dbus_message_unref (_reply); return _result; } @@ -1717,24 +1745,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/rygel/Services2.c gnome-dvb-daemon-0.1.21/src/rygel/Services2.c --- gnome-dvb-daemon-0.1.16/src/rygel/Services2.c 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Services2.c 2010-08-21 20:42:33.000000000 +0000 @@ -0,0 +1,1611 @@ +/* Services2.c generated by valac 0.9.7, the Vala compiler + * generated from Services2.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 +#include + + +#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)) +#define MEDIA_CONTAINER2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_CONTAINER2, MediaContainer2Iface)) + +typedef struct _MediaContainer2 MediaContainer2; +typedef struct _MediaContainer2Iface MediaContainer2Iface; + +#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)) +#define MEDIA_OBJECT2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_OBJECT2, MediaObject2Iface)) + +typedef struct _MediaObject2 MediaObject2; +typedef struct _MediaObject2Iface MediaObject2Iface; + +#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)) +#define DVB_MEDIA_SERVER2_IS_DEVICE_GROUPS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2)) +#define DVB_MEDIA_SERVER2_IS_DEVICE_GROUPS_MEDIA_CONTAINER2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2)) +#define DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2, DVBMediaServer2DeviceGroupsMediaContainer2Class)) + +typedef struct _DVBMediaServer2DeviceGroupsMediaContainer2 DVBMediaServer2DeviceGroupsMediaContainer2; +typedef struct _DVBMediaServer2DeviceGroupsMediaContainer2Class DVBMediaServer2DeviceGroupsMediaContainer2Class; +typedef struct _DVBMediaServer2DeviceGroupsMediaContainer2Private DVBMediaServer2DeviceGroupsMediaContainer2Private; + +#define DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2 (dvb_media_server2_channels_media_container2_get_type ()) +#define DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, DVBMediaServer2ChannelsMediaContainer2)) +#define DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, DVBMediaServer2ChannelsMediaContainer2Class)) +#define DVB_MEDIA_SERVER2_IS_CHANNELS_MEDIA_CONTAINER2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2)) +#define DVB_MEDIA_SERVER2_IS_CHANNELS_MEDIA_CONTAINER2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2)) +#define DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, DVBMediaServer2ChannelsMediaContainer2Class)) + +typedef struct _DVBMediaServer2ChannelsMediaContainer2 DVBMediaServer2ChannelsMediaContainer2; +typedef struct _DVBMediaServer2ChannelsMediaContainer2Class DVBMediaServer2ChannelsMediaContainer2Class; +#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))) +typedef struct _DBusObjectVTable _DBusObjectVTable; +#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 ()) +#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 _DVBMediaServer2ChannelsMediaContainer2Private DVBMediaServer2ChannelsMediaContainer2Private; + +#define DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2 (dvb_media_server2_channel_media_item2_get_type ()) +#define DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, DVBMediaServer2ChannelMediaItem2)) +#define DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, DVBMediaServer2ChannelMediaItem2Class)) +#define DVB_MEDIA_SERVER2_IS_CHANNEL_MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2)) +#define DVB_MEDIA_SERVER2_IS_CHANNEL_MEDIA_ITEM2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2)) +#define DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, DVBMediaServer2ChannelMediaItem2Class)) + +typedef struct _DVBMediaServer2ChannelMediaItem2 DVBMediaServer2ChannelMediaItem2; +typedef struct _DVBMediaServer2ChannelMediaItem2Class DVBMediaServer2ChannelMediaItem2Class; + +#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_ITEM2 (media_item2_get_type ()) +#define MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_ITEM2, MediaItem2)) +#define IS_MEDIA_ITEM2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_ITEM2)) +#define MEDIA_ITEM2_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MEDIA_ITEM2, MediaItem2Iface)) + +typedef struct _MediaItem2 MediaItem2; +typedef struct _MediaItem2Iface MediaItem2Iface; +typedef struct _DVBMediaServer2ChannelMediaItem2Private DVBMediaServer2ChannelMediaItem2Private; +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +struct _MediaContainer2Iface { + GTypeInterface parent_iface; + GHashTable** (*ListChildren) (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); + GHashTable** (*ListContainers) (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); + GHashTable** (*ListItems) (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); + guint (*get_ChildCount) (MediaContainer2* self); + guint (*get_ItemCount) (MediaContainer2* self); + guint (*get_ContainerCount) (MediaContainer2* self); + gboolean (*get_Searchable) (MediaContainer2* self); +}; + +struct _MediaObject2Iface { + GTypeInterface parent_iface; + char* (*get_Parent) (MediaObject2* self); + char* (*get_DisplayName) (MediaObject2* self); + char* (*get_Type) (MediaObject2* self); + char* (*get_Path) (MediaObject2* self); +}; + +struct _DVBMediaServer2DeviceGroupsMediaContainer2 { + GObject parent_instance; + DVBMediaServer2DeviceGroupsMediaContainer2Private * priv; +}; + +struct _DVBMediaServer2DeviceGroupsMediaContainer2Class { + GObjectClass parent_class; +}; + +struct _DVBMediaServer2DeviceGroupsMediaContainer2Private { + GeeHashMap* containers; + char* path; +}; + +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + +struct _DVBChannelGroupInfo { + gint id; + char* name; +}; + +struct _DVBIDBusManagerIface { + GTypeInterface parent_iface; + gboolean (*GetScannerForDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** opath, char** 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 char* channels_conf, const char* recordings_dir, const char* name, GError** error); + gboolean (*GetNameOfRegisteredDevice) (DVBIDBusManager* self, guint adapter, guint frontend, char** name, GError** error); + gint (*GetDeviceGroupSize) (DVBIDBusManager* self, GError** error); + DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); + gboolean (*AddChannelGroup) (DVBIDBusManager* self, const char* 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 _DVBMediaServer2ChannelsMediaContainer2 { + GObject parent_instance; + DVBMediaServer2ChannelsMediaContainer2Private * priv; + char* parent; +}; + +struct _DVBMediaServer2ChannelsMediaContainer2Class { + GObjectClass parent_class; +}; + +struct _DVBMediaServer2ChannelsMediaContainer2Private { + DVBDeviceGroup* device_group; + GeeHashMap* items; +}; + +struct _MediaItem2Iface { + GTypeInterface parent_iface; + char** (*get_URLs) (MediaItem2* self, int* result_length1); + char* (*get_MIMEType) (MediaItem2* self); +}; + +struct _DVBMediaServer2ChannelMediaItem2 { + GObject parent_instance; + DVBMediaServer2ChannelMediaItem2Private * priv; +}; + +struct _DVBMediaServer2ChannelMediaItem2Class { + GObjectClass parent_class; +}; + +struct _DVBMediaServer2ChannelMediaItem2Private { + DVBChannel* channel; + char* parent; +}; + + +static gpointer dvb_media_server2_device_groups_media_container2_parent_class = NULL; +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; +static MediaContainer2Iface* dvb_media_server2_channels_media_container2_media_container2_parent_iface = NULL; +static MediaObject2Iface* dvb_media_server2_channels_media_container2_media_object2_parent_iface = NULL; +static gpointer dvb_media_server2_channel_media_item2_parent_class = NULL; +static MediaItem2Iface* dvb_media_server2_channel_media_item2_media_item2_parent_iface = NULL; +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; + +#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_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 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 +}; +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); +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); +char* 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 dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self); +static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +guint dvb_media_server2_get_num_elements (gint items, guint offset, guint max); +char* media_object2_get_DisplayName (MediaObject2* self); +guint media_container2_get_ChildCount (MediaContainer2* self); +gboolean media_container2_get_Searchable (MediaContainer2* self); +char* media_object2_get_Type (MediaObject2* self); +static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +GHashTable** media_container2_ListContainers (MediaContainer2* self, guint offset, guint max, char** 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, char** filter, int filter_length1, int* result_length1, GError** error); +static void dvb_media_server2_device_groups_media_container2_on_device_added (DVBMediaServer2DeviceGroupsMediaContainer2* self, guint group_id); +DVBDeviceGroup* dvb_manager_get_device_group_if_exists (DVBManager* self, guint group_id); +static void dvb_media_server2_device_groups_media_container2_on_device_removed (DVBMediaServer2DeviceGroupsMediaContainer2* self, guint group_id); +DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_device_groups_media_container2_new (void); +DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_device_groups_media_container2_construct (GType object_type); +guint media_container2_get_ContainerCount (MediaContainer2* self); +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_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 GObject * dvb_media_server2_device_groups_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); +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 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 +}; +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_server2_channels_media_container2_create_service (DVBMediaServer2ChannelsMediaContainer2* self, DVBChannel* channel); +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, char** 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); +char* media_item2_get_MIMEType (MediaItem2* self); +char** media_item2_get_URLs (MediaItem2* self, int* result_length1); +static GHashTable** dvb_media_server2_channels_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, char** 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, char** filter, int filter_length1, int* result_length1, GError** error); +GHashTable** media_container2_ListItems (MediaContainer2* self, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error); +const char* dvb_device_group_get_Name (DVBDeviceGroup* self); +static GObject * dvb_media_server2_channels_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); +static void dvb_media_server2_channels_media_container2_finalize (GObject* obj); +static void 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 +}; +guint dvb_channel_get_GroupId (DVBChannel* self); +const char* dvb_channel_get_Name (DVBChannel* self); +char* dvb_channel_get_URL (DVBChannel* self); +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); +static void dvb_media_server2_channel_media_item2_finalize (GObject* obj); +static void 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 char* 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_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 gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +void dvb_media_server2_device_groups_media_container2_create_container_services (DVBMediaServer2DeviceGroupsMediaContainer2* self) { + DVBManager* manager; + g_return_if_fail (self != NULL); + manager = _g_object_ref0 (dvb_manager_get_instance ()); + { + GeeCollection* _tmp0_; + GeeIterator* _tmp1_; + GeeIterator* _devgroup_it; + _devgroup_it = (_tmp1_ = gee_iterable_iterator ((GeeIterable*) (_tmp0_ = dvb_manager_get_device_groups (manager))), _g_object_unref0 (_tmp0_), _tmp1_); + while (TRUE) { + DVBDeviceGroup* devgroup; + if (!gee_iterator_next (_devgroup_it)) { + break; + } + devgroup = (DVBDeviceGroup*) gee_iterator_get (_devgroup_it); + dvb_media_server2_device_groups_media_container2_create_service (self, devgroup); + _g_object_unref0 (devgroup); + } + _g_object_unref0 (_devgroup_it); + } + _g_object_unref0 (manager); +} + + +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_media_server2_device_groups_media_container2_create_service (DVBMediaServer2DeviceGroupsMediaContainer2* self, DVBDeviceGroup* devgroup) { + DBusGConnection* conn; + DVBMediaServer2ChannelsMediaContainer2* devgroup_container; + char* _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (devgroup != NULL); + g_debug ("Services2.vala:59: Creating container for device group %u", dvb_device_group_get_Id (devgroup)); + conn = dvb_utils_get_dbus_connection (); + if (conn == NULL) { + g_critical ("Services2.vala:63: Could not get DBus connection"); + _dbus_g_connection_unref0 (conn); + return; + } + devgroup_container = dvb_media_server2_channels_media_container2_new (devgroup, self->priv->path); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp0_ = media_object2_get_Path ((MediaObject2*) devgroup_container), (GObject*) devgroup_container); + _g_free0 (_tmp0_); + dvb_media_server2_channels_media_container2_create_item_services (devgroup_container); + gee_abstract_map_set ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (dvb_device_group_get_Id (devgroup)), devgroup_container); + _g_object_unref0 (devgroup_container); + _dbus_g_connection_unref0 (conn); +} + + +static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + GHashTable** result = NULL; + guint num_elements; + gint hash_length1; + gint _hash_size_; + GHashTable** _tmp0_; + GHashTable** hash; + gint i; + GHashTable** _tmp10_; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + num_elements = dvb_media_server2_get_num_elements (gee_map_get_size ((GeeMap*) self->priv->containers), offset, max); + hash = (_tmp0_ = g_new0 (GHashTable*, num_elements + 1), hash_length1 = num_elements, _hash_size_ = hash_length1, _tmp0_); + i = 0; + { + GeeCollection* _tmp1_; + GeeIterator* _tmp2_; + GeeIterator* _container_it; + _container_it = (_tmp2_ = gee_iterable_iterator ((GeeIterable*) (_tmp1_ = gee_map_get_values ((GeeMap*) self->priv->containers))), _g_object_unref0 (_tmp1_), _tmp2_); + while (TRUE) { + DVBMediaServer2ChannelsMediaContainer2* container; + if (!gee_iterator_next (_container_it)) { + break; + } + container = (DVBMediaServer2ChannelsMediaContainer2*) gee_iterator_get (_container_it); + if (i >= offset) { + guint index; + GHashTable* _tmp3_; + GValue* _tmp4_ = NULL; + GValue* _tmp5_ = NULL; + GValue* _tmp6_ = NULL; + GValue* _tmp7_ = NULL; + GValue* _tmp8_ = NULL; + GValue* _tmp9_ = NULL; + index = i - offset; + hash[index] = (_tmp3_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free), _g_hash_table_unref0 (hash[index]), _tmp3_); + g_hash_table_insert (hash[index], g_strdup ("Path"), (_tmp4_ = g_new0 (GValue, 1), g_value_init (_tmp4_, G_TYPE_STRING), g_value_take_string (_tmp4_, media_object2_get_Path ((MediaObject2*) container)), _tmp4_)); + g_hash_table_insert (hash[index], g_strdup ("DisplayName"), (_tmp5_ = g_new0 (GValue, 1), g_value_init (_tmp5_, G_TYPE_STRING), g_value_take_string (_tmp5_, media_object2_get_DisplayName ((MediaObject2*) container)), _tmp5_)); + g_hash_table_insert (hash[index], g_strdup ("ChildCount"), (_tmp6_ = g_new0 (GValue, 1), g_value_init (_tmp6_, G_TYPE_UINT), g_value_set_uint (_tmp6_, media_container2_get_ChildCount ((MediaContainer2*) container)), _tmp6_)); + g_hash_table_insert (hash[index], g_strdup ("Searchable"), (_tmp7_ = g_new0 (GValue, 1), g_value_init (_tmp7_, G_TYPE_BOOLEAN), g_value_set_boolean (_tmp7_, media_container2_get_Searchable ((MediaContainer2*) container)), _tmp7_)); + g_hash_table_insert (hash[index], g_strdup ("Type"), (_tmp8_ = g_new0 (GValue, 1), g_value_init (_tmp8_, G_TYPE_STRING), g_value_take_string (_tmp8_, media_object2_get_Type ((MediaObject2*) container)), _tmp8_)); + g_hash_table_insert (hash[index], g_strdup ("Parent"), (_tmp9_ = g_new0 (GValue, 1), g_value_init (_tmp9_, G_TYPE_STRING), g_value_take_string (_tmp9_, media_object2_get_Path ((MediaObject2*) self)), _tmp9_)); + } + i++; + if (i >= (offset + num_elements)) { + _g_object_unref0 (container); + break; + } + _g_object_unref0 (container); + } + _g_object_unref0 (_container_it); + } + result = (_tmp10_ = hash, *result_length1 = hash_length1, _tmp10_); + return result; + hash = (_vala_array_free (hash, hash_length1, (GDestroyNotify) g_hash_table_unref), NULL); +} + + +static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + GHashTable** result = NULL; + gint _tmp1__length1; + gint __tmp1__size_; + GHashTable** _tmp2_; + gint _tmp0_; + GHashTable** _tmp1_; + GHashTable** _tmp3_; + GError * _inner_error_ = NULL; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + _tmp1_ = (_tmp2_ = media_container2_ListContainers ((MediaContainer2*) self, offset, max, filter, filter_length1, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + 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; + } + } + result = (_tmp3_ = _tmp1_, *result_length1 = _tmp1__length1, _tmp3_); + return result; +} + + +static GHashTable** dvb_media_server2_device_groups_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + GHashTable** result = NULL; + GHashTable** _tmp0_; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = (_tmp0_ = g_new0 (GHashTable*, 0 + 1), *result_length1 = 0, _tmp0_); + return result; +} + + +static void dvb_media_server2_device_groups_media_container2_on_device_added (DVBMediaServer2DeviceGroupsMediaContainer2* self, guint group_id) { + DVBManager* manager; + DVBDeviceGroup* devgroup; + g_return_if_fail (self != NULL); + manager = _g_object_ref0 (dvb_manager_get_instance ()); + devgroup = dvb_manager_get_device_group_if_exists (manager, group_id); + dvb_media_server2_device_groups_media_container2_create_service (self, devgroup); + g_signal_emit_by_name ((MediaContainer2*) self, "updated"); + _g_object_unref0 (devgroup); + _g_object_unref0 (manager); +} + + +static void dvb_media_server2_device_groups_media_container2_on_device_removed (DVBMediaServer2DeviceGroupsMediaContainer2* 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 ((MediaContainer2*) self, "updated"); +} + + +DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_device_groups_media_container2_construct (GType object_type) { + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) g_object_new (object_type, NULL); + return self; +} + + +DVBMediaServer2DeviceGroupsMediaContainer2* dvb_media_server2_device_groups_media_container2_new (void) { + return dvb_media_server2_device_groups_media_container2_construct (DVB_MEDIA_SERVER2_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER2); +} + + +static char* dvb_media_server2_device_groups_media_container2_real_get_Parent (MediaObject2* base) { + char* result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = g_strdup (self->priv->path); + return result; +} + + +static char* dvb_media_server2_device_groups_media_container2_real_get_Path (MediaObject2* base) { + char* result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = g_strdup (DVB_MEDIA_SERVER2_ROOT_PATH); + return result; +} + + +static char* dvb_media_server2_device_groups_media_container2_real_get_DisplayName (MediaObject2* base) { + char* result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = g_strdup ("@REALNAME@'s TV on @HOSTNAME@"); + return result; +} + + +static char* dvb_media_server2_device_groups_media_container2_real_get_Type (MediaObject2* base) { + char* result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = g_strdup ("container"); + return result; +} + + +static guint dvb_media_server2_device_groups_media_container2_real_get_ItemCount (MediaContainer2* base) { + guint result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = (guint) 0; + return result; +} + + +static guint dvb_media_server2_device_groups_media_container2_real_get_ChildCount (MediaContainer2* base) { + guint result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = media_container2_get_ContainerCount ((MediaContainer2*) self); + return result; +} + + +static guint dvb_media_server2_device_groups_media_container2_real_get_ContainerCount (MediaContainer2* base) { + guint result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = (guint) gee_map_get_size ((GeeMap*) self->priv->containers); + return result; +} + + +static gboolean dvb_media_server2_device_groups_media_container2_real_get_Searchable (MediaContainer2* base) { + gboolean result; + DVBMediaServer2DeviceGroupsMediaContainer2* self; + self = (DVBMediaServer2DeviceGroupsMediaContainer2*) base; + result = FALSE; + return result; +} + + +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) { + dvb_media_server2_device_groups_media_container2_on_device_added (self, group_id); +} + + +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) { + dvb_media_server2_device_groups_media_container2_on_device_removed (self, group_id); +} + + +static GObject * dvb_media_server2_device_groups_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { + GObject * obj; + GObjectClass * parent_class; + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + 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); + { + GeeHashMap* _tmp0_; + DVBManager* manager; + char* _tmp1_; + self->priv->containers = (_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), _g_object_unref0 (self->priv->containers), _tmp0_); + manager = _g_object_ref0 (dvb_manager_get_instance ()); + 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); + self->priv->path = (_tmp1_ = g_strdup (DVB_MEDIA_SERVER2_ROOT_PATH), _g_free0 (self->priv->path), _tmp1_); + _g_object_unref0 (manager); + } + return obj; +} + + +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 void dvb_media_server2_device_groups_media_container2_class_init (DVBMediaServer2DeviceGroupsMediaContainer2Class * klass) { + dvb_media_server2_device_groups_media_container2_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBMediaServer2DeviceGroupsMediaContainer2Private)); + G_OBJECT_CLASS (klass)->get_property = 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 = dvb_media_server2_device_groups_media_container2_real_ListContainers; + iface->ListChildren = dvb_media_server2_device_groups_media_container2_real_ListChildren; + iface->ListItems = 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; + iface->get_Searchable = dvb_media_server2_device_groups_media_container2_real_get_Searchable; +} + + +static void dvb_media_server2_device_groups_media_container2_media_object2_interface_init (MediaObject2Iface * iface) { + dvb_media_server2_device_groups_media_container2_media_object2_parent_iface = g_type_interface_peek_parent (iface); + iface->get_Parent = dvb_media_server2_device_groups_media_container2_real_get_Parent; + iface->get_Path = dvb_media_server2_device_groups_media_container2_real_get_Path; + iface->get_DisplayName = dvb_media_server2_device_groups_media_container2_real_get_DisplayName; + iface->get_Type = dvb_media_server2_device_groups_media_container2_real_get_Type; +} + + +static void dvb_media_server2_device_groups_media_container2_instance_init (DVBMediaServer2DeviceGroupsMediaContainer2 * self) { + self->priv = DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2_GET_PRIVATE (self); +} + + +static void dvb_media_server2_device_groups_media_container2_finalize (GObject* obj) { + DVBMediaServer2DeviceGroupsMediaContainer2 * self; + self = DVB_MEDIA_SERVER2_DEVICE_GROUPS_MEDIA_CONTAINER2 (obj); + _g_object_unref0 (self->priv->containers); + _g_free0 (self->priv->path); + G_OBJECT_CLASS (dvb_media_server2_device_groups_media_container2_parent_class)->finalize (obj); +} + + +/** + * Holds all device groups + * + * It only contains containers only and no items + */ +GType dvb_media_server2_device_groups_media_container2_get_type (void) { + static volatile gsize dvb_media_server2_device_groups_media_container2_type_id__volatile = 0; + if (g_once_init_enter (&dvb_media_server2_device_groups_media_container2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServer2DeviceGroupsMediaContainer2Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server2_device_groups_media_container2_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServer2DeviceGroupsMediaContainer2), 0, (GInstanceInitFunc) dvb_media_server2_device_groups_media_container2_instance_init, NULL }; + static const GInterfaceInfo media_container2_info = { (GInterfaceInitFunc) dvb_media_server2_device_groups_media_container2_media_container2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo media_object2_info = { (GInterfaceInitFunc) dvb_media_server2_device_groups_media_container2_media_object2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_media_server2_device_groups_media_container2_type_id; + dvb_media_server2_device_groups_media_container2_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServer2DeviceGroupsMediaContainer2", &g_define_type_info, 0); + g_type_add_interface_static (dvb_media_server2_device_groups_media_container2_type_id, TYPE_MEDIA_CONTAINER2, &media_container2_info); + g_type_add_interface_static (dvb_media_server2_device_groups_media_container2_type_id, TYPE_MEDIA_OBJECT2, &media_object2_info); + g_once_init_leave (&dvb_media_server2_device_groups_media_container2_type_id__volatile, dvb_media_server2_device_groups_media_container2_type_id); + } + return dvb_media_server2_device_groups_media_container2_type_id__volatile; +} + + +static void dvb_media_server2_device_groups_media_container2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + 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; + } +} + + +DVBMediaServer2ChannelsMediaContainer2* dvb_media_server2_channels_media_container2_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent) { + DVBMediaServer2ChannelsMediaContainer2 * self; + DVBDeviceGroup* _tmp0_; + char* _tmp1_; + g_return_val_if_fail (devgroup != NULL, NULL); + g_return_val_if_fail (parent != NULL, NULL); + self = (DVBMediaServer2ChannelsMediaContainer2*) g_object_new (object_type, NULL); + self->priv->device_group = (_tmp0_ = _g_object_ref0 (devgroup), _g_object_unref0 (self->priv->device_group), _tmp0_); + self->parent = (_tmp1_ = g_strdup (parent), _g_free0 (self->parent), _tmp1_); + return self; +} + + +DVBMediaServer2ChannelsMediaContainer2* dvb_media_server2_channels_media_container2_new (DVBDeviceGroup* devgroup, const char* parent) { + return dvb_media_server2_channels_media_container2_construct (DVB_MEDIA_SERVER2_TYPE_CHANNELS_MEDIA_CONTAINER2, devgroup, parent); +} + + +void dvb_media_server2_channels_media_container2_create_item_services (DVBMediaServer2ChannelsMediaContainer2* self) { + g_return_if_fail (self != NULL); + { + GeeIterator* _channel_it; + _channel_it = gee_iterable_iterator ((GeeIterable*) dvb_device_group_get_Channels (self->priv->device_group)); + while (TRUE) { + DVBChannel* channel; + if (!gee_iterator_next (_channel_it)) { + break; + } + channel = (DVBChannel*) gee_iterator_get (_channel_it); + dvb_media_server2_channels_media_container2_create_service (self, channel); + _g_object_unref0 (channel); + } + _g_object_unref0 (_channel_it); + } +} + + +void dvb_media_server2_channels_media_container2_create_service (DVBMediaServer2ChannelsMediaContainer2* self, DVBChannel* channel) { + DBusGConnection* conn; + char* _tmp0_; + char* _tmp1_; + DVBMediaServer2ChannelMediaItem2* _tmp2_; + DVBMediaServer2ChannelMediaItem2* channel_item; + char* _tmp3_; + g_return_if_fail (self != NULL); + g_return_if_fail (channel != NULL); + g_debug ("Services2.vala:204: Creating container for channel %u", dvb_channel_get_Sid (channel)); + conn = dvb_utils_get_dbus_connection (); + if (conn == NULL) { + g_critical ("Services2.vala:208: Could not get DBus connection"); + _dbus_g_connection_unref0 (conn); + return; + } + channel_item = (_tmp2_ = dvb_media_server2_channel_media_item2_new (channel, _tmp1_ = g_strdup (_tmp0_ = media_object2_get_Path ((MediaObject2*) self))), _g_free0 (_tmp1_), _g_free0 (_tmp0_), _tmp2_); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp3_ = media_object2_get_Path ((MediaObject2*) channel_item), (GObject*) channel_item); + _g_free0 (_tmp3_); + gee_abstract_map_set ((GeeAbstractMap*) self->priv->items, GUINT_TO_POINTER (dvb_channel_get_Sid (channel)), channel_item); + _g_object_unref0 (channel_item); + _dbus_g_connection_unref0 (conn); +} + + +static GHashTable** dvb_media_server2_channels_media_container2_real_ListItems (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2ChannelsMediaContainer2 * self; + GHashTable** result = NULL; + guint num_elements; + gint hash_length1; + gint _hash_size_; + GHashTable** _tmp0_; + GHashTable** hash; + guint i; + GHashTable** _tmp11_; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + num_elements = dvb_media_server2_get_num_elements (gee_map_get_size ((GeeMap*) self->priv->items), offset, max); + hash = (_tmp0_ = g_new0 (GHashTable*, num_elements + 1), hash_length1 = num_elements, _hash_size_ = hash_length1, _tmp0_); + i = (guint) 0; + { + GeeCollection* _tmp1_; + GeeIterator* _tmp2_; + GeeIterator* _item_it; + _item_it = (_tmp2_ = gee_iterable_iterator ((GeeIterable*) (_tmp1_ = gee_map_get_values ((GeeMap*) self->priv->items))), _g_object_unref0 (_tmp1_), _tmp2_); + while (TRUE) { + DVBMediaServer2ChannelMediaItem2* item; + if (!gee_iterator_next (_item_it)) { + break; + } + item = (DVBMediaServer2ChannelMediaItem2*) gee_iterator_get (_item_it); + if (i >= offset) { + guint index; + GHashTable* _tmp3_; + GValue* _tmp4_ = NULL; + GValue* _tmp5_ = NULL; + GValue* _tmp6_ = NULL; + GValue* _tmp7_ = NULL; + gint _tmp8_; + GValue* _tmp9_ = NULL; + GValue* _tmp10_ = NULL; + index = i - offset; + hash[index] = (_tmp3_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free), _g_hash_table_unref0 (hash[index]), _tmp3_); + g_hash_table_insert (hash[index], g_strdup ("Path"), (_tmp4_ = g_new0 (GValue, 1), g_value_init (_tmp4_, G_TYPE_STRING), g_value_take_string (_tmp4_, media_object2_get_Path ((MediaObject2*) item)), _tmp4_)); + g_hash_table_insert (hash[index], g_strdup ("DisplayName"), (_tmp5_ = g_new0 (GValue, 1), g_value_init (_tmp5_, G_TYPE_STRING), g_value_take_string (_tmp5_, media_object2_get_DisplayName ((MediaObject2*) item)), _tmp5_)); + g_hash_table_insert (hash[index], g_strdup ("Type"), (_tmp6_ = g_new0 (GValue, 1), g_value_init (_tmp6_, G_TYPE_STRING), g_value_take_string (_tmp6_, media_object2_get_Type ((MediaObject2*) item)), _tmp6_)); + g_hash_table_insert (hash[index], g_strdup ("MIMEType"), (_tmp7_ = g_new0 (GValue, 1), g_value_init (_tmp7_, G_TYPE_STRING), g_value_take_string (_tmp7_, media_item2_get_MIMEType ((MediaItem2*) item)), _tmp7_)); + g_hash_table_insert (hash[index], g_strdup ("URLs"), (_tmp9_ = g_new0 (GValue, 1), g_value_init (_tmp9_, G_TYPE_STRV), g_value_take_boxed (_tmp9_, media_item2_get_URLs ((MediaItem2*) item, &_tmp8_)), _tmp9_)); + g_hash_table_insert (hash[index], g_strdup ("Parent"), (_tmp10_ = g_new0 (GValue, 1), g_value_init (_tmp10_, G_TYPE_STRING), g_value_take_string (_tmp10_, media_object2_get_Path ((MediaObject2*) self)), _tmp10_)); + } + i++; + if (i >= (offset + num_elements)) { + _g_object_unref0 (item); + break; + } + _g_object_unref0 (item); + } + _g_object_unref0 (_item_it); + } + result = (_tmp11_ = hash, *result_length1 = hash_length1, _tmp11_); + return result; + hash = (_vala_array_free (hash, hash_length1, (GDestroyNotify) g_hash_table_unref), NULL); +} + + +static GHashTable** dvb_media_server2_channels_media_container2_real_ListContainers (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2ChannelsMediaContainer2 * self; + GHashTable** result = NULL; + GHashTable** _tmp0_; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = (_tmp0_ = g_new0 (GHashTable*, 0 + 1), *result_length1 = 0, _tmp0_); + return result; +} + + +static GHashTable** dvb_media_server2_channels_media_container2_real_ListChildren (MediaContainer2* base, guint offset, guint max, char** filter, int filter_length1, int* result_length1, GError** error) { + DVBMediaServer2ChannelsMediaContainer2 * self; + GHashTable** result = NULL; + gint _tmp1__length1; + gint __tmp1__size_; + GHashTable** _tmp2_; + gint _tmp0_; + GHashTable** _tmp1_; + GHashTable** _tmp3_; + GError * _inner_error_ = NULL; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + _tmp1_ = (_tmp2_ = media_container2_ListItems ((MediaContainer2*) self, offset, max, filter, filter_length1, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + 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; + } + } + result = (_tmp3_ = _tmp1_, *result_length1 = _tmp1__length1, _tmp3_); + return result; +} + + +static char* dvb_media_server2_channels_media_container2_real_get_Parent (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = g_strdup (self->parent); + return result; +} + + +static char* dvb_media_server2_channels_media_container2_real_get_Path (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = g_strdup_printf (DVB_MEDIA_SERVER2_GROUP_PATH, dvb_device_group_get_Id (self->priv->device_group)); + return result; +} + + +static char* dvb_media_server2_channels_media_container2_real_get_DisplayName (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = g_strdup (dvb_device_group_get_Name (self->priv->device_group)); + return result; +} + + +static char* dvb_media_server2_channels_media_container2_real_get_Type (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = g_strdup ("container"); + return result; +} + + +static guint dvb_media_server2_channels_media_container2_real_get_ChildCount (MediaContainer2* base) { + guint result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = media_container2_get_ItemCount ((MediaContainer2*) self); + return result; +} + + +static guint dvb_media_server2_channels_media_container2_real_get_ItemCount (MediaContainer2* base) { + guint result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = (guint) gee_map_get_size ((GeeMap*) self->priv->items); + return result; +} + + +static guint dvb_media_server2_channels_media_container2_real_get_ContainerCount (MediaContainer2* base) { + guint result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = (guint) 0; + return result; +} + + +static gboolean dvb_media_server2_channels_media_container2_real_get_Searchable (MediaContainer2* base) { + gboolean result; + DVBMediaServer2ChannelsMediaContainer2* self; + self = (DVBMediaServer2ChannelsMediaContainer2*) base; + result = FALSE; + return result; +} + + +static GObject * dvb_media_server2_channels_media_container2_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { + GObject * obj; + GObjectClass * parent_class; + DVBMediaServer2ChannelsMediaContainer2 * self; + 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); + { + GeeHashMap* _tmp0_; + self->priv->items = (_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), _g_object_unref0 (self->priv->items), _tmp0_); + } + return obj; +} + + +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); +} + + +static void dvb_media_server2_channels_media_container2_class_init (DVBMediaServer2ChannelsMediaContainer2Class * klass) { + dvb_media_server2_channels_media_container2_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBMediaServer2ChannelsMediaContainer2Private)); + G_OBJECT_CLASS (klass)->get_property = 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 = dvb_media_server2_channels_media_container2_real_ListItems; + iface->ListContainers = dvb_media_server2_channels_media_container2_real_ListContainers; + iface->ListChildren = 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; + iface->get_Searchable = dvb_media_server2_channels_media_container2_real_get_Searchable; +} + + +static void dvb_media_server2_channels_media_container2_media_object2_interface_init (MediaObject2Iface * iface) { + dvb_media_server2_channels_media_container2_media_object2_parent_iface = g_type_interface_peek_parent (iface); + iface->get_Parent = dvb_media_server2_channels_media_container2_real_get_Parent; + iface->get_Path = dvb_media_server2_channels_media_container2_real_get_Path; + iface->get_DisplayName = dvb_media_server2_channels_media_container2_real_get_DisplayName; + iface->get_Type = dvb_media_server2_channels_media_container2_real_get_Type; +} + + +static void dvb_media_server2_channels_media_container2_instance_init (DVBMediaServer2ChannelsMediaContainer2 * self) { + self->priv = DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2_GET_PRIVATE (self); +} + + +static void dvb_media_server2_channels_media_container2_finalize (GObject* obj) { + DVBMediaServer2ChannelsMediaContainer2 * self; + self = DVB_MEDIA_SERVER2_CHANNELS_MEDIA_CONTAINER2 (obj); + _g_free0 (self->parent); + _g_object_unref0 (self->priv->device_group); + _g_object_unref0 (self->priv->items); + G_OBJECT_CLASS (dvb_media_server2_channels_media_container2_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_server2_channels_media_container2_get_type (void) { + static volatile gsize dvb_media_server2_channels_media_container2_type_id__volatile = 0; + if (g_once_init_enter (&dvb_media_server2_channels_media_container2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServer2ChannelsMediaContainer2Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server2_channels_media_container2_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServer2ChannelsMediaContainer2), 0, (GInstanceInitFunc) dvb_media_server2_channels_media_container2_instance_init, NULL }; + static const GInterfaceInfo media_container2_info = { (GInterfaceInitFunc) dvb_media_server2_channels_media_container2_media_container2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo media_object2_info = { (GInterfaceInitFunc) dvb_media_server2_channels_media_container2_media_object2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_media_server2_channels_media_container2_type_id; + dvb_media_server2_channels_media_container2_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServer2ChannelsMediaContainer2", &g_define_type_info, 0); + g_type_add_interface_static (dvb_media_server2_channels_media_container2_type_id, TYPE_MEDIA_CONTAINER2, &media_container2_info); + g_type_add_interface_static (dvb_media_server2_channels_media_container2_type_id, TYPE_MEDIA_OBJECT2, &media_object2_info); + g_once_init_leave (&dvb_media_server2_channels_media_container2_type_id__volatile, dvb_media_server2_channels_media_container2_type_id); + } + return dvb_media_server2_channels_media_container2_type_id__volatile; +} + + +static void dvb_media_server2_channels_media_container2_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + 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; + } +} + + +DVBMediaServer2ChannelMediaItem2* dvb_media_server2_channel_media_item2_construct (GType object_type, DVBChannel* channel, const char* parent) { + DVBMediaServer2ChannelMediaItem2 * self; + DVBChannel* _tmp0_; + char* _tmp1_; + g_return_val_if_fail (channel != NULL, NULL); + g_return_val_if_fail (parent != NULL, NULL); + self = (DVBMediaServer2ChannelMediaItem2*) g_object_new (object_type, NULL); + self->priv->channel = (_tmp0_ = _g_object_ref0 (channel), _g_object_unref0 (self->priv->channel), _tmp0_); + self->priv->parent = (_tmp1_ = g_strdup (parent), _g_free0 (self->priv->parent), _tmp1_); + return self; +} + + +DVBMediaServer2ChannelMediaItem2* dvb_media_server2_channel_media_item2_new (DVBChannel* channel, const char* parent) { + return dvb_media_server2_channel_media_item2_construct (DVB_MEDIA_SERVER2_TYPE_CHANNEL_MEDIA_ITEM2, channel, parent); +} + + +static char* dvb_media_server2_channel_media_item2_real_get_Parent (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelMediaItem2* self; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = g_strdup (self->priv->parent); + return result; +} + + +static char* dvb_media_server2_channel_media_item2_real_get_Path (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelMediaItem2* self; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = g_strdup_printf (DVB_MEDIA_SERVER2_CHANNEL_PATH, dvb_channel_get_GroupId (self->priv->channel), dvb_channel_get_Sid (self->priv->channel)); + return result; +} + + +static char* dvb_media_server2_channel_media_item2_real_get_DisplayName (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelMediaItem2* self; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = g_strdup (dvb_channel_get_Name (self->priv->channel)); + return result; +} + + +static char** dvb_media_server2_channel_media_item2_real_get_URLs (MediaItem2* base, int* result_length1) { + char** result; + DVBMediaServer2ChannelMediaItem2* self; + char** _tmp0_ = NULL; + char** _tmp1_; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = (_tmp1_ = (_tmp0_ = g_new0 (char*, 1 + 1), _tmp0_[0] = dvb_channel_get_URL (self->priv->channel), _tmp0_), *result_length1 = 1, _tmp1_); + return result; +} + + +static char* dvb_media_server2_channel_media_item2_real_get_MIMEType (MediaItem2* base) { + char* result; + DVBMediaServer2ChannelMediaItem2* self; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = g_strdup ("video/mpeg"); + return result; +} + + +static char* dvb_media_server2_channel_media_item2_real_get_Type (MediaObject2* base) { + char* result; + DVBMediaServer2ChannelMediaItem2* self; + self = (DVBMediaServer2ChannelMediaItem2*) base; + result = g_strdup ("video"); + return result; +} + + +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); +} + + +static void dvb_media_server2_channel_media_item2_class_init (DVBMediaServer2ChannelMediaItem2Class * klass) { + dvb_media_server2_channel_media_item2_parent_class = g_type_class_peek_parent (klass); + g_type_class_add_private (klass, sizeof (DVBMediaServer2ChannelMediaItem2Private)); + G_OBJECT_CLASS (klass)->get_property = 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)); +} + + +static void dvb_media_server2_channel_media_item2_media_item2_interface_init (MediaItem2Iface * iface) { + dvb_media_server2_channel_media_item2_media_item2_parent_iface = g_type_interface_peek_parent (iface); + iface->get_URLs = dvb_media_server2_channel_media_item2_real_get_URLs; + iface->get_MIMEType = dvb_media_server2_channel_media_item2_real_get_MIMEType; +} + + +static void dvb_media_server2_channel_media_item2_media_object2_interface_init (MediaObject2Iface * iface) { + dvb_media_server2_channel_media_item2_media_object2_parent_iface = g_type_interface_peek_parent (iface); + iface->get_Parent = dvb_media_server2_channel_media_item2_real_get_Parent; + iface->get_Path = dvb_media_server2_channel_media_item2_real_get_Path; + iface->get_DisplayName = dvb_media_server2_channel_media_item2_real_get_DisplayName; + iface->get_Type = dvb_media_server2_channel_media_item2_real_get_Type; +} + + +static void dvb_media_server2_channel_media_item2_instance_init (DVBMediaServer2ChannelMediaItem2 * self) { + self->priv = DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2_GET_PRIVATE (self); +} + + +static void dvb_media_server2_channel_media_item2_finalize (GObject* obj) { + DVBMediaServer2ChannelMediaItem2 * self; + self = DVB_MEDIA_SERVER2_CHANNEL_MEDIA_ITEM2 (obj); + _g_object_unref0 (self->priv->channel); + _g_free0 (self->priv->parent); + G_OBJECT_CLASS (dvb_media_server2_channel_media_item2_parent_class)->finalize (obj); +} + + +/** + * Holds a single channel + */ +GType dvb_media_server2_channel_media_item2_get_type (void) { + static volatile gsize dvb_media_server2_channel_media_item2_type_id__volatile = 0; + if (g_once_init_enter (&dvb_media_server2_channel_media_item2_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DVBMediaServer2ChannelMediaItem2Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_media_server2_channel_media_item2_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBMediaServer2ChannelMediaItem2), 0, (GInstanceInitFunc) dvb_media_server2_channel_media_item2_instance_init, NULL }; + static const GInterfaceInfo media_item2_info = { (GInterfaceInitFunc) dvb_media_server2_channel_media_item2_media_item2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo media_object2_info = { (GInterfaceInitFunc) dvb_media_server2_channel_media_item2_media_object2_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_media_server2_channel_media_item2_type_id; + dvb_media_server2_channel_media_item2_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBMediaServer2ChannelMediaItem2", &g_define_type_info, 0); + g_type_add_interface_static (dvb_media_server2_channel_media_item2_type_id, TYPE_MEDIA_ITEM2, &media_item2_info); + g_type_add_interface_static (dvb_media_server2_channel_media_item2_type_id, TYPE_MEDIA_OBJECT2, &media_object2_info); + g_once_init_leave (&dvb_media_server2_channel_media_item2_type_id__volatile, dvb_media_server2_channel_media_item2_type_id); + } + return dvb_media_server2_channel_media_item2_type_id__volatile; +} + + +static void 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; + } +} + + +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; + } else { + num_elements = max; + } + } else { + num_elements = items - offset; + } + result = num_elements; + return result; +} + + +static guint _dynamic_RequestName2 (DBusGProxy* self, const char* 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_server2_start_rygel_services (void) { + gboolean result = FALSE; + GError * _inner_error_ = NULL; + { + DBusGConnection* conn; + DBusGProxy* bus; + guint request_name_result; + conn = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch190_g_error; + } + bus = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); + request_name_result = _dynamic_RequestName2 (bus, DVB_MEDIA_SERVER2_SERVICE_NAME, (guint) 0, &_inner_error_); + 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) { + DVBMediaServer2DeviceGroupsMediaContainer2* _tmp0_; + char* _tmp1_; + g_message ("Services2.vala:388: Creating new Rygel MediaServer D-Bus service"); + dvb_media_server2_root_container = (_tmp0_ = dvb_media_server2_device_groups_media_container2_new (), _g_object_unref0 (dvb_media_server2_root_container), _tmp0_); + dvb_media_server2_device_groups_media_container2_create_container_services (dvb_media_server2_root_container); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), (const char*) (_tmp1_ = media_object2_get_Parent ((MediaObject2*) dvb_media_server2_root_container)), (GObject*) dvb_media_server2_root_container); + _g_free0 (_tmp1_); + } 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 __finally190; + __catch190_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; + } + } + __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.16/src/rygel/Services2.vala gnome-dvb-daemon-0.1.21/src/rygel/Services2.vala --- gnome-dvb-daemon-0.1.16/src/rygel/Services2.vala 1970-01-01 00:00:00.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Services2.vala 2010-08-11 09:37:06.000000000 +0000 @@ -0,0 +1,408 @@ +/* + * 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 . + */ +using GLib; +using Gee; + +namespace DVB.MediaServer2 { + + private static const string SERVICE_NAME = "org.gnome.UPnP.MediaServer2.DVBDaemon"; + private static const string ROOT_PATH = "/org/gnome/UPnP/MediaServer2/DVBDaemon"; + + private static const string GROUP_PATH = "/org/gnome/UPnP/MediaServer2/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 DeviceGroupsMediaContainer2 : GLib.Object, MediaContainer2, MediaObject2 { + + 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 ChannelsMediaContainer2 ( + 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 Path { + owned get { + return ROOT_PATH; + } + } + + public string DisplayName { + owned get { + return "@REALNAME@'s TV on @HOSTNAME@"; + } + } + + public string Type { + owned get { + return "container"; + } + } + + public uint ItemCount { + get { + return 0; + } + } + + public uint ChildCount { + get { + return ContainerCount; + } + } + + public uint ContainerCount { + get { + return this.containers.size; + } + } + + public bool Searchable { + get { + return false; + } + } + + public GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBus.Error { + + uint num_elements = get_num_elements (this.containers.size, offset, max); + 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].insert("Path", container.Path); + hash[index].insert("DisplayName", container.DisplayName); + hash[index].insert("ChildCount", container.ChildCount); + hash[index].insert("Searchable", container.Searchable); + hash[index].insert("Type", container.Type); + hash[index].insert("Parent", this.Path); + } + i++; + if (i >= offset + num_elements) + break; + } + + return hash; + } + + public GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBus.Error { + return ListContainers(offset, max, filter); + } + + public GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBus.Error { + return new GLib.HashTable[0]; + } + + 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 ChannelsMediaContainer2 : GLib.Object, MediaContainer2, MediaObject2 { + + public DBus.ObjectPath parent; + + private DeviceGroup device_group; + private HashMap items; + + construct { + this.items = new HashMap (); + } + + public ChannelsMediaContainer2(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 ChannelMediaItem2 ( + 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 Path { + owned get { + return GROUP_PATH.printf (this.device_group.Id); + } + } + + public string DisplayName { + owned get { + return this.device_group.Name; + } + } + + public string Type { + owned get { + return "container"; + } + } + + public uint ChildCount { + get { + return ItemCount; + } + } + + public uint ItemCount { + get { + return this.items.size; + } + } + + public uint ContainerCount { + get { + return 0; + } + } + + public bool Searchable { + get { + return false; + } + } + + public GLib.HashTable[] ListItems ( + uint offset, uint max, string[] filter) throws DBus.Error { + + uint num_elements = get_num_elements (this.items.size, offset, max); + + 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].insert("Path", item.Path); + hash[index].insert("DisplayName", item.DisplayName); + hash[index].insert("Type", item.Type); + hash[index].insert("MIMEType", item.MIMEType); + hash[index].insert("URLs", item.URLs); + hash[index].insert("Parent", this.Path); + } + i++; + if (i >= offset + num_elements) + break; + } + + return hash; + } + + public GLib.HashTable[] ListContainers ( + uint offset, uint max, string[] filter) throws DBus.Error { + return new GLib.HashTable[0]; + } + + public GLib.HashTable[] ListChildren ( + uint offset, uint max, string[] filter) throws DBus.Error { + return ListItems(offset, max, filter); + } + + } + + + /** + * Holds a single channel + */ + public class ChannelMediaItem2 : GLib.Object, MediaItem2, MediaObject2 { + + private Channel channel; + private DBus.ObjectPath parent; + + public ChannelMediaItem2(Channel channel, DBus.ObjectPath parent) { + this.channel = channel; + this.parent = parent; + } + + public DBus.ObjectPath Parent { + owned get { + return this.parent; + } + } + + public string Path { + owned get { + return CHANNEL_PATH.printf (channel.GroupId, channel.Sid); + } + } + + 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 uint get_num_elements (int items, uint offset, uint max) { + uint num_elements; + if (max > 0) { + if (max > (items - offset)) { + num_elements = items - offset; + } else { + num_elements = max; + } + } else { + num_elements = items - offset; + } + return num_elements; + } + + private static DeviceGroupsMediaContainer2 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 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; + } + + } catch (Error e) { + critical ("Oops %s", e.message); + return false; + } + return false; + } + +} diff -Nru gnome-dvb-daemon-0.1.16/src/rygel/Services.c gnome-dvb-daemon-0.1.21/src/rygel/Services.c --- gnome-dvb-daemon-0.1.16/src/rygel/Services.c 2010-02-23 13:10:58.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Services.c 2010-08-21 20:42:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* Services.c generated by valac, the Vala compiler +/* Services.c generated by valac 0.9.7, the Vala compiler * generated from Services.vala, do not modify */ /* - * Copyright (C) 2009 Sebastian Pölsterl + * Copyright (C) 2009-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -46,26 +46,26 @@ typedef struct _MediaObject1 MediaObject1; typedef struct _MediaObject1Iface MediaObject1Iface; -#define DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER (dvb_device_groups_media_container_get_type ()) -#define DVB_DEVICE_GROUPS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBDeviceGroupsMediaContainer)) -#define DVB_DEVICE_GROUPS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBDeviceGroupsMediaContainerClass)) -#define DVB_IS_DEVICE_GROUPS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER)) -#define DVB_IS_DEVICE_GROUPS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER)) -#define DVB_DEVICE_GROUPS_MEDIA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBDeviceGroupsMediaContainerClass)) - -typedef struct _DVBDeviceGroupsMediaContainer DVBDeviceGroupsMediaContainer; -typedef struct _DVBDeviceGroupsMediaContainerClass DVBDeviceGroupsMediaContainerClass; -typedef struct _DVBDeviceGroupsMediaContainerPrivate DVBDeviceGroupsMediaContainerPrivate; - -#define DVB_TYPE_CHANNELS_MEDIA_CONTAINER (dvb_channels_media_container_get_type ()) -#define DVB_CHANNELS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNELS_MEDIA_CONTAINER, DVBChannelsMediaContainer)) -#define DVB_CHANNELS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNELS_MEDIA_CONTAINER, DVBChannelsMediaContainerClass)) -#define DVB_IS_CHANNELS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNELS_MEDIA_CONTAINER)) -#define DVB_IS_CHANNELS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNELS_MEDIA_CONTAINER)) -#define DVB_CHANNELS_MEDIA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNELS_MEDIA_CONTAINER, DVBChannelsMediaContainerClass)) +#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 _DVBChannelsMediaContainer DVBChannelsMediaContainer; -typedef struct _DVBChannelsMediaContainerClass DVBChannelsMediaContainerClass; +typedef struct _DVBMediaServerChannelsMediaContainer DVBMediaServerChannelsMediaContainer; +typedef struct _DVBMediaServerChannelsMediaContainerClass DVBMediaServerChannelsMediaContainerClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -89,6 +89,7 @@ typedef struct _DVBDeviceGroup DVBDeviceGroup; typedef struct _DVBDeviceGroupClass DVBDeviceGroupClass; #define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) +typedef struct _DBusObjectVTable _DBusObjectVTable; #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)) @@ -100,17 +101,17 @@ #define DVB_TYPE_CHANNEL_GROUP_INFO (dvb_channel_group_info_get_type ()) typedef struct _DVBChannelGroupInfo DVBChannelGroupInfo; -typedef struct _DVBChannelsMediaContainerPrivate DVBChannelsMediaContainerPrivate; +typedef struct _DVBMediaServerChannelsMediaContainerPrivate DVBMediaServerChannelsMediaContainerPrivate; -#define DVB_TYPE_CHANNEL_MEDIA_ITEM (dvb_channel_media_item_get_type ()) -#define DVB_CHANNEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_MEDIA_ITEM, DVBChannelMediaItem)) -#define DVB_CHANNEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_MEDIA_ITEM, DVBChannelMediaItemClass)) -#define DVB_IS_CHANNEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_MEDIA_ITEM)) -#define DVB_IS_CHANNEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_MEDIA_ITEM)) -#define DVB_CHANNEL_MEDIA_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_MEDIA_ITEM, DVBChannelMediaItemClass)) +#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 _DVBChannelMediaItem DVBChannelMediaItem; -typedef struct _DVBChannelMediaItemClass DVBChannelMediaItemClass; +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)) @@ -139,9 +140,8 @@ typedef struct _MediaItem1 MediaItem1; typedef struct _MediaItem1Iface MediaItem1Iface; -typedef struct _DVBChannelMediaItemPrivate DVBChannelMediaItemPrivate; +typedef struct _DVBMediaServerChannelMediaItemPrivate DVBMediaServerChannelMediaItemPrivate; #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -typedef struct _DBusObjectVTable _DBusObjectVTable; struct _MediaContainer1Iface { GTypeInterface parent_iface; @@ -157,20 +157,24 @@ char* (*get_DisplayName) (MediaObject1* self); }; -struct _DVBDeviceGroupsMediaContainer { +struct _DVBMediaServerDeviceGroupsMediaContainer { GObject parent_instance; - DVBDeviceGroupsMediaContainerPrivate * priv; + DVBMediaServerDeviceGroupsMediaContainerPrivate * priv; }; -struct _DVBDeviceGroupsMediaContainerClass { +struct _DVBMediaServerDeviceGroupsMediaContainerClass { GObjectClass parent_class; }; -struct _DVBDeviceGroupsMediaContainerPrivate { +struct _DVBMediaServerDeviceGroupsMediaContainerPrivate { GeeHashMap* containers; char* path; }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _DVBChannelGroupInfo { gint id; char* name; @@ -187,19 +191,20 @@ DVBChannelGroupInfo* (*GetChannelGroups) (DVBIDBusManager* self, int* result_length1, GError** error); gboolean (*AddChannelGroup) (DVBIDBusManager* self, const char* 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 _DVBChannelsMediaContainer { +struct _DVBMediaServerChannelsMediaContainer { GObject parent_instance; - DVBChannelsMediaContainerPrivate * priv; + DVBMediaServerChannelsMediaContainerPrivate * priv; char* parent; }; -struct _DVBChannelsMediaContainerClass { +struct _DVBMediaServerChannelsMediaContainerClass { GObjectClass parent_class; }; -struct _DVBChannelsMediaContainerPrivate { +struct _DVBMediaServerChannelsMediaContainerPrivate { DVBDeviceGroup* device_group; GeeHashMap* items; }; @@ -211,149 +216,151 @@ char* (*get_Type) (MediaItem1* self); }; -struct _DVBChannelMediaItem { +struct _DVBMediaServerChannelMediaItem { GObject parent_instance; - DVBChannelMediaItemPrivate * priv; + DVBMediaServerChannelMediaItemPrivate * priv; }; -struct _DVBChannelMediaItemClass { +struct _DVBMediaServerChannelMediaItemClass { GObjectClass parent_class; }; -struct _DVBChannelMediaItemPrivate { +struct _DVBMediaServerChannelMediaItemPrivate { DVBChannel* channel; char* parent; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - -static gpointer dvb_device_groups_media_container_parent_class = NULL; -static MediaContainer1Iface* dvb_device_groups_media_container_media_container1_parent_iface = NULL; -static MediaObject1Iface* dvb_device_groups_media_container_media_object1_parent_iface = NULL; -static gpointer dvb_channels_media_container_parent_class = NULL; -static MediaContainer1Iface* dvb_channels_media_container_media_container1_parent_iface = NULL; -static MediaObject1Iface* dvb_channels_media_container_media_object1_parent_iface = NULL; -static gpointer dvb_channel_media_item_parent_class = NULL; -static MediaItem1Iface* dvb_channel_media_item_media_item1_parent_iface = NULL; -static MediaObject1Iface* dvb_channel_media_item_media_object1_parent_iface = NULL; -extern DVBDeviceGroupsMediaContainer* dvb_rygel_service_root_container; -DVBDeviceGroupsMediaContainer* dvb_rygel_service_root_container = NULL; - -#define DVB_SERVICE_NAME "org.gnome.UPnP.MediaServer1.DVBDaemon" -#define DVB_ROOT_PATH "/org/gnome/UPnP/MediaServer1/DVBDaemon" -#define DVB_GROUP_PATH "/org/gnome/UPnP/MediaServer1/DVBDaemon/Group%u" -#define DVB_CHANNEL_PATH DVB_GROUP_PATH "/Channel%u" -GType media_container1_get_type (void); -GType media_object1_get_type (void); -GType dvb_device_groups_media_container_get_type (void); -GType dvb_channels_media_container_get_type (void); -#define DVB_DEVICE_GROUPS_MEDIA_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, DVBDeviceGroupsMediaContainerPrivate)) +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_DEVICE_GROUPS_MEDIA_CONTAINER_DUMMY_PROPERTY, - DVB_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT, - DVB_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME, - DVB_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT, - DVB_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT + 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 }; -GType dvb_manager_get_type (void); +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); +GType dvb_device_group_get_type (void) G_GNUC_CONST; GeeCollection* dvb_manager_get_device_groups (DVBManager* self); -static void dvb_device_groups_media_container_create_service (DVBDeviceGroupsMediaContainer* self, DVBDeviceGroup* devgroup); -void dvb_device_groups_media_container_create_container_services (DVBDeviceGroupsMediaContainer* 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); -DVBChannelsMediaContainer* dvb_channels_media_container_new (DVBDeviceGroup* devgroup, const char* parent); -DVBChannelsMediaContainer* dvb_channels_media_container_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent); -char* dvb_channels_media_container_get_Path (DVBChannelsMediaContainer* self); -void dvb_channels_media_container_create_item_services (DVBChannelsMediaContainer* self); +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); +char* dvb_media_server_channels_media_container_get_Path (DVBMediaServerChannelsMediaContainer* 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 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_device_groups_media_container_on_device_added (DVBDeviceGroupsMediaContainer* self, guint group_id); -static void dvb_device_groups_media_container_on_device_removed (DVBDeviceGroupsMediaContainer* self, guint group_id); -DVBDeviceGroupsMediaContainer* dvb_device_groups_media_container_new (void); -DVBDeviceGroupsMediaContainer* dvb_device_groups_media_container_construct (GType object_type); -GType dvb_channel_group_info_get_type (void); +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); +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); -static void _dvb_device_groups_media_container_on_device_added_dvb_id_bus_manager_group_added (DVBIDBusManager* _sender, guint group_id, gpointer self); -static void _dvb_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed (DVBIDBusManager* _sender, guint group_id, gpointer self); -static GObject * dvb_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -void dvb_device_groups_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_device_groups_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_device_groups_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_device_groups_media_container_introspect (DVBDeviceGroupsMediaContainer* self, DBusConnection* connection, DBusMessage* message); -static void dvb_device_groups_media_container_finalize (GObject* obj); +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 GObject * dvb_media_server_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); +static void dvb_media_server_device_groups_media_container_finalize (GObject* obj); char* media_object1_get_Parent (MediaObject1* self); char* media_object1_get_DisplayName (MediaObject1* self); guint media_container1_get_ItemCount (MediaContainer1* self); guint media_container1_get_ContainerCount (MediaContainer1* self); -static void dvb_device_groups_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -GType dvb_channel_media_item_get_type (void); -#define DVB_CHANNELS_MEDIA_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNELS_MEDIA_CONTAINER, DVBChannelsMediaContainerPrivate)) +static void 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_CHANNELS_MEDIA_CONTAINER_DUMMY_PROPERTY, - DVB_CHANNELS_MEDIA_CONTAINER_PATH, - DVB_CHANNELS_MEDIA_CONTAINER_PARENT, - DVB_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME, - DVB_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT, - DVB_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT + 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 }; -GType dvb_channel_list_get_type (void); +GType dvb_channel_list_get_type (void) G_GNUC_CONST; DVBChannelList* dvb_device_group_get_Channels (DVBDeviceGroup* self); -GType dvb_channel_get_type (void); -void dvb_channels_media_container_create_service (DVBChannelsMediaContainer* self, DVBChannel* channel); +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); -DVBChannelMediaItem* dvb_channel_media_item_new (DVBChannel* channel, const char* parent); -DVBChannelMediaItem* dvb_channel_media_item_construct (GType object_type, DVBChannel* channel, const char* parent); -char* dvb_channel_media_item_get_Path (DVBChannelMediaItem* 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); +char* dvb_media_server_channel_media_item_get_Path (DVBMediaServerChannelMediaItem* self); const char* dvb_device_group_get_Name (DVBDeviceGroup* self); -static GObject * dvb_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); -void dvb_channels_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_channels_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_channels_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_channels_media_container_introspect (DVBChannelsMediaContainer* self, DBusConnection* connection, DBusMessage* message); -static void dvb_channels_media_container_finalize (GObject* obj); -static void dvb_channels_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -GType media_item1_get_type (void); -#define DVB_CHANNEL_MEDIA_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_CHANNEL_MEDIA_ITEM, DVBChannelMediaItemPrivate)) +static GObject * dvb_media_server_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); +static void dvb_media_server_channels_media_container_finalize (GObject* obj); +static void 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_CHANNEL_MEDIA_ITEM_DUMMY_PROPERTY, - DVB_CHANNEL_MEDIA_ITEM_PATH, - DVB_CHANNEL_MEDIA_ITEM_PARENT, - DVB_CHANNEL_MEDIA_ITEM_DISPLAY_NAME, - DVB_CHANNEL_MEDIA_ITEM_MIME_TYPE, - DVB_CHANNEL_MEDIA_ITEM_TYPE + 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 }; guint dvb_channel_get_GroupId (DVBChannel* self); const char* dvb_channel_get_Name (DVBChannel* self); char* dvb_channel_get_URL (DVBChannel* self); -void dvb_channel_media_item_dbus_register_object (DBusConnection* connection, const char* path, void* object); -void _dvb_channel_media_item_dbus_unregister (DBusConnection* connection, void* _user_data_); -DBusHandlerResult dvb_channel_media_item_dbus_message (DBusConnection* connection, DBusMessage* message, void* object); -static DBusHandlerResult _dbus_dvb_channel_media_item_introspect (DVBChannelMediaItem* self, DBusConnection* connection, DBusMessage* message); -static void dvb_channel_media_item_finalize (GObject* obj); +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); +static void dvb_media_server_channel_media_item_finalize (GObject* obj); +char** media_item1_get_URLs (MediaItem1* self, int* result_length1); char* media_item1_get_MIMEType (MediaItem1* self); char* media_item1_get_Type (MediaItem1* self); -static void dvb_channel_media_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void 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 char* param1, guint param2, GError** error); -gboolean dvb_rygel_service_start_rygel_services (void); 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 void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); -static const DBusObjectPathVTable _dvb_device_groups_media_container_dbus_path_vtable = {_dvb_device_groups_media_container_dbus_unregister, dvb_device_groups_media_container_dbus_message}; -static const _DBusObjectVTable _dvb_device_groups_media_container_dbus_vtable = {dvb_device_groups_media_container_dbus_register_object}; -static const DBusObjectPathVTable _dvb_channels_media_container_dbus_path_vtable = {_dvb_channels_media_container_dbus_unregister, dvb_channels_media_container_dbus_message}; -static const _DBusObjectVTable _dvb_channels_media_container_dbus_vtable = {dvb_channels_media_container_dbus_register_object}; -static const DBusObjectPathVTable _dvb_channel_media_item_dbus_path_vtable = {_dvb_channel_media_item_dbus_unregister, dvb_channel_media_item_dbus_message}; -static const _DBusObjectVTable _dvb_channel_media_item_dbus_vtable = {dvb_channel_media_item_dbus_register_object}; +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 gpointer _g_object_ref0 (gpointer self) { @@ -361,7 +368,7 @@ } -void dvb_device_groups_media_container_create_container_services (DVBDeviceGroupsMediaContainer* self) { +void dvb_media_server_device_groups_media_container_create_container_services (DVBMediaServerDeviceGroupsMediaContainer* self) { DVBManager* manager; g_return_if_fail (self != NULL); manager = _g_object_ref0 (dvb_manager_get_instance ()); @@ -376,7 +383,7 @@ break; } devgroup = (DVBDeviceGroup*) gee_iterator_get (_devgroup_it); - dvb_device_groups_media_container_create_service (self, devgroup); + dvb_media_server_device_groups_media_container_create_service (self, devgroup); _g_object_unref0 (devgroup); } _g_object_unref0 (_devgroup_it); @@ -385,9 +392,28 @@ } -static void dvb_device_groups_media_container_create_service (DVBDeviceGroupsMediaContainer* self, DVBDeviceGroup* devgroup) { +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_media_server_device_groups_media_container_create_service (DVBMediaServerDeviceGroupsMediaContainer* self, DVBDeviceGroup* devgroup) { DBusGConnection* conn; - DVBChannelsMediaContainer* devgroup_container; + DVBMediaServerChannelsMediaContainer* devgroup_container; char* _tmp0_; g_return_if_fail (self != NULL); g_return_if_fail (devgroup != NULL); @@ -398,97 +424,97 @@ _dbus_g_connection_unref0 (conn); return; } - devgroup_container = dvb_channels_media_container_new (devgroup, self->priv->path); - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp0_ = dvb_channels_media_container_get_Path (devgroup_container), (GObject*) devgroup_container); + devgroup_container = dvb_media_server_channels_media_container_new (devgroup, self->priv->path); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp0_ = dvb_media_server_channels_media_container_get_Path (devgroup_container), (GObject*) devgroup_container); _g_free0 (_tmp0_); - dvb_channels_media_container_create_item_services (devgroup_container); + dvb_media_server_channels_media_container_create_item_services (devgroup_container); gee_abstract_map_set ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (dvb_device_group_get_Id (devgroup)), devgroup_container); - _dbus_g_connection_unref0 (conn); _g_object_unref0 (devgroup_container); + _dbus_g_connection_unref0 (conn); } -static void dvb_device_groups_media_container_on_device_added (DVBDeviceGroupsMediaContainer* self, guint group_id) { +static void dvb_media_server_device_groups_media_container_on_device_added (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id) { DVBManager* manager; DVBDeviceGroup* devgroup; g_return_if_fail (self != NULL); manager = _g_object_ref0 (dvb_manager_get_instance ()); devgroup = dvb_manager_get_device_group_if_exists (manager, group_id); - dvb_device_groups_media_container_create_service (self, devgroup); + dvb_media_server_device_groups_media_container_create_service (self, devgroup); g_signal_emit_by_name ((MediaContainer1*) self, "updated"); - _g_object_unref0 (manager); _g_object_unref0 (devgroup); + _g_object_unref0 (manager); } -static void dvb_device_groups_media_container_on_device_removed (DVBDeviceGroupsMediaContainer* self, guint group_id) { +static void dvb_media_server_device_groups_media_container_on_device_removed (DVBMediaServerDeviceGroupsMediaContainer* self, guint group_id) { g_return_if_fail (self != NULL); - gee_map_remove ((GeeMap*) self->priv->containers, GUINT_TO_POINTER (group_id), NULL); + gee_abstract_map_unset ((GeeAbstractMap*) self->priv->containers, GUINT_TO_POINTER (group_id), NULL); g_signal_emit_by_name ((MediaContainer1*) self, "updated"); } -DVBDeviceGroupsMediaContainer* dvb_device_groups_media_container_construct (GType object_type) { - DVBDeviceGroupsMediaContainer * self; - self = g_object_newv (object_type, 0, NULL); +DVBMediaServerDeviceGroupsMediaContainer* dvb_media_server_device_groups_media_container_construct (GType object_type) { + DVBMediaServerDeviceGroupsMediaContainer * self; + self = (DVBMediaServerDeviceGroupsMediaContainer*) g_object_new (object_type, NULL); return self; } -DVBDeviceGroupsMediaContainer* dvb_device_groups_media_container_new (void) { - return dvb_device_groups_media_container_construct (DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER); +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_device_groups_media_container_real_get_Parent (MediaObject1* base) { +static char* dvb_media_server_device_groups_media_container_real_get_Parent (MediaObject1* base) { char* result; - DVBDeviceGroupsMediaContainer* self; - self = (DVBDeviceGroupsMediaContainer*) base; + DVBMediaServerDeviceGroupsMediaContainer* self; + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; result = g_strdup (self->priv->path); return result; } -static char* dvb_device_groups_media_container_real_get_DisplayName (MediaObject1* base) { +static char* dvb_media_server_device_groups_media_container_real_get_DisplayName (MediaObject1* base) { char* result; - DVBDeviceGroupsMediaContainer* self; - self = (DVBDeviceGroupsMediaContainer*) base; + DVBMediaServerDeviceGroupsMediaContainer* self; + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; result = g_strdup ("@REALNAME@'s TV on @HOSTNAME@"); return result; } -static char** dvb_device_groups_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { +static char** dvb_media_server_device_groups_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { char** result; - DVBDeviceGroupsMediaContainer* self; + DVBMediaServerDeviceGroupsMediaContainer* self; char** _tmp0_; - self = (DVBDeviceGroupsMediaContainer*) base; + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; result = (_tmp0_ = g_new0 (char*, 0 + 1), *result_length1 = 0, _tmp0_); return result; } -static guint dvb_device_groups_media_container_real_get_ItemCount (MediaContainer1* base) { +static guint dvb_media_server_device_groups_media_container_real_get_ItemCount (MediaContainer1* base) { guint result; - DVBDeviceGroupsMediaContainer* self; - self = (DVBDeviceGroupsMediaContainer*) base; + DVBMediaServerDeviceGroupsMediaContainer* self; + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; result = (guint) 0; return result; } -static char** dvb_device_groups_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { +static char** dvb_media_server_device_groups_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { char** result; - DVBDeviceGroupsMediaContainer* self; - char** _tmp1_; - gint paths_size; + DVBMediaServerDeviceGroupsMediaContainer* self; gint paths_length1; + gint _paths_size_; + char** _tmp1_; gint _tmp0_; char** paths; gint i; char** _tmp6_; - self = (DVBDeviceGroupsMediaContainer*) base; - paths = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers)) + 1), paths_length1 = _tmp0_, paths_size = paths_length1, _tmp1_); + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; + paths = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->containers)) + 1), paths_length1 = _tmp0_, _paths_size_ = paths_length1, _tmp1_); i = 0; { GeeCollection* _tmp2_; @@ -496,14 +522,14 @@ GeeIterator* _container_it; _container_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_values ((GeeMap*) self->priv->containers))), _g_object_unref0 (_tmp2_), _tmp3_); while (TRUE) { - DVBChannelsMediaContainer* container; - char* _tmp5_; + DVBMediaServerChannelsMediaContainer* container; char* _tmp4_; + char* _tmp5_; if (!gee_iterator_next (_container_it)) { break; } - container = (DVBChannelsMediaContainer*) gee_iterator_get (_container_it); - paths[i] = (_tmp5_ = g_strdup (_tmp4_ = dvb_channels_media_container_get_Path (container)), _g_free0 (paths[i]), _tmp5_); + container = (DVBMediaServerChannelsMediaContainer*) gee_iterator_get (_container_it); + paths[i] = (_tmp5_ = g_strdup (_tmp4_ = dvb_media_server_channels_media_container_get_Path (container)), _g_free0 (paths[i]), _tmp5_); _g_free0 (_tmp4_); i++; _g_object_unref0 (container); @@ -516,52 +542,52 @@ } -static guint dvb_device_groups_media_container_real_get_ContainerCount (MediaContainer1* base) { +static guint dvb_media_server_device_groups_media_container_real_get_ContainerCount (MediaContainer1* base) { guint result; - DVBDeviceGroupsMediaContainer* self; - self = (DVBDeviceGroupsMediaContainer*) base; + DVBMediaServerDeviceGroupsMediaContainer* self; + self = (DVBMediaServerDeviceGroupsMediaContainer*) base; result = (guint) gee_map_get_size ((GeeMap*) self->priv->containers); return result; } -static void _dvb_device_groups_media_container_on_device_added_dvb_id_bus_manager_group_added (DVBIDBusManager* _sender, guint group_id, gpointer self) { - dvb_device_groups_media_container_on_device_added (self, group_id); +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_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed (DVBIDBusManager* _sender, guint group_id, gpointer self) { - dvb_device_groups_media_container_on_device_removed (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_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +static GObject * dvb_media_server_device_groups_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { GObject * obj; GObjectClass * parent_class; - DVBDeviceGroupsMediaContainer * self; - parent_class = G_OBJECT_CLASS (dvb_device_groups_media_container_parent_class); + DVBMediaServerDeviceGroupsMediaContainer * self; + 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_DEVICE_GROUPS_MEDIA_CONTAINER (obj); + self = DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER (obj); { GeeHashMap* _tmp0_; DVBManager* manager; char* _tmp1_; - self->priv->containers = (_tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_CHANNELS_MEDIA_CONTAINER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL), _g_object_unref0 (self->priv->containers), _tmp0_); + self->priv->containers = (_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), _g_object_unref0 (self->priv->containers), _tmp0_); manager = _g_object_ref0 (dvb_manager_get_instance ()); - g_signal_connect_object ((DVBIDBusManager*) manager, "group-added", (GCallback) _dvb_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_device_groups_media_container_on_device_removed_dvb_id_bus_manager_group_removed, self, 0); - self->priv->path = (_tmp1_ = g_strdup (DVB_ROOT_PATH), _g_free0 (self->priv->path), _tmp1_); + 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); + self->priv->path = (_tmp1_ = g_strdup (DVB_MEDIA_SERVER_ROOT_PATH), _g_free0 (self->priv->path), _tmp1_); _g_object_unref0 (manager); } return obj; } -void _dvb_device_groups_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { +void _dvb_media_server_device_groups_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { } -static DBusHandlerResult _dbus_dvb_device_groups_media_container_introspect (DVBDeviceGroupsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { +static DBusHandlerResult _dbus_dvb_media_server_device_groups_media_container_introspect (DVBMediaServerDeviceGroupsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { DBusMessage* reply; DBusMessageIter iter; GString* xml_data; @@ -589,11 +615,11 @@ } -DBusHandlerResult dvb_device_groups_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { +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_device_groups_media_container_introspect (object, connection, message); + result = _dbus_dvb_media_server_device_groups_media_container_introspect (object, connection, message); } if (result == DBUS_HANDLER_RESULT_HANDLED) { return result; @@ -607,10 +633,10 @@ } -void dvb_device_groups_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object) { +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_device_groups_media_container_dbus_path_vtable, object); + 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); @@ -618,78 +644,85 @@ } -static void dvb_device_groups_media_container_class_init (DVBDeviceGroupsMediaContainerClass * klass) { - dvb_device_groups_media_container_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBDeviceGroupsMediaContainerPrivate)); - G_OBJECT_CLASS (klass)->get_property = dvb_device_groups_media_container_get_property; - G_OBJECT_CLASS (klass)->constructor = dvb_device_groups_media_container_constructor; - G_OBJECT_CLASS (klass)->finalize = dvb_device_groups_media_container_finalize; - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT, "ContainerCount"); - g_type_set_qdata (DVB_TYPE_DEVICE_GROUPS_MEDIA_CONTAINER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_device_groups_media_container_dbus_vtable)); +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 = 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_device_groups_media_container_media_container1_interface_init (MediaContainer1Iface * iface) { - dvb_device_groups_media_container_media_container1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Items = dvb_device_groups_media_container_real_get_Items; - iface->get_ItemCount = dvb_device_groups_media_container_real_get_ItemCount; - iface->get_Containers = dvb_device_groups_media_container_real_get_Containers; - iface->get_ContainerCount = dvb_device_groups_media_container_real_get_ContainerCount; +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_device_groups_media_container_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_device_groups_media_container_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_device_groups_media_container_real_get_Parent; - iface->get_DisplayName = dvb_device_groups_media_container_real_get_DisplayName; +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_device_groups_media_container_instance_init (DVBDeviceGroupsMediaContainer * self) { - self->priv = DVB_DEVICE_GROUPS_MEDIA_CONTAINER_GET_PRIVATE (self); +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_device_groups_media_container_finalize (GObject* obj) { - DVBDeviceGroupsMediaContainer * self; - self = DVB_DEVICE_GROUPS_MEDIA_CONTAINER (obj); +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_device_groups_media_container_parent_class)->finalize (obj); + G_OBJECT_CLASS (dvb_media_server_device_groups_media_container_parent_class)->finalize (obj); } -GType dvb_device_groups_media_container_get_type (void) { - static GType dvb_device_groups_media_container_type_id = 0; - if (dvb_device_groups_media_container_type_id == 0) { - static const GTypeInfo g_define_type_info = { sizeof (DVBDeviceGroupsMediaContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_device_groups_media_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBDeviceGroupsMediaContainer), 0, (GInstanceInitFunc) dvb_device_groups_media_container_instance_init, NULL }; - static const GInterfaceInfo media_container1_info = { (GInterfaceInitFunc) dvb_device_groups_media_container_media_container1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_device_groups_media_container_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - dvb_device_groups_media_container_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBDeviceGroupsMediaContainer", &g_define_type_info, 0); - g_type_add_interface_static (dvb_device_groups_media_container_type_id, TYPE_MEDIA_CONTAINER1, &media_container1_info); - g_type_add_interface_static (dvb_device_groups_media_container_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); - } - return dvb_device_groups_media_container_type_id; +/** + * 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 dvb_device_groups_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBDeviceGroupsMediaContainer * self; - self = DVB_DEVICE_GROUPS_MEDIA_CONTAINER (object); +static void 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_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT: - g_value_set_boxed (value, media_object1_get_Parent ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_PARENT: + g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); break; - case DVB_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME: - g_value_set_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_DISPLAY_NAME: + g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); break; - case DVB_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT: + case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_ITEM_COUNT: g_value_set_uint (value, media_container1_get_ItemCount ((MediaContainer1*) self)); break; - case DVB_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT: + case DVB_MEDIA_SERVER_DEVICE_GROUPS_MEDIA_CONTAINER_CONTAINER_COUNT: g_value_set_uint (value, media_container1_get_ContainerCount ((MediaContainer1*) self)); break; default: @@ -699,25 +732,25 @@ } -DVBChannelsMediaContainer* dvb_channels_media_container_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent) { - DVBChannelsMediaContainer * self; +DVBMediaServerChannelsMediaContainer* dvb_media_server_channels_media_container_construct (GType object_type, DVBDeviceGroup* devgroup, const char* parent) { + DVBMediaServerChannelsMediaContainer * self; DVBDeviceGroup* _tmp0_; char* _tmp1_; g_return_val_if_fail (devgroup != NULL, NULL); g_return_val_if_fail (parent != NULL, NULL); - self = g_object_newv (object_type, 0, NULL); + self = (DVBMediaServerChannelsMediaContainer*) g_object_new (object_type, NULL); self->priv->device_group = (_tmp0_ = _g_object_ref0 (devgroup), _g_object_unref0 (self->priv->device_group), _tmp0_); self->parent = (_tmp1_ = g_strdup (parent), _g_free0 (self->parent), _tmp1_); return self; } -DVBChannelsMediaContainer* dvb_channels_media_container_new (DVBDeviceGroup* devgroup, const char* parent) { - return dvb_channels_media_container_construct (DVB_TYPE_CHANNELS_MEDIA_CONTAINER, devgroup, parent); +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_channels_media_container_create_item_services (DVBChannelsMediaContainer* self) { +void dvb_media_server_channels_media_container_create_item_services (DVBMediaServerChannelsMediaContainer* self) { g_return_if_fail (self != NULL); { GeeIterator* _channel_it; @@ -728,7 +761,7 @@ break; } channel = (DVBChannel*) gee_iterator_get (_channel_it); - dvb_channels_media_container_create_service (self, channel); + dvb_media_server_channels_media_container_create_service (self, channel); _g_object_unref0 (channel); } _g_object_unref0 (_channel_it); @@ -736,12 +769,12 @@ } -void dvb_channels_media_container_create_service (DVBChannelsMediaContainer* self, DVBChannel* channel) { +void dvb_media_server_channels_media_container_create_service (DVBMediaServerChannelsMediaContainer* self, DVBChannel* channel) { DBusGConnection* conn; - char* _tmp1_; char* _tmp0_; - DVBChannelMediaItem* _tmp2_; - DVBChannelMediaItem* channel_item; + char* _tmp1_; + DVBMediaServerChannelMediaItem* _tmp2_; + DVBMediaServerChannelMediaItem* channel_item; char* _tmp3_; g_return_if_fail (self != NULL); g_return_if_fail (channel != NULL); @@ -752,53 +785,53 @@ _dbus_g_connection_unref0 (conn); return; } - channel_item = (_tmp2_ = dvb_channel_media_item_new (channel, _tmp1_ = g_strdup (_tmp0_ = dvb_channels_media_container_get_Path (self))), _g_free0 (_tmp1_), _g_free0 (_tmp0_), _tmp2_); - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp3_ = dvb_channel_media_item_get_Path (channel_item), (GObject*) channel_item); + channel_item = (_tmp2_ = dvb_media_server_channel_media_item_new (channel, _tmp1_ = g_strdup (_tmp0_ = dvb_media_server_channels_media_container_get_Path (self))), _g_free0 (_tmp1_), _g_free0 (_tmp0_), _tmp2_); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), _tmp3_ = dvb_media_server_channel_media_item_get_Path (channel_item), (GObject*) channel_item); _g_free0 (_tmp3_); gee_abstract_map_set ((GeeAbstractMap*) self->priv->items, GUINT_TO_POINTER (dvb_channel_get_Sid (channel)), channel_item); - _dbus_g_connection_unref0 (conn); _g_object_unref0 (channel_item); + _dbus_g_connection_unref0 (conn); } -char* dvb_channels_media_container_get_Path (DVBChannelsMediaContainer* self) { +char* dvb_media_server_channels_media_container_get_Path (DVBMediaServerChannelsMediaContainer* self) { char* result; g_return_val_if_fail (self != NULL, NULL); - result = g_strdup_printf (DVB_GROUP_PATH, dvb_device_group_get_Id (self->priv->device_group)); + result = g_strdup_printf (DVB_MEDIA_SERVER_GROUP_PATH, dvb_device_group_get_Id (self->priv->device_group)); return result; } -static char* dvb_channels_media_container_real_get_Parent (MediaObject1* base) { +static char* dvb_media_server_channels_media_container_real_get_Parent (MediaObject1* base) { char* result; - DVBChannelsMediaContainer* self; - self = (DVBChannelsMediaContainer*) base; + DVBMediaServerChannelsMediaContainer* self; + self = (DVBMediaServerChannelsMediaContainer*) base; result = g_strdup (self->parent); return result; } -static char* dvb_channels_media_container_real_get_DisplayName (MediaObject1* base) { +static char* dvb_media_server_channels_media_container_real_get_DisplayName (MediaObject1* base) { char* result; - DVBChannelsMediaContainer* self; - self = (DVBChannelsMediaContainer*) base; + DVBMediaServerChannelsMediaContainer* self; + self = (DVBMediaServerChannelsMediaContainer*) base; result = g_strdup (dvb_device_group_get_Name (self->priv->device_group)); return result; } -static char** dvb_channels_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { +static char** dvb_media_server_channels_media_container_real_get_Items (MediaContainer1* base, int* result_length1) { char** result; - DVBChannelsMediaContainer* self; - char** _tmp1_; - gint paths_size; + DVBMediaServerChannelsMediaContainer* self; gint paths_length1; + gint _paths_size_; + char** _tmp1_; gint _tmp0_; char** paths; gint i; char** _tmp6_; - self = (DVBChannelsMediaContainer*) base; - paths = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items)) + 1), paths_length1 = _tmp0_, paths_size = paths_length1, _tmp1_); + self = (DVBMediaServerChannelsMediaContainer*) base; + paths = (_tmp1_ = g_new0 (char*, (_tmp0_ = gee_map_get_size ((GeeMap*) self->priv->items)) + 1), paths_length1 = _tmp0_, _paths_size_ = paths_length1, _tmp1_); i = 0; { GeeCollection* _tmp2_; @@ -806,14 +839,14 @@ GeeIterator* _item_it; _item_it = (_tmp3_ = gee_iterable_iterator ((GeeIterable*) (_tmp2_ = gee_map_get_values ((GeeMap*) self->priv->items))), _g_object_unref0 (_tmp2_), _tmp3_); while (TRUE) { - DVBChannelMediaItem* item; - char* _tmp5_; + DVBMediaServerChannelMediaItem* item; char* _tmp4_; + char* _tmp5_; if (!gee_iterator_next (_item_it)) { break; } - item = (DVBChannelMediaItem*) gee_iterator_get (_item_it); - paths[i] = (_tmp5_ = g_strdup (_tmp4_ = dvb_channel_media_item_get_Path (item)), _g_free0 (paths[i]), _tmp5_); + item = (DVBMediaServerChannelMediaItem*) gee_iterator_get (_item_it); + paths[i] = (_tmp5_ = g_strdup (_tmp4_ = dvb_media_server_channel_media_item_get_Path (item)), _g_free0 (paths[i]), _tmp5_); _g_free0 (_tmp4_); i++; _g_object_unref0 (item); @@ -826,54 +859,54 @@ } -static guint dvb_channels_media_container_real_get_ItemCount (MediaContainer1* base) { +static guint dvb_media_server_channels_media_container_real_get_ItemCount (MediaContainer1* base) { guint result; - DVBChannelsMediaContainer* self; - self = (DVBChannelsMediaContainer*) base; + DVBMediaServerChannelsMediaContainer* self; + self = (DVBMediaServerChannelsMediaContainer*) base; result = (guint) gee_map_get_size ((GeeMap*) self->priv->items); return result; } -static char** dvb_channels_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { +static char** dvb_media_server_channels_media_container_real_get_Containers (MediaContainer1* base, int* result_length1) { char** result; - DVBChannelsMediaContainer* self; + DVBMediaServerChannelsMediaContainer* self; char** _tmp0_; - self = (DVBChannelsMediaContainer*) base; + self = (DVBMediaServerChannelsMediaContainer*) base; result = (_tmp0_ = g_new0 (char*, 0 + 1), *result_length1 = 0, _tmp0_); return result; } -static guint dvb_channels_media_container_real_get_ContainerCount (MediaContainer1* base) { +static guint dvb_media_server_channels_media_container_real_get_ContainerCount (MediaContainer1* base) { guint result; - DVBChannelsMediaContainer* self; - self = (DVBChannelsMediaContainer*) base; + DVBMediaServerChannelsMediaContainer* self; + self = (DVBMediaServerChannelsMediaContainer*) base; result = (guint) 0; return result; } -static GObject * dvb_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { +static GObject * dvb_media_server_channels_media_container_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) { GObject * obj; GObjectClass * parent_class; - DVBChannelsMediaContainer * self; - parent_class = G_OBJECT_CLASS (dvb_channels_media_container_parent_class); + DVBMediaServerChannelsMediaContainer * self; + 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_CHANNELS_MEDIA_CONTAINER (obj); + self = DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER (obj); { - GeeHashMap* _tmp2_; - self->priv->items = (_tmp2_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, DVB_TYPE_CHANNEL_MEDIA_ITEM, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL), _g_object_unref0 (self->priv->items), _tmp2_); + GeeHashMap* _tmp0_; + self->priv->items = (_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), _g_object_unref0 (self->priv->items), _tmp0_); } return obj; } -void _dvb_channels_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { +void _dvb_media_server_channels_media_container_dbus_unregister (DBusConnection* connection, void* _user_data_) { } -static DBusHandlerResult _dbus_dvb_channels_media_container_introspect (DVBChannelsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { +static DBusHandlerResult _dbus_dvb_media_server_channels_media_container_introspect (DVBMediaServerChannelsMediaContainer* self, DBusConnection* connection, DBusMessage* message) { DBusMessage* reply; DBusMessageIter iter; GString* xml_data; @@ -901,11 +934,11 @@ } -DBusHandlerResult dvb_channels_media_container_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { +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_channels_media_container_introspect (object, connection, message); + result = _dbus_dvb_media_server_channels_media_container_introspect (object, connection, message); } if (result == DBUS_HANDLER_RESULT_HANDLED) { return result; @@ -919,10 +952,10 @@ } -void dvb_channels_media_container_dbus_register_object (DBusConnection* connection, const char* path, void* object) { +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_channels_media_container_dbus_path_vtable, object); + 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); @@ -930,83 +963,90 @@ } -static void dvb_channels_media_container_class_init (DVBChannelsMediaContainerClass * klass) { - dvb_channels_media_container_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBChannelsMediaContainerPrivate)); - G_OBJECT_CLASS (klass)->get_property = dvb_channels_media_container_get_property; - G_OBJECT_CLASS (klass)->constructor = dvb_channels_media_container_constructor; - G_OBJECT_CLASS (klass)->finalize = dvb_channels_media_container_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_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_CHANNELS_MEDIA_CONTAINER_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT, "ItemCount"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT, "ContainerCount"); - g_type_set_qdata (DVB_TYPE_CHANNELS_MEDIA_CONTAINER, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_channels_media_container_dbus_vtable)); +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 = 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_channels_media_container_media_container1_interface_init (MediaContainer1Iface * iface) { - dvb_channels_media_container_media_container1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Items = dvb_channels_media_container_real_get_Items; - iface->get_ItemCount = dvb_channels_media_container_real_get_ItemCount; - iface->get_Containers = dvb_channels_media_container_real_get_Containers; - iface->get_ContainerCount = dvb_channels_media_container_real_get_ContainerCount; +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_channels_media_container_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_channels_media_container_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_channels_media_container_real_get_Parent; - iface->get_DisplayName = dvb_channels_media_container_real_get_DisplayName; +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_channels_media_container_instance_init (DVBChannelsMediaContainer * self) { - self->priv = DVB_CHANNELS_MEDIA_CONTAINER_GET_PRIVATE (self); +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_channels_media_container_finalize (GObject* obj) { - DVBChannelsMediaContainer * self; - self = DVB_CHANNELS_MEDIA_CONTAINER (obj); +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_channels_media_container_parent_class)->finalize (obj); + G_OBJECT_CLASS (dvb_media_server_channels_media_container_parent_class)->finalize (obj); } -GType dvb_channels_media_container_get_type (void) { - static GType dvb_channels_media_container_type_id = 0; - if (dvb_channels_media_container_type_id == 0) { - static const GTypeInfo g_define_type_info = { sizeof (DVBChannelsMediaContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channels_media_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelsMediaContainer), 0, (GInstanceInitFunc) dvb_channels_media_container_instance_init, NULL }; - static const GInterfaceInfo media_container1_info = { (GInterfaceInitFunc) dvb_channels_media_container_media_container1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_channels_media_container_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - dvb_channels_media_container_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelsMediaContainer", &g_define_type_info, 0); - g_type_add_interface_static (dvb_channels_media_container_type_id, TYPE_MEDIA_CONTAINER1, &media_container1_info); - g_type_add_interface_static (dvb_channels_media_container_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); - } - return dvb_channels_media_container_type_id; +/** + * 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 dvb_channels_media_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBChannelsMediaContainer * self; - self = DVB_CHANNELS_MEDIA_CONTAINER (object); +static void 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_CHANNELS_MEDIA_CONTAINER_PATH: - g_value_set_string (value, dvb_channels_media_container_get_Path (self)); + 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_CHANNELS_MEDIA_CONTAINER_PARENT: - g_value_set_boxed (value, media_object1_get_Parent ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_PARENT: + g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); break; - case DVB_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME: - g_value_set_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_DISPLAY_NAME: + g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); break; - case DVB_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT: + case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_ITEM_COUNT: g_value_set_uint (value, media_container1_get_ItemCount ((MediaContainer1*) self)); break; - case DVB_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT: + case DVB_MEDIA_SERVER_CHANNELS_MEDIA_CONTAINER_CONTAINER_COUNT: g_value_set_uint (value, media_container1_get_ContainerCount ((MediaContainer1*) self)); break; default: @@ -1016,84 +1056,84 @@ } -DVBChannelMediaItem* dvb_channel_media_item_construct (GType object_type, DVBChannel* channel, const char* parent) { - DVBChannelMediaItem * self; +DVBMediaServerChannelMediaItem* dvb_media_server_channel_media_item_construct (GType object_type, DVBChannel* channel, const char* parent) { + DVBMediaServerChannelMediaItem * self; DVBChannel* _tmp0_; char* _tmp1_; g_return_val_if_fail (channel != NULL, NULL); g_return_val_if_fail (parent != NULL, NULL); - self = (DVBChannelMediaItem*) g_object_new (object_type, NULL); + self = (DVBMediaServerChannelMediaItem*) g_object_new (object_type, NULL); self->priv->channel = (_tmp0_ = _g_object_ref0 (channel), _g_object_unref0 (self->priv->channel), _tmp0_); self->priv->parent = (_tmp1_ = g_strdup (parent), _g_free0 (self->priv->parent), _tmp1_); return self; } -DVBChannelMediaItem* dvb_channel_media_item_new (DVBChannel* channel, const char* parent) { - return dvb_channel_media_item_construct (DVB_TYPE_CHANNEL_MEDIA_ITEM, channel, parent); +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); } -char* dvb_channel_media_item_get_Path (DVBChannelMediaItem* self) { +char* dvb_media_server_channel_media_item_get_Path (DVBMediaServerChannelMediaItem* self) { char* result; g_return_val_if_fail (self != NULL, NULL); - result = g_strdup_printf (DVB_CHANNEL_PATH, dvb_channel_get_GroupId (self->priv->channel), dvb_channel_get_Sid (self->priv->channel)); + result = g_strdup_printf (DVB_MEDIA_SERVER_CHANNEL_PATH, dvb_channel_get_GroupId (self->priv->channel), dvb_channel_get_Sid (self->priv->channel)); return result; } -static char* dvb_channel_media_item_real_get_Parent (MediaObject1* base) { +static char* dvb_media_server_channel_media_item_real_get_Parent (MediaObject1* base) { char* result; - DVBChannelMediaItem* self; - self = (DVBChannelMediaItem*) base; + DVBMediaServerChannelMediaItem* self; + self = (DVBMediaServerChannelMediaItem*) base; result = g_strdup (self->priv->parent); return result; } -static char* dvb_channel_media_item_real_get_DisplayName (MediaObject1* base) { +static char* dvb_media_server_channel_media_item_real_get_DisplayName (MediaObject1* base) { char* result; - DVBChannelMediaItem* self; - self = (DVBChannelMediaItem*) base; + DVBMediaServerChannelMediaItem* self; + self = (DVBMediaServerChannelMediaItem*) base; result = g_strdup (dvb_channel_get_Name (self->priv->channel)); return result; } -static char** dvb_channel_media_item_real_get_URLs (MediaItem1* base, int* result_length1) { +static char** dvb_media_server_channel_media_item_real_get_URLs (MediaItem1* base, int* result_length1) { char** result; - DVBChannelMediaItem* self; + DVBMediaServerChannelMediaItem* self; char** _tmp0_ = NULL; char** _tmp1_; - self = (DVBChannelMediaItem*) base; + self = (DVBMediaServerChannelMediaItem*) base; result = (_tmp1_ = (_tmp0_ = g_new0 (char*, 1 + 1), _tmp0_[0] = dvb_channel_get_URL (self->priv->channel), _tmp0_), *result_length1 = 1, _tmp1_); return result; } -static char* dvb_channel_media_item_real_get_MIMEType (MediaItem1* base) { +static char* dvb_media_server_channel_media_item_real_get_MIMEType (MediaItem1* base) { char* result; - DVBChannelMediaItem* self; - self = (DVBChannelMediaItem*) base; + DVBMediaServerChannelMediaItem* self; + self = (DVBMediaServerChannelMediaItem*) base; result = g_strdup ("video/mpeg"); return result; } -static char* dvb_channel_media_item_real_get_Type (MediaItem1* base) { +static char* dvb_media_server_channel_media_item_real_get_Type (MediaItem1* base) { char* result; - DVBChannelMediaItem* self; - self = (DVBChannelMediaItem*) base; + DVBMediaServerChannelMediaItem* self; + self = (DVBMediaServerChannelMediaItem*) base; result = g_strdup ("video"); return result; } -void _dvb_channel_media_item_dbus_unregister (DBusConnection* connection, void* _user_data_) { +void _dvb_media_server_channel_media_item_dbus_unregister (DBusConnection* connection, void* _user_data_) { } -static DBusHandlerResult _dbus_dvb_channel_media_item_introspect (DVBChannelMediaItem* self, DBusConnection* connection, DBusMessage* message) { +static DBusHandlerResult _dbus_dvb_media_server_channel_media_item_introspect (DVBMediaServerChannelMediaItem* self, DBusConnection* connection, DBusMessage* message) { DBusMessage* reply; DBusMessageIter iter; GString* xml_data; @@ -1121,11 +1161,11 @@ } -DBusHandlerResult dvb_channel_media_item_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) { +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_channel_media_item_introspect (object, connection, message); + result = _dbus_dvb_media_server_channel_media_item_introspect (object, connection, message); } if (result == DBUS_HANDLER_RESULT_HANDLED) { return result; @@ -1139,10 +1179,10 @@ } -void dvb_channel_media_item_dbus_register_object (DBusConnection* connection, const char* path, void* object) { +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_channel_media_item_dbus_path_vtable, object); + 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); @@ -1150,81 +1190,91 @@ } -static void dvb_channel_media_item_class_init (DVBChannelMediaItemClass * klass) { - dvb_channel_media_item_parent_class = g_type_class_peek_parent (klass); - g_type_class_add_private (klass, sizeof (DVBChannelMediaItemPrivate)); - G_OBJECT_CLASS (klass)->get_property = dvb_channel_media_item_get_property; - G_OBJECT_CLASS (klass)->finalize = dvb_channel_media_item_finalize; - g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_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_CHANNEL_MEDIA_ITEM_PARENT, "Parent"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_MEDIA_ITEM_DISPLAY_NAME, "DisplayName"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_MEDIA_ITEM_MIME_TYPE, "MIMEType"); - g_object_class_override_property (G_OBJECT_CLASS (klass), DVB_CHANNEL_MEDIA_ITEM_TYPE, "Type"); - g_type_set_qdata (DVB_TYPE_CHANNEL_MEDIA_ITEM, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dvb_channel_media_item_dbus_vtable)); +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 = 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_channel_media_item_media_item1_interface_init (MediaItem1Iface * iface) { - dvb_channel_media_item_media_item1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_URLs = dvb_channel_media_item_real_get_URLs; - iface->get_MIMEType = dvb_channel_media_item_real_get_MIMEType; - iface->get_Type = dvb_channel_media_item_real_get_Type; +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_channel_media_item_media_object1_interface_init (MediaObject1Iface * iface) { - dvb_channel_media_item_media_object1_parent_iface = g_type_interface_peek_parent (iface); - iface->get_Parent = dvb_channel_media_item_real_get_Parent; - iface->get_DisplayName = dvb_channel_media_item_real_get_DisplayName; +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_channel_media_item_instance_init (DVBChannelMediaItem * self) { - self->priv = DVB_CHANNEL_MEDIA_ITEM_GET_PRIVATE (self); +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_channel_media_item_finalize (GObject* obj) { - DVBChannelMediaItem * self; - self = DVB_CHANNEL_MEDIA_ITEM (obj); +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_channel_media_item_parent_class)->finalize (obj); + G_OBJECT_CLASS (dvb_media_server_channel_media_item_parent_class)->finalize (obj); } -GType dvb_channel_media_item_get_type (void) { - static GType dvb_channel_media_item_type_id = 0; - if (dvb_channel_media_item_type_id == 0) { - static const GTypeInfo g_define_type_info = { sizeof (DVBChannelMediaItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_channel_media_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBChannelMediaItem), 0, (GInstanceInitFunc) dvb_channel_media_item_instance_init, NULL }; - static const GInterfaceInfo media_item1_info = { (GInterfaceInitFunc) dvb_channel_media_item_media_item1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo media_object1_info = { (GInterfaceInitFunc) dvb_channel_media_item_media_object1_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - dvb_channel_media_item_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBChannelMediaItem", &g_define_type_info, 0); - g_type_add_interface_static (dvb_channel_media_item_type_id, TYPE_MEDIA_ITEM1, &media_item1_info); - g_type_add_interface_static (dvb_channel_media_item_type_id, TYPE_MEDIA_OBJECT1, &media_object1_info); +/** + * 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_channel_media_item_type_id; + return dvb_media_server_channel_media_item_type_id__volatile; } -static void dvb_channel_media_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - DVBChannelMediaItem * self; - self = DVB_CHANNEL_MEDIA_ITEM (object); +static void 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_CHANNEL_MEDIA_ITEM_PATH: - g_value_set_string (value, dvb_channel_media_item_get_Path (self)); + 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_CHANNEL_MEDIA_ITEM_PARENT: - g_value_set_boxed (value, media_object1_get_Parent ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_PARENT: + g_value_take_string (value, media_object1_get_Parent ((MediaObject1*) self)); break; - case DVB_CHANNEL_MEDIA_ITEM_DISPLAY_NAME: - g_value_set_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); + case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_DISPLAY_NAME: + g_value_take_string (value, media_object1_get_DisplayName ((MediaObject1*) self)); break; - case DVB_CHANNEL_MEDIA_ITEM_MIME_TYPE: - g_value_set_string (value, media_item1_get_MIMEType ((MediaItem1*) self)); + case DVB_MEDIA_SERVER_CHANNEL_MEDIA_ITEM_UR_LS: + g_value_take_boxed (value, media_item1_get_URLs ((MediaItem1*) self, &length)); break; - case DVB_CHANNEL_MEDIA_ITEM_TYPE: - g_value_set_string (value, media_item1_get_Type ((MediaItem1*) self)); + 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); @@ -1243,57 +1293,56 @@ } -gboolean dvb_rygel_service_start_rygel_services (void) { - gboolean result; - GError * _inner_error_; - _inner_error_ = NULL; +gboolean dvb_media_server_start_rygel_services (void) { + gboolean result = FALSE; + GError * _inner_error_ = NULL; { DBusGConnection* conn; DBusGProxy* bus; guint request_name_result; conn = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch68_g_error; + goto __catch189_g_error; } bus = dbus_g_proxy_new_for_name (conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); - request_name_result = _dynamic_RequestName1 (bus, DVB_SERVICE_NAME, (guint) 0, &_inner_error_); + request_name_result = _dynamic_RequestName1 (bus, DVB_MEDIA_SERVER_SERVICE_NAME, (guint) 0, &_inner_error_); if (_inner_error_ != NULL) { - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); - goto __catch68_g_error; + _dbus_g_connection_unref0 (conn); + goto __catch189_g_error; } if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - DVBDeviceGroupsMediaContainer* _tmp0_; + DVBMediaServerDeviceGroupsMediaContainer* _tmp0_; char* _tmp1_; - g_message ("Services.vala:293: Creating new Rygel MediaServer D-Bus service"); - dvb_rygel_service_root_container = (_tmp0_ = dvb_device_groups_media_container_new (), _g_object_unref0 (dvb_rygel_service_root_container), _tmp0_); - dvb_device_groups_media_container_create_container_services (dvb_rygel_service_root_container); - _vala_dbus_register_object (dbus_g_connection_get_connection (conn), (const char*) (_tmp1_ = media_object1_get_Parent ((MediaObject1*) dvb_rygel_service_root_container)), (GObject*) dvb_rygel_service_root_container); + g_message ("Services.vala:291: Creating new Rygel MediaServer D-Bus service"); + dvb_media_server_root_container = (_tmp0_ = dvb_media_server_device_groups_media_container_new (), _g_object_unref0 (dvb_media_server_root_container), _tmp0_); + dvb_media_server_device_groups_media_container_create_container_services (dvb_media_server_root_container); + _vala_dbus_register_object (dbus_g_connection_get_connection (conn), (const char*) (_tmp1_ = media_object1_get_Parent ((MediaObject1*) dvb_media_server_root_container)), (GObject*) dvb_media_server_root_container); _g_free0 (_tmp1_); } else { - g_warning ("Services.vala:302: Rygel MediaServer D-Bus service is already running"); + g_warning ("Services.vala:300: Rygel MediaServer D-Bus service is already running"); result = FALSE; - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); + _dbus_g_connection_unref0 (conn); return result; } - _dbus_g_connection_unref0 (conn); _g_object_unref0 (bus); + _dbus_g_connection_unref0 (conn); } - goto __finally68; - __catch68_g_error: + goto __finally189; + __catch189_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Services.vala:307: Oops %s", e->message); + g_critical ("Services.vala:305: Oops %s", e->message); result = FALSE; _g_error_free0 (e); return result; } } - __finally68: + __finally189: 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_); @@ -1322,24 +1371,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/rygel/Services.vala gnome-dvb-daemon-0.1.21/src/rygel/Services.vala --- gnome-dvb-daemon-0.1.16/src/rygel/Services.vala 2009-11-14 14:24:47.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/rygel/Services.vala 2010-08-09 13:19:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Sebastian Pölsterl + * Copyright (C) 2009-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -19,7 +19,7 @@ using GLib; using Gee; -namespace DVB { +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"; @@ -124,7 +124,7 @@ } private void on_device_removed (uint group_id) { - this.containers.remove (group_id); + this.containers.unset (group_id); this.Updated (); } } @@ -275,40 +275,37 @@ } } - namespace RygelService { - - 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; - } + 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"); - } catch (Error e) { - error ("Oops %s", e.message); + // 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.16/src/Satellite/SatelliteChannel.c gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteChannel.c --- gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteChannel.c 2009-10-01 10:38:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteChannel.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* SatelliteChannel.c generated by valac, the Vala compiler +/* SatelliteChannel.c generated by valac 0.9.7, the Vala compiler * generated from SatelliteChannel.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -82,8 +82,8 @@ static gpointer dvb_satellite_channel_parent_class = NULL; -GType dvb_channel_get_type (void); -GType dvb_satellite_channel_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +GType dvb_satellite_channel_get_type (void) G_GNUC_CONST; #define DVB_SATELLITE_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_SATELLITE_CHANNEL, DVBSatelliteChannelPrivate)) enum { DVB_SATELLITE_CHANNEL_DUMMY_PROPERTY, @@ -91,21 +91,24 @@ DVB_SATELLITE_CHANNEL_SYMBOL_RATE, DVB_SATELLITE_CHANNEL_DISEQC_SOURCE }; +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); +static gboolean dvb_satellite_channel_real_is_valid (DVBChannel* base); gboolean dvb_channel_is_valid (DVBChannel* self); guint dvb_satellite_channel_get_SymbolRate (DVBSatelliteChannel* self); const char* dvb_satellite_channel_get_Polarization (DVBSatelliteChannel* self); -static gboolean dvb_satellite_channel_real_is_valid (DVBChannel* base); +static void dvb_satellite_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); guint dvb_channel_get_Frequency (DVBChannel* self); gint dvb_satellite_channel_get_DiseqcSource (DVBSatelliteChannel* self); -static void dvb_satellite_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); +static char* dvb_satellite_channel_real_to_string (DVBChannel* base); const char* dvb_channel_get_Name (DVBChannel* self); guint dvb_channel_get_VideoPID (DVBChannel* self); char* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -static char* dvb_satellite_channel_real_to_string (DVBChannel* base); -DVBChannel* dvb_channel_construct (GType object_type); 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 char* value); void dvb_satellite_channel_set_SymbolRate (DVBSatelliteChannel* self, guint value); void dvb_satellite_channel_set_DiseqcSource (DVBSatelliteChannel* self, gint value); @@ -116,9 +119,21 @@ +DVBSatelliteChannel* dvb_satellite_channel_construct_without_schedule (GType object_type) { + DVBSatelliteChannel * self; + self = (DVBSatelliteChannel*) dvb_channel_construct_without_schedule (object_type); + return self; +} + + +DVBSatelliteChannel* dvb_satellite_channel_new_without_schedule (void) { + return dvb_satellite_channel_construct_without_schedule (DVB_TYPE_SATELLITE_CHANNEL); +} + + static gboolean dvb_satellite_channel_real_is_valid (DVBChannel* base) { DVBSatelliteChannel * self; - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; self = (DVBSatelliteChannel*) base; @@ -156,7 +171,7 @@ static char* dvb_satellite_channel_real_to_string (DVBChannel* base) { DVBSatelliteChannel * self; - char* result; + char* result = NULL; char* _tmp0_; char* _tmp1_; self = (DVBSatelliteChannel*) base; @@ -252,12 +267,14 @@ GType dvb_satellite_channel_get_type (void) { - static GType dvb_satellite_channel_type_id = 0; - if (dvb_satellite_channel_type_id == 0) { + static volatile gsize dvb_satellite_channel_type_id__volatile = 0; + if (g_once_init_enter (&dvb_satellite_channel_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBSatelliteChannelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_satellite_channel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBSatelliteChannel), 0, (GInstanceInitFunc) dvb_satellite_channel_instance_init, NULL }; + GType dvb_satellite_channel_type_id; dvb_satellite_channel_type_id = g_type_register_static (DVB_TYPE_CHANNEL, "DVBSatelliteChannel", &g_define_type_info, 0); + g_once_init_leave (&dvb_satellite_channel_type_id__volatile, dvb_satellite_channel_type_id); } - return dvb_satellite_channel_type_id; + return dvb_satellite_channel_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteChannel.vala gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteChannel.vala --- gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteChannel.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteChannel.vala 2010-05-26 16:23:44.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -25,6 +25,10 @@ public string Polarization {get; set;} public uint SymbolRate {get; set;} public int DiseqcSource {get; set;} + + public SatelliteChannel.without_schedule () { + Channel.without_schedule (); + } public override bool is_valid () { return (base.is_valid () && this.SymbolRate != 0 diff -Nru gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteScanner.c gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteScanner.c --- gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteScanner.c 2010-02-23 13:10:56.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteScanner.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* SatelliteScanner.c generated by valac, the Vala compiler +/* SatelliteScanner.c generated by valac 0.9.7, the Vala compiler * generated from SatelliteScanner.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -26,10 +26,11 @@ #include #include #include +#include +#include +#include #include #include -#include -#include #define DVB_TYPE_ID_BUS_SATELLITE_SCANNER (dvb_id_bus_satellite_scanner_get_type ()) @@ -39,6 +40,7 @@ typedef struct _DVBIDBusSatelliteScanner DVBIDBusSatelliteScanner; typedef struct _DVBIDBusSatelliteScannerIface DVBIDBusSatelliteScannerIface; +typedef struct _DBusObjectVTable _DBusObjectVTable; #define _g_free0(var) (var = (g_free (var), NULL)) typedef struct _DVBIDBusSatelliteScannerDBusProxy DVBIDBusSatelliteScannerDBusProxy; typedef DBusGProxyClass DVBIDBusSatelliteScannerDBusProxyClass; @@ -105,8 +107,6 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; #define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#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 DVB_TYPE_SCANNED_SATTELITE_ITEM (dvb_scanned_sattelite_item_get_type ()) @@ -128,7 +128,7 @@ typedef struct _DVBSatelliteChannel DVBSatelliteChannel; typedef struct _DVBSatelliteChannelClass DVBSatelliteChannelClass; -typedef struct _DBusObjectVTable _DBusObjectVTable; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _DVBIDBusSatelliteScannerIface { GTypeInterface parent_iface; @@ -140,6 +140,10 @@ gboolean (*AddScanningDataFromFile) (DVBIDBusSatelliteScanner* self, const char* path, GError** error); }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _DVBIDBusSatelliteScannerDBusProxy { DBusGProxy parent_instance; gboolean disposed; @@ -153,7 +157,6 @@ GQueue* frequencies; GstStructure* current_tuning_params; GeeHashSet* scanned_frequencies; - GeeHashMap* transport_streams; }; struct _DVBScannerClass { @@ -162,6 +165,7 @@ DVBScannedItem* (*get_scanned_item) (DVBScanner* self, const GstStructure* structure); DVBChannel* (*get_new_channel) (DVBScanner* self); void (*add_values_from_structure_to_channel) (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); + void (*add_scanning_data_from_string) (DVBScanner* self, const char* line); }; struct _DVBSatelliteScanner { @@ -173,21 +177,20 @@ DVBScannerClass parent_class; }; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - static gpointer dvb_satellite_scanner_parent_class = NULL; static DVBIDBusSatelliteScannerIface* dvb_satellite_scanner_dvb_id_bus_satellite_scanner_parent_iface = NULL; -GType dvb_id_bus_satellite_scanner_get_type (void); +DVBIDBusSatelliteScanner* dvb_id_bus_satellite_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); gboolean dvb_id_bus_satellite_scanner_WriteAllChannelsToFile (DVBIDBusSatelliteScanner* self, const char* path, GError** error); gboolean dvb_id_bus_satellite_scanner_WriteChannelsToFile (DVBIDBusSatelliteScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); void dvb_id_bus_satellite_scanner_AddScanningData (DVBIDBusSatelliteScanner* self, guint frequency, const char* polarization, guint symbol_rate, GError** error); gboolean dvb_id_bus_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const char* path, 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_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); @@ -202,11 +205,12 @@ 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 char* name, const char* network, const char* type, gboolean scrambled, DBusConnection* _connection); -GType dvb_id_bus_satellite_scanner_dbus_proxy_get_type (void); -DVBIDBusSatelliteScanner* dvb_id_bus_satellite_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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 @@ -220,37 +224,36 @@ static void dvb_id_bus_satellite_scanner_dbus_proxy_dvb_id_bus_satellite_scanner__interface_init (DVBIDBusSatelliteScannerIface* iface); static void dvb_id_bus_satellite_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_id_bus_satellite_scanner_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -GType dvb_scanner_get_type (void); -GType dvb_scanned_item_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_channel_list_get_type (void); -GType dvb_satellite_scanner_get_type (void); +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_satellite_scanner_get_type (void) G_GNUC_CONST; enum { DVB_SATELLITE_SCANNER_DUMMY_PROPERTY }; -GType dvb_device_get_type (void); +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 inline void dvb_satellite_scanner_add_scanning_data (DVBSatelliteScanner* self, guint frequency, const char* polarization, guint symbol_rate); static void dvb_satellite_scanner_real_AddScanningData (DVBIDBusSatelliteScanner* base, guint frequency, const char* polarization, guint symbol_rate, GError** error); +static inline void dvb_satellite_scanner_add_scanning_data (DVBSatelliteScanner* self, guint frequency, const char* polarization, guint symbol_rate); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); -char* dvb_utils_read_file_contents (GFile* file, GError** error); -static gboolean dvb_satellite_scanner_real_AddScanningDataFromFile (DVBIDBusSatelliteScanner* base, const char* path, GError** error); -void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const char* key); +static void dvb_satellite_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line); static void dvb_satellite_scanner_real_prepare (DVBScanner* base); +void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const char* key); +static DVBScannedItem* dvb_satellite_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); DVBScannedSatteliteItem* dvb_scanned_sattelite_item_new (guint frequency, const char* polarization); DVBScannedSatteliteItem* dvb_scanned_sattelite_item_construct (GType object_type, guint frequency, const char* polarization); -GType dvb_scanned_sattelite_item_get_type (void); -static DVBScannedItem* dvb_satellite_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); -DVBSatelliteChannel* dvb_satellite_channel_new (void); -DVBSatelliteChannel* dvb_satellite_channel_construct (GType object_type); -GType dvb_satellite_channel_get_type (void); +GType dvb_scanned_sattelite_item_get_type (void) G_GNUC_CONST; static DVBChannel* dvb_satellite_scanner_real_get_new_channel (DVBScanner* base); +DVBSatelliteChannel* dvb_satellite_channel_new_without_schedule (void); +DVBSatelliteChannel* dvb_satellite_channel_construct_without_schedule (GType object_type); +GType dvb_satellite_channel_get_type (void) G_GNUC_CONST; +static void dvb_satellite_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); void dvb_channel_set_Frequency (DVBChannel* self, guint value); void dvb_satellite_channel_set_Polarization (DVBSatelliteChannel* self, const char* value); void dvb_satellite_channel_set_SymbolRate (DVBSatelliteChannel* self, guint value); void dvb_satellite_channel_set_DiseqcSource (DVBSatelliteChannel* self, gint value); -static void dvb_satellite_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); 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); @@ -259,12 +262,11 @@ void dvb_scanner_Destroy (DVBScanner* self, GError** error); gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const char* path, GError** error); gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); +gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const char* path, 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 gint _vala_array_length (gpointer array); static int _vala_strcmp0 (const char * str1, const char * str2); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -273,6 +275,7 @@ 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); void dvb_id_bus_satellite_scanner_Run (DVBIDBusSatelliteScanner* self, GError** error) { DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->Run (self, error); @@ -299,11 +302,36 @@ } +/** + * @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_satellite_scanner_AddScanningDataFromFile (DVBIDBusSatelliteScanner* self, const char* path, GError** error) { return DVB_ID_BUS_SATELLITE_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, 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_satellite_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -317,7 +345,7 @@ 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"); + 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]); @@ -1309,6 +1337,24 @@ } +static void _dbus_dvb_id_bus_satellite_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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)); @@ -1318,6 +1364,7 @@ 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); } @@ -1328,20 +1375,23 @@ g_signal_new ("frequency_scanned", DVB_TYPE_ID_BUS_SATELLITE_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_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)); } } GType dvb_id_bus_satellite_scanner_get_type (void) { - static GType dvb_id_bus_satellite_scanner_type_id = 0; - if (dvb_id_bus_satellite_scanner_type_id == 0) { + static volatile gsize dvb_id_bus_satellite_scanner_type_id__volatile = 0; + if (g_once_init_enter (&dvb_id_bus_satellite_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBIDBusSatelliteScannerIface), (GBaseInitFunc) dvb_id_bus_satellite_scanner_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + 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_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; + return dvb_id_bus_satellite_scanner_type_id__volatile; } @@ -1374,20 +1424,20 @@ static void _dbus_handle_dvb_id_bus_satellite_scanner_frequency_scanned (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint frequency = 0U; - dbus_uint32_t _tmp21_; + dbus_uint32_t _tmp30_; guint freq_left = 0U; - dbus_uint32_t _tmp22_; + 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, &_tmp21_); + dbus_message_iter_get_basic (&iter, &_tmp30_); dbus_message_iter_next (&iter); - frequency = _tmp21_; - dbus_message_iter_get_basic (&iter, &_tmp22_); + frequency = _tmp30_; + dbus_message_iter_get_basic (&iter, &_tmp31_); dbus_message_iter_next (&iter); - freq_left = _tmp22_; + freq_left = _tmp31_; g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); } @@ -1406,40 +1456,40 @@ static void _dbus_handle_dvb_id_bus_satellite_scanner_channel_added (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { DBusMessageIter iter; guint frequency = 0U; - dbus_uint32_t _tmp23_; + dbus_uint32_t _tmp32_; guint sid = 0U; - dbus_uint32_t _tmp24_; + dbus_uint32_t _tmp33_; char* name = NULL; - const char* _tmp25_; + const char* _tmp34_; char* network = NULL; - const char* _tmp26_; + const char* _tmp35_; char* type = NULL; - const char* _tmp27_; + const char* _tmp36_; gboolean scrambled = FALSE; - dbus_bool_t _tmp28_; + 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, &_tmp23_); + dbus_message_iter_get_basic (&iter, &_tmp32_); dbus_message_iter_next (&iter); - frequency = _tmp23_; - dbus_message_iter_get_basic (&iter, &_tmp24_); + frequency = _tmp32_; + dbus_message_iter_get_basic (&iter, &_tmp33_); dbus_message_iter_next (&iter); - sid = _tmp24_; - dbus_message_iter_get_basic (&iter, &_tmp25_); + sid = _tmp33_; + dbus_message_iter_get_basic (&iter, &_tmp34_); dbus_message_iter_next (&iter); - name = g_strdup (_tmp25_); - dbus_message_iter_get_basic (&iter, &_tmp26_); + name = g_strdup (_tmp34_); + dbus_message_iter_get_basic (&iter, &_tmp35_); dbus_message_iter_next (&iter); - network = g_strdup (_tmp26_); - dbus_message_iter_get_basic (&iter, &_tmp27_); + network = g_strdup (_tmp35_); + dbus_message_iter_get_basic (&iter, &_tmp36_); dbus_message_iter_next (&iter); - type = g_strdup (_tmp27_); - dbus_message_iter_get_basic (&iter, &_tmp28_); + type = g_strdup (_tmp36_); + dbus_message_iter_get_basic (&iter, &_tmp37_); dbus_message_iter_next (&iter); - scrambled = _tmp28_; + scrambled = _tmp37_; g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); _g_free0 (name); _g_free0 (network); @@ -1447,6 +1497,27 @@ } +static void _dbus_handle_dvb_id_bus_satellite_scanner_frontend_stats (DVBIDBusSatelliteScanner* self, DBusConnection* connection, DBusMessage* message) { + DBusMessageIter iter; + double signal_strength = 0.0; + double _tmp38_; + double 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_; + 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")) { @@ -1455,6 +1526,8 @@ _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); } } return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -1491,7 +1564,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "Run"); @@ -1505,78 +1578,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp29_; + const char* _tmp40_; _edomain = DBUS_GERROR; - _tmp29_ = _dbus_error.name + 27; - if (strcmp (_tmp29_, "Failed") == 0) { + _tmp40_ = _dbus_error.name + 27; + if (strcmp (_tmp40_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp29_, "NoMemory") == 0) { + } else if (strcmp (_tmp40_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp29_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp40_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp29_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp40_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp29_, "NoReply") == 0) { + } else if (strcmp (_tmp40_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp29_, "IOError") == 0) { + } else if (strcmp (_tmp40_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp29_, "BadAddress") == 0) { + } else if (strcmp (_tmp40_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp29_, "NotSupported") == 0) { + } else if (strcmp (_tmp40_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp29_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp40_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp29_, "AccessDenied") == 0) { + } else if (strcmp (_tmp40_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp29_, "AuthFailed") == 0) { + } else if (strcmp (_tmp40_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp29_, "NoServer") == 0) { + } else if (strcmp (_tmp40_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp29_, "Timeout") == 0) { + } else if (strcmp (_tmp40_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp29_, "NoNetwork") == 0) { + } else if (strcmp (_tmp40_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp29_, "AddressInUse") == 0) { + } else if (strcmp (_tmp40_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp29_, "Disconnected") == 0) { + } else if (strcmp (_tmp40_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp29_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp40_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp29_, "FileNotFound") == 0) { + } else if (strcmp (_tmp40_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp29_, "FileExists") == 0) { + } else if (strcmp (_tmp40_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp29_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp40_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp29_, "TimedOut") == 0) { + } else if (strcmp (_tmp40_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp29_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp40_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp29_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp40_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp29_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp40_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp29_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp40_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp29_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp40_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp29_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp40_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp29_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp40_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp29_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp40_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp29_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp40_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp29_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp40_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp29_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp40_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp29_, "RemoteException") == 0) { + } else if (strcmp (_tmp40_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1596,7 +1669,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1610,78 +1683,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp30_; + const char* _tmp41_; _edomain = DBUS_GERROR; - _tmp30_ = _dbus_error.name + 27; - if (strcmp (_tmp30_, "Failed") == 0) { + _tmp41_ = _dbus_error.name + 27; + if (strcmp (_tmp41_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp30_, "NoMemory") == 0) { + } else if (strcmp (_tmp41_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp30_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp41_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp30_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp41_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp30_, "NoReply") == 0) { + } else if (strcmp (_tmp41_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp30_, "IOError") == 0) { + } else if (strcmp (_tmp41_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp30_, "BadAddress") == 0) { + } else if (strcmp (_tmp41_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp30_, "NotSupported") == 0) { + } else if (strcmp (_tmp41_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp30_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp41_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp30_, "AccessDenied") == 0) { + } else if (strcmp (_tmp41_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp30_, "AuthFailed") == 0) { + } else if (strcmp (_tmp41_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp30_, "NoServer") == 0) { + } else if (strcmp (_tmp41_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp30_, "Timeout") == 0) { + } else if (strcmp (_tmp41_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp30_, "NoNetwork") == 0) { + } else if (strcmp (_tmp41_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp30_, "AddressInUse") == 0) { + } else if (strcmp (_tmp41_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp30_, "Disconnected") == 0) { + } else if (strcmp (_tmp41_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp30_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp41_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp30_, "FileNotFound") == 0) { + } else if (strcmp (_tmp41_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp30_, "FileExists") == 0) { + } else if (strcmp (_tmp41_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp30_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp41_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp30_, "TimedOut") == 0) { + } else if (strcmp (_tmp41_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp30_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp41_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp30_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp41_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp30_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp41_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp30_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp41_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp30_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp41_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp30_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp41_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp30_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp41_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp30_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp41_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp30_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp41_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp30_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp41_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp30_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp41_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp30_, "RemoteException") == 0) { + } else if (strcmp (_tmp41_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1700,17 +1773,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp31_; + const char* _tmp42_; gboolean _result; - dbus_bool_t _tmp32_; + dbus_bool_t _tmp43_; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp31_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp31_); + _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); @@ -1720,78 +1793,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp33_; + const char* _tmp44_; _edomain = DBUS_GERROR; - _tmp33_ = _dbus_error.name + 27; - if (strcmp (_tmp33_, "Failed") == 0) { + _tmp44_ = _dbus_error.name + 27; + if (strcmp (_tmp44_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp33_, "NoMemory") == 0) { + } else if (strcmp (_tmp44_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp33_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp44_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp33_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp44_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp33_, "NoReply") == 0) { + } else if (strcmp (_tmp44_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp33_, "IOError") == 0) { + } else if (strcmp (_tmp44_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp33_, "BadAddress") == 0) { + } else if (strcmp (_tmp44_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp33_, "NotSupported") == 0) { + } else if (strcmp (_tmp44_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp33_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp44_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp33_, "AccessDenied") == 0) { + } else if (strcmp (_tmp44_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp33_, "AuthFailed") == 0) { + } else if (strcmp (_tmp44_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp33_, "NoServer") == 0) { + } else if (strcmp (_tmp44_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp33_, "Timeout") == 0) { + } else if (strcmp (_tmp44_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp33_, "NoNetwork") == 0) { + } else if (strcmp (_tmp44_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp33_, "AddressInUse") == 0) { + } else if (strcmp (_tmp44_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp33_, "Disconnected") == 0) { + } else if (strcmp (_tmp44_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp33_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp44_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp33_, "FileNotFound") == 0) { + } else if (strcmp (_tmp44_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp33_, "FileExists") == 0) { + } else if (strcmp (_tmp44_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp33_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp44_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp33_, "TimedOut") == 0) { + } else if (strcmp (_tmp44_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp33_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp44_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp33_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp44_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp33_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp44_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp33_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp44_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp33_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp44_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp33_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp44_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp33_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp44_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp33_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp44_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp33_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp44_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp33_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp44_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp33_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp44_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp33_, "RemoteException") == 0) { + } else if (strcmp (_tmp44_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1801,9 +1874,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp32_); + dbus_message_iter_get_basic (&_iter, &_tmp43_); dbus_message_iter_next (&_iter); - _result = _tmp32_; + _result = _tmp43_; dbus_message_unref (_reply); return _result; } @@ -1814,29 +1887,29 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - guint* _tmp34_; - DBusMessageIter _tmp35_; - int _tmp36_; - const char* _tmp38_; + guint* _tmp45_; + DBusMessageIter _tmp46_; + int _tmp47_; + const char* _tmp49_; gboolean _result; - dbus_bool_t _tmp39_; + dbus_bool_t _tmp50_; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp34_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp35_); - for (_tmp36_ = 0; _tmp36_ < channel_sids_length1; _tmp36_++) { - dbus_uint32_t _tmp37_; - _tmp37_ = *_tmp34_; - dbus_message_iter_append_basic (&_tmp35_, DBUS_TYPE_UINT32, &_tmp37_); - _tmp34_++; - } - dbus_message_iter_close_container (&_iter, &_tmp35_); - _tmp38_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp38_); + _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); @@ -1846,78 +1919,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp40_; + const char* _tmp51_; _edomain = DBUS_GERROR; - _tmp40_ = _dbus_error.name + 27; - if (strcmp (_tmp40_, "Failed") == 0) { + _tmp51_ = _dbus_error.name + 27; + if (strcmp (_tmp51_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp40_, "NoMemory") == 0) { + } else if (strcmp (_tmp51_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp40_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp51_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp40_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp51_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp40_, "NoReply") == 0) { + } else if (strcmp (_tmp51_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp40_, "IOError") == 0) { + } else if (strcmp (_tmp51_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp40_, "BadAddress") == 0) { + } else if (strcmp (_tmp51_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp40_, "NotSupported") == 0) { + } else if (strcmp (_tmp51_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp40_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp51_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp40_, "AccessDenied") == 0) { + } else if (strcmp (_tmp51_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp40_, "AuthFailed") == 0) { + } else if (strcmp (_tmp51_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp40_, "NoServer") == 0) { + } else if (strcmp (_tmp51_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp40_, "Timeout") == 0) { + } else if (strcmp (_tmp51_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp40_, "NoNetwork") == 0) { + } else if (strcmp (_tmp51_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp40_, "AddressInUse") == 0) { + } else if (strcmp (_tmp51_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp40_, "Disconnected") == 0) { + } else if (strcmp (_tmp51_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp40_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp51_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp40_, "FileNotFound") == 0) { + } else if (strcmp (_tmp51_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp40_, "FileExists") == 0) { + } else if (strcmp (_tmp51_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp40_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp51_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp40_, "TimedOut") == 0) { + } else if (strcmp (_tmp51_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp40_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp51_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp40_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp51_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp40_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp51_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp40_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp51_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp40_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp51_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp40_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp51_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp40_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp51_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp40_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp51_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp40_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp51_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp40_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp51_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp40_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp51_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp40_, "RemoteException") == 0) { + } else if (strcmp (_tmp51_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1927,9 +2000,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp39_); + dbus_message_iter_get_basic (&_iter, &_tmp50_); dbus_message_iter_next (&_iter); - _result = _tmp39_; + _result = _tmp50_; dbus_message_unref (_reply); return _result; } @@ -1940,21 +2013,21 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp41_; - const char* _tmp42_; - dbus_uint32_t _tmp43_; + dbus_uint32_t _tmp52_; + const char* _tmp53_; + dbus_uint32_t _tmp54_; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp41_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp41_); - _tmp42_ = polarization; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp42_); - _tmp43_ = symbol_rate; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp43_); + _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); @@ -1964,78 +2037,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp44_; + const char* _tmp55_; _edomain = DBUS_GERROR; - _tmp44_ = _dbus_error.name + 27; - if (strcmp (_tmp44_, "Failed") == 0) { + _tmp55_ = _dbus_error.name + 27; + if (strcmp (_tmp55_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp44_, "NoMemory") == 0) { + } else if (strcmp (_tmp55_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp44_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp55_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp44_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp55_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp44_, "NoReply") == 0) { + } else if (strcmp (_tmp55_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp44_, "IOError") == 0) { + } else if (strcmp (_tmp55_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp44_, "BadAddress") == 0) { + } else if (strcmp (_tmp55_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp44_, "NotSupported") == 0) { + } else if (strcmp (_tmp55_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp44_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp55_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp44_, "AccessDenied") == 0) { + } else if (strcmp (_tmp55_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp44_, "AuthFailed") == 0) { + } else if (strcmp (_tmp55_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp44_, "NoServer") == 0) { + } else if (strcmp (_tmp55_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp44_, "Timeout") == 0) { + } else if (strcmp (_tmp55_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp44_, "NoNetwork") == 0) { + } else if (strcmp (_tmp55_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp44_, "AddressInUse") == 0) { + } else if (strcmp (_tmp55_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp44_, "Disconnected") == 0) { + } else if (strcmp (_tmp55_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp44_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp55_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp44_, "FileNotFound") == 0) { + } else if (strcmp (_tmp55_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp44_, "FileExists") == 0) { + } else if (strcmp (_tmp55_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp44_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp55_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp44_, "TimedOut") == 0) { + } else if (strcmp (_tmp55_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp44_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp55_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp44_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp55_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp44_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp55_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp55_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp44_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp55_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp44_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp55_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp44_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp55_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp44_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp55_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp44_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp55_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp44_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp55_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp44_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp55_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp44_, "RemoteException") == 0) { + } else if (strcmp (_tmp55_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -2054,17 +2127,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp45_; + const char* _tmp56_; gboolean _result; - dbus_bool_t _tmp46_; + dbus_bool_t _tmp57_; if (((DVBIDBusSatelliteScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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", "AddScanningDataFromFile"); dbus_message_iter_init_append (_message, &_iter); - _tmp45_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp45_); + _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); @@ -2074,78 +2147,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp47_; + const char* _tmp58_; _edomain = DBUS_GERROR; - _tmp47_ = _dbus_error.name + 27; - if (strcmp (_tmp47_, "Failed") == 0) { + _tmp58_ = _dbus_error.name + 27; + if (strcmp (_tmp58_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp47_, "NoMemory") == 0) { + } else if (strcmp (_tmp58_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp47_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp58_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp47_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp58_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp47_, "NoReply") == 0) { + } else if (strcmp (_tmp58_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp47_, "IOError") == 0) { + } else if (strcmp (_tmp58_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp47_, "BadAddress") == 0) { + } else if (strcmp (_tmp58_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp47_, "NotSupported") == 0) { + } else if (strcmp (_tmp58_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp47_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp58_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp47_, "AccessDenied") == 0) { + } else if (strcmp (_tmp58_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp47_, "AuthFailed") == 0) { + } else if (strcmp (_tmp58_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp47_, "NoServer") == 0) { + } else if (strcmp (_tmp58_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp47_, "Timeout") == 0) { + } else if (strcmp (_tmp58_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp47_, "NoNetwork") == 0) { + } else if (strcmp (_tmp58_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp47_, "AddressInUse") == 0) { + } else if (strcmp (_tmp58_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp47_, "Disconnected") == 0) { + } else if (strcmp (_tmp58_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp47_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp58_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp47_, "FileNotFound") == 0) { + } else if (strcmp (_tmp58_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp47_, "FileExists") == 0) { + } else if (strcmp (_tmp58_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp47_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp58_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp47_, "TimedOut") == 0) { + } else if (strcmp (_tmp58_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp47_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp58_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp47_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp58_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp47_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp58_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp47_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp58_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp47_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp58_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp47_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp58_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp47_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp58_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp47_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp58_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp47_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp58_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp47_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp58_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp47_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp58_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp47_, "RemoteException") == 0) { + } else if (strcmp (_tmp58_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2155,9 +2228,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp46_); + dbus_message_iter_get_basic (&_iter, &_tmp57_); dbus_message_iter_next (&_iter); - _result = _tmp46_; + _result = _tmp57_; dbus_message_unref (_reply); return _result; } @@ -2217,148 +2290,60 @@ } -static char* string_chug (const char* self) { - char* result; - char* _result_; - g_return_val_if_fail (self != NULL, NULL); - _result_ = g_strdup (self); - g_strchug (_result_); - result = _result_; - return result; -} - - -static gboolean dvb_satellite_scanner_real_AddScanningDataFromFile (DVBIDBusSatelliteScanner* base, const char* path, GError** error) { +static void dvb_satellite_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line) { DVBSatelliteScanner * self; - gboolean result; - GError * _inner_error_; - GFile* datafile; - char* contents; + gint cols_length1; + gint _cols_size_; + char** _tmp1_; + char** _tmp0_; + char** cols; + gint cols_length; + guint freq; + guint symbol_rate; + char* pol; + char* lower_pol; self = (DVBSatelliteScanner*) base; - g_return_val_if_fail (path != NULL, FALSE); - _inner_error_ = NULL; - datafile = g_file_new_for_path (path); - g_debug ("SatelliteScanner.vala:74: Reading scanning data from %s", path); - contents = NULL; - { - char* _tmp0_; - char* _tmp1_; - _tmp0_ = dvb_utils_read_file_contents (datafile, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch1_g_error; - } - contents = (_tmp1_ = _tmp0_, _g_free0 (contents), _tmp1_); - } - goto __finally1; - __catch1_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("SatelliteScanner.vala:80: Could not read %s: %s", e->message, path); - _g_error_free0 (e); - } + g_return_if_fail (line != NULL); + cols = (_tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp0_), _cols_size_ = cols_length1, _tmp1_); + cols_length = 0; + while (TRUE) { + if (!(cols[cols_length] != NULL)) { + break; + } + cols_length++; + } + cols_length++; + if (cols_length < 5) { + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); + return; } - __finally1: - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (datafile); - _g_free0 (contents); - return FALSE; + freq = (guint) atoi (cols[1]); + symbol_rate = ((guint) atoi (cols[3])) / 1000; + pol = NULL; + lower_pol = g_utf8_strdown (cols[2], -1); + if (_vala_strcmp0 (lower_pol, "h") == 0) { + char* _tmp2_; + pol = (_tmp2_ = g_strdup ("horizontal"), _g_free0 (pol), _tmp2_); + } else { + if (_vala_strcmp0 (lower_pol, "v") == 0) { + char* _tmp3_; + pol = (_tmp3_ = g_strdup ("vertical"), _g_free0 (pol), _tmp3_); } else { - _g_object_unref0 (datafile); - _g_free0 (contents); - 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_free0 (lower_pol); + _g_free0 (pol); + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); + return; } } - if (contents == NULL) { - result = FALSE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; - } - { - char** _tmp2_; - char** line_collection; - int line_collection_length1; - int line_it; - line_collection = _tmp2_ = g_strsplit (contents, "\n", 0); - line_collection_length1 = _vala_array_length (_tmp2_); - for (line_it = 0; line_it < _vala_array_length (_tmp2_); line_it = line_it + 1) { - char* line; - line = g_strdup (line_collection[line_it]); - { - char* _tmp3_; - char** _tmp5_; - gint cols_size; - gint cols_length1; - char** _tmp4_; - char** cols; - gint cols_length; - guint freq; - guint symbol_rate; - char* pol; - char* lower_pol; - line = (_tmp3_ = string_chug (line), _g_free0 (line), _tmp3_); - if (g_str_has_prefix (line, "#")) { - _g_free0 (line); - continue; - } - cols = (_tmp5_ = _tmp4_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp4_), cols_size = cols_length1, _tmp5_); - cols_length = 0; - while (TRUE) { - if (!(cols[cols_length] != NULL)) { - break; - } - cols_length++; - } - cols_length++; - if (cols_length < 5) { - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - continue; - } - freq = (guint) atoi (cols[1]); - symbol_rate = ((guint) atoi (cols[3])) / 1000; - pol = NULL; - lower_pol = g_utf8_strdown (cols[2], -1); - if (_vala_strcmp0 (lower_pol, "h") == 0) { - char* _tmp6_; - pol = (_tmp6_ = g_strdup ("horizontal"), _g_free0 (pol), _tmp6_); - } else { - if (_vala_strcmp0 (lower_pol, "v") == 0) { - char* _tmp7_; - pol = (_tmp7_ = g_strdup ("vertical"), _g_free0 (pol), _tmp7_); - } else { - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (pol); - _g_free0 (lower_pol); - continue; - } - } - dvb_satellite_scanner_add_scanning_data (self, freq, pol, symbol_rate); - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (pol); - _g_free0 (lower_pol); - } - } - line_collection = (_vala_array_free (line_collection, line_collection_length1, (GDestroyNotify) g_free), NULL); - } - result = TRUE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; + dvb_satellite_scanner_add_scanning_data (self, freq, pol, symbol_rate); + _g_free0 (lower_pol); + _g_free0 (pol); + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); } static char* string_substring (const char* self, glong offset, glong len) { - char* result; + char* result = NULL; glong string_length; const char* start; g_return_val_if_fail (self != NULL, NULL); @@ -2382,17 +2367,17 @@ static void dvb_satellite_scanner_real_prepare (DVBScanner* base) { DVBSatelliteScanner * self; GstElement* dvbsrc; - char** _tmp1_; - gint uint_keys_size; gint uint_keys_length1; + gint _uint_keys_size_; + char** _tmp1_; char** _tmp0_ = NULL; char** uint_keys; char* polarity; guint code_rate = 0U; self = (DVBSatelliteScanner*) base; - g_debug ("SatelliteScanner.vala:121: Setting up pipeline for DVB-S scan"); + g_debug ("SatelliteScanner.vala:103: Setting up pipeline for DVB-S scan"); dvbsrc = gst_bin_get_by_name (GST_BIN (DVB_SCANNER (self)->pipeline), "dvbsrc"); - uint_keys = (_tmp1_ = (_tmp0_ = g_new0 (char*, 2 + 1), _tmp0_[0] = g_strdup ("frequency"), _tmp0_[1] = g_strdup ("symbol-rate"), _tmp0_), uint_keys_length1 = 2, uint_keys_size = uint_keys_length1, _tmp1_); + uint_keys = (_tmp1_ = (_tmp0_ = g_new0 (char*, 2 + 1), _tmp0_[0] = g_strdup ("frequency"), _tmp0_[1] = g_strdup ("symbol-rate"), _tmp0_), uint_keys_length1 = 2, _uint_keys_size_ = uint_keys_length1, _tmp1_); { char** key_collection; int key_collection_length1; @@ -2412,15 +2397,15 @@ g_object_set ((GObject*) dvbsrc, "polarity", polarity, NULL); gst_structure_get_uint (DVB_SCANNER (self)->current_tuning_params, "inner-fec", &code_rate); g_object_set ((GObject*) dvbsrc, "code-rate-hp", code_rate, NULL); - _gst_object_unref0 (dvbsrc); - uint_keys = (_vala_array_free (uint_keys, uint_keys_length1, (GDestroyNotify) g_free), NULL); _g_free0 (polarity); + uint_keys = (_vala_array_free (uint_keys, uint_keys_length1, (GDestroyNotify) g_free), NULL); + _gst_object_unref0 (dvbsrc); } static DVBScannedItem* dvb_satellite_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure) { DVBSatelliteScanner * self; - DVBScannedItem* result; + DVBScannedItem* result = NULL; char* pol; guint freq = 0U; self = (DVBSatelliteScanner*) base; @@ -2435,9 +2420,9 @@ static DVBChannel* dvb_satellite_scanner_real_get_new_channel (DVBScanner* base) { DVBSatelliteScanner * self; - DVBChannel* result; + DVBChannel* result = NULL; self = (DVBSatelliteScanner*) base; - result = (DVBChannel*) dvb_satellite_channel_new (); + result = (DVBChannel*) dvb_satellite_channel_new_without_schedule (); return result; } @@ -2484,7 +2469,7 @@ 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"); + 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]); @@ -2531,6 +2516,7 @@ static void dvb_satellite_scanner_class_init (DVBSatelliteScannerClass * klass) { dvb_satellite_scanner_parent_class = g_type_class_peek_parent (klass); + DVB_SCANNER_CLASS (klass)->add_scanning_data_from_string = dvb_satellite_scanner_real_add_scanning_data_from_string; DVB_SCANNER_CLASS (klass)->prepare = dvb_satellite_scanner_real_prepare; 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; @@ -2542,11 +2528,11 @@ 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 = dvb_satellite_scanner_real_AddScanningData; - iface->AddScanningDataFromFile = dvb_satellite_scanner_real_AddScanningDataFromFile; iface->Run = (void (*)(DVBIDBusSatelliteScanner* ,GError**)) dvb_scanner_Run; iface->Destroy = (void (*)(DVBIDBusSatelliteScanner* ,GError**)) dvb_scanner_Destroy; iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,const char* ,GError**)) dvb_scanner_WriteAllChannelsToFile; iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,guint* ,int ,const char* ,GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusSatelliteScanner* ,const char* ,GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2555,14 +2541,16 @@ GType dvb_satellite_scanner_get_type (void) { - static GType dvb_satellite_scanner_type_id = 0; - if (dvb_satellite_scanner_type_id == 0) { + 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}; + 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_once_init_leave (&dvb_satellite_scanner_type_id__volatile, dvb_satellite_scanner_type_id); } - return dvb_satellite_scanner_type_id; + return dvb_satellite_scanner_type_id__volatile; } @@ -2607,25 +2595,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); -} - - 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); @@ -2665,4 +2634,23 @@ } +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, double arg_1, double 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); +} + + diff -Nru gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteScanner.vala gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteScanner.vala --- gnome-dvb-daemon-0.1.16/src/Satellite/SatelliteScanner.vala 2009-11-14 14:21:17.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Satellite/SatelliteScanner.vala 2010-06-13 11:05:15.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -28,6 +28,8 @@ 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; @@ -68,53 +70,33 @@ base.add_structure_to_scan (tuning_params); } - public bool AddScanningDataFromFile (string path) throws DBus.Error { - File datafile = File.new_for_path(path); + protected override void add_scanning_data_from_string (string line) { + // line looks like: + // S freq pol sr fec + string[] cols = Regex.split_simple ("\\s+", line); - debug ("Reading scanning data from %s", path); + int cols_length = 0; + while (cols[cols_length] != null) + cols_length++; + cols_length++; - string? contents = null; - try { - contents = Utils.read_file_contents (datafile); - } catch (Error e) { - critical ("Could not read %s: %s", e.message, path); - } + if (cols_length < 5) return; - if (contents == null) return false; + uint freq = (uint)cols[1].to_int (); + uint symbol_rate = (uint)cols[3].to_int () / 1000; - // line looks like: - // S freq pol sr fec - foreach (string line in contents.split("\n")) { - line = line.chug (); - if (line.has_prefix ("#")) continue; - - string[] cols = Regex.split_simple ("\\s+", line); - - int cols_length = 0; - while (cols[cols_length] != null) - cols_length++; - cols_length++; - - if (cols_length < 5) continue; - - uint freq = (uint)cols[1].to_int (); - uint symbol_rate = (uint)cols[3].to_int () / 1000; - - string pol; - string lower_pol = cols[2].down (); - if (lower_pol == "h") - pol = "horizontal"; - else if (lower_pol == "v") - pol = "vertical"; - else - continue; - - // TODO what about fec? - - this.add_scanning_data (freq, pol, symbol_rate); - } + string pol; + string lower_pol = cols[2].down (); + if (lower_pol == "h") + pol = "horizontal"; + else if (lower_pol == "v") + pol = "vertical"; + else + return; + + // TODO what about fec? - return true; + this.add_scanning_data (freq, pol, symbol_rate); } protected override void prepare () { @@ -149,7 +131,7 @@ } protected override Channel get_new_channel () { - return new SatelliteChannel (); + return new SatelliteChannel.without_schedule (); } protected override void add_values_from_structure_to_channel ( diff -Nru gnome-dvb-daemon-0.1.16/src/ScannedItem.c gnome-dvb-daemon-0.1.21/src/ScannedItem.c --- gnome-dvb-daemon-0.1.16/src/ScannedItem.c 2009-11-14 14:13:38.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/ScannedItem.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* ScannedItem.c generated by valac, the Vala compiler +/* ScannedItem.c generated by valac 0.9.7, the Vala compiler * generated from ScannedItem.vala, do not modify */ /* @@ -80,7 +80,7 @@ static gpointer dvb_scanned_item_parent_class = NULL; static gpointer dvb_scanned_sattelite_item_parent_class = NULL; -GType dvb_scanned_item_get_type (void); +GType dvb_scanned_item_get_type (void) G_GNUC_CONST; #define DVB_SCANNED_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_SCANNED_ITEM, DVBScannedItemPrivate)) enum { DVB_SCANNED_ITEM_DUMMY_PROPERTY, @@ -89,10 +89,10 @@ #define DVB_SCANNED_ITEM_PRIME 31 DVBScannedItem* dvb_scanned_item_new (guint frequency); DVBScannedItem* dvb_scanned_item_construct (GType object_type, guint frequency); -GType dvb_scanned_sattelite_item_get_type (void); +guint dvb_scanned_item_hash (DVBScannedItem* o); +GType dvb_scanned_sattelite_item_get_type (void) G_GNUC_CONST; guint dvb_scanned_item_get_Frequency (DVBScannedItem* self); const char* dvb_scanned_sattelite_item_get_Polarization (DVBScannedSatteliteItem* self); -guint dvb_scanned_item_hash (DVBScannedItem* o); gboolean dvb_scanned_item_equal (DVBScannedItem* o1, DVBScannedItem* o2); static void dvb_scanned_item_set_Frequency (DVBScannedItem* self, guint value); static void dvb_scanned_item_finalize (GObject* obj); @@ -126,7 +126,7 @@ guint dvb_scanned_item_hash (DVBScannedItem* o) { - guint result; + guint result = 0U; guint hashval = 0U; if (DVB_IS_SCANNED_SATTELITE_ITEM (o)) { hashval = ((2 * DVB_SCANNED_ITEM_PRIME) + (DVB_SCANNED_ITEM_PRIME * o->priv->_Frequency)) + g_str_hash (dvb_scanned_sattelite_item_get_Polarization (DVB_SCANNED_SATTELITE_ITEM (o))); @@ -148,7 +148,7 @@ gboolean dvb_scanned_item_equal (DVBScannedItem* o1, DVBScannedItem* o2) { - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; if (o1 == NULL) { _tmp0_ = TRUE; @@ -175,8 +175,8 @@ _tmp1_ = FALSE; } result = _tmp1_; - _g_object_unref0 (item1); _g_object_unref0 (item2); + _g_object_unref0 (item1); return result; } else { if (DVB_IS_SCANNED_ITEM (o1)) { @@ -185,8 +185,8 @@ item1 = _g_object_ref0 (DVB_SCANNED_ITEM (o1)); item2 = _g_object_ref0 (DVB_SCANNED_ITEM (o2)); result = item1->priv->_Frequency == item2->priv->_Frequency; - _g_object_unref0 (item1); _g_object_unref0 (item2); + _g_object_unref0 (item1); return result; } else { g_critical ("ScannedItem.vala:68: Don't comparing ScannedItem instances"); @@ -234,13 +234,19 @@ } +/** + * This class represents a frequency and possibly other parameters + * that are necessary to mark a frequency as scanned + */ GType dvb_scanned_item_get_type (void) { - static GType dvb_scanned_item_type_id = 0; - if (dvb_scanned_item_type_id == 0) { + static volatile gsize dvb_scanned_item_type_id__volatile = 0; + if (g_once_init_enter (&dvb_scanned_item_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBScannedItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_scanned_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBScannedItem), 0, (GInstanceInitFunc) dvb_scanned_item_instance_init, NULL }; + GType dvb_scanned_item_type_id; dvb_scanned_item_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBScannedItem", &g_define_type_info, 0); + g_once_init_leave (&dvb_scanned_item_type_id__volatile, dvb_scanned_item_type_id); } - return dvb_scanned_item_type_id; + return dvb_scanned_item_type_id__volatile; } @@ -325,12 +331,14 @@ GType dvb_scanned_sattelite_item_get_type (void) { - static GType dvb_scanned_sattelite_item_type_id = 0; - if (dvb_scanned_sattelite_item_type_id == 0) { + static volatile gsize dvb_scanned_sattelite_item_type_id__volatile = 0; + if (g_once_init_enter (&dvb_scanned_sattelite_item_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBScannedSatteliteItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_scanned_sattelite_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBScannedSatteliteItem), 0, (GInstanceInitFunc) dvb_scanned_sattelite_item_instance_init, NULL }; + GType dvb_scanned_sattelite_item_type_id; dvb_scanned_sattelite_item_type_id = g_type_register_static (DVB_TYPE_SCANNED_ITEM, "DVBScannedSatteliteItem", &g_define_type_info, 0); + g_once_init_leave (&dvb_scanned_sattelite_item_type_id__volatile, dvb_scanned_sattelite_item_type_id); } - return dvb_scanned_sattelite_item_type_id; + return dvb_scanned_sattelite_item_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Scanner.c gnome-dvb-daemon-0.1.21/src/Scanner.c --- gnome-dvb-daemon-0.1.16/src/Scanner.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Scanner.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Scanner.c generated by valac, the Vala compiler +/* Scanner.c generated by valac 0.9.7, the Vala compiler * generated from Scanner.vala, do not modify */ /* @@ -23,13 +23,15 @@ #include #include #include -#include #include #include -#include -#include +#include #include #include +#include +#include +#include +#include #define DVB_TYPE_SCANNER (dvb_scanner_get_type ()) @@ -92,15 +94,15 @@ #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_CHANNEL_LIST_WRITER (dvb_channel_list_writer_get_type ()) -#define DVB_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriter)) -#define DVB_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriterClass)) -#define DVB_IS_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_TYPE_CHANNEL_LIST_WRITER)) -#define DVB_IS_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_TYPE_CHANNEL_LIST_WRITER)) -#define DVB_CHANNEL_LIST_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_TYPE_CHANNEL_LIST_WRITER, DVBChannelListWriterClass)) +#define DVB_IO_TYPE_CHANNEL_LIST_WRITER (dvb_io_channel_list_writer_get_type ()) +#define DVB_IO_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriter)) +#define DVB_IO_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriterClass)) +#define DVB_IO_IS_CHANNEL_LIST_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER)) +#define DVB_IO_IS_CHANNEL_LIST_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_IO_TYPE_CHANNEL_LIST_WRITER)) +#define DVB_IO_CHANNEL_LIST_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_IO_TYPE_CHANNEL_LIST_WRITER, DVBioChannelListWriterClass)) -typedef struct _DVBChannelListWriter DVBChannelListWriter; -typedef struct _DVBChannelListWriterClass DVBChannelListWriterClass; +typedef struct _DVBioChannelListWriter DVBioChannelListWriter; +typedef struct _DVBioChannelListWriterClass DVBioChannelListWriterClass; #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) #define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) @@ -112,7 +114,6 @@ GQueue* frequencies; GstStructure* current_tuning_params; GeeHashSet* scanned_frequencies; - GeeHashMap* transport_streams; }; struct _DVBScannerClass { @@ -121,6 +122,7 @@ DVBScannedItem* (*get_scanned_item) (DVBScanner* self, const GstStructure* structure); DVBChannel* (*get_new_channel) (DVBScanner* self); void (*add_values_from_structure_to_channel) (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); + void (*add_scanning_data_from_string) (DVBScanner* self, const char* line); }; struct _DVBScannerPrivate { @@ -129,6 +131,7 @@ GStaticRecMutex __lock_new_channels; GSource* check_for_lock_source; GSource* wait_for_tables_source; + GSource* start_scan_source; gboolean nit_arrived; gboolean sdt_arrived; gboolean pat_arrived; @@ -144,20 +147,20 @@ static gpointer dvb_scanner_parent_class = NULL; -GType dvb_scanner_get_type (void); -GType dvb_scanned_item_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_channel_list_get_type (void); -GType dvb_device_get_type (void); +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_device_get_type (void) G_GNUC_CONST; #define DVB_SCANNER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_SCANNER, DVBScannerPrivate)) enum { DVB_SCANNER_DUMMY_PROPERTY, DVB_SCANNER_DEVICE, DVB_SCANNER_CHANNELS }; -#define DVB_SCANNER_BASE_PIDS "16:17:18" +#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=0 ! mpegtsparse ! fakesink silent=true" +"rval=100 ! mpegtsparse ! fakesink silent=true" void dvb_scanner_prepare (DVBScanner* self); static void dvb_scanner_real_prepare (DVBScanner* self); DVBScannedItem* dvb_scanner_get_scanned_item (DVBScanner* self, const GstStructure* structure); @@ -166,6 +169,9 @@ static DVBChannel* dvb_scanner_real_get_new_channel (DVBScanner* self); void dvb_scanner_add_values_from_structure_to_channel (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); static void dvb_scanner_real_add_values_from_structure_to_channel (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); +void dvb_scanner_add_scanning_data_from_string (DVBScanner* self, const char* line); +static void dvb_scanner_real_add_scanning_data_from_string (DVBScanner* self, const char* line); +void dvb_scanner_Run (DVBScanner* self, GError** error); static void* dvb_scanner_worker (DVBScanner* self); static void* _dvb_scanner_worker_gthread_func (gpointer self); DVBChannelList* dvb_channel_list_new (GFile* channels); @@ -175,56 +181,57 @@ guint dvb_device_get_Frontend (DVBDevice* self); gboolean dvb_scanner_bus_watch_func (DVBScanner* self, GstBus* bus, GstMessage* message); static gboolean _dvb_scanner_bus_watch_func_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self); -gboolean dvb_scanner_start_scan (DVBScanner* self); -static gboolean _dvb_scanner_start_scan_gsource_func (gpointer self); -void dvb_scanner_Run (DVBScanner* self, GError** error); -void dvb_scanner_do_destroy (DVBScanner* self); +void dvb_scanner_queue_start_scan (DVBScanner* self); void dvb_scanner_Destroy (DVBScanner* self, GError** error); +void dvb_scanner_do_destroy (DVBScanner* self); +void dvb_scanner_destroy_start_scan_source (DVBScanner* self); void dvb_scanner_remove_check_for_lock_timeout (DVBScanner* self); void dvb_scanner_remove_wait_for_tables_timeout (DVBScanner* self); void dvb_scanner_clear_and_reset_all (DVBScanner* self); void dvb_channel_list_clear (DVBChannelList* self); -DVBChannelListWriter* dvb_channel_list_writer_new (GFile* file); -DVBChannelListWriter* dvb_channel_list_writer_construct (GType object_type, GFile* file); -GType dvb_channel_list_writer_get_type (void); -void dvb_channel_list_writer_write (DVBChannelListWriter* self, DVBChannel* channel, GError** error); -gboolean dvb_channel_list_writer_close (DVBChannelListWriter* self, GError** error); gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const char* path, GError** error); -DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); +DVBioChannelListWriter* dvb_io_channel_list_writer_new (GFile* file); +DVBioChannelListWriter* dvb_io_channel_list_writer_construct (GType object_type, GFile* file); +GType dvb_io_channel_list_writer_get_type (void) G_GNUC_CONST; +void dvb_io_channel_list_writer_write (DVBioChannelListWriter* self, DVBChannel* channel, GError** error); +gboolean dvb_io_channel_list_writer_close (DVBioChannelListWriter* self, GError** error); gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); +DVBChannel* dvb_channel_list_get_channel (DVBChannelList* self, guint sid); +gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const char* path, GError** error); +gboolean dvb_utils_is_readable_file (GFile* file); void dvb_scanner_clear_frequencies (DVBScanner* self); -guint dvb_scanned_item_get_Frequency (DVBScannedItem* self); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); +guint dvb_scanned_item_get_Frequency (DVBScannedItem* self); +gboolean dvb_scanner_start_scan (DVBScanner* self); void dvb_channel_list_remove (DVBChannelList* self, guint sid); gboolean dvb_scanner_check_for_lock (DVBScanner* self); static gboolean _dvb_scanner_check_for_lock_gsource_func (gpointer self); -void dvb_scanner_queue_start_scan (DVBScanner* self); gboolean dvb_scanner_wait_for_tables (DVBScanner* self); +static gboolean _dvb_scanner_start_scan_gsource_func (gpointer self); void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const char* key); -static gboolean _dvb_scanner_wait_for_tables_gsource_func (gpointer self); void dvb_scanner_on_dvb_frontend_stats_structure (DVBScanner* self, const GstStructure* structure); +static gboolean _dvb_scanner_wait_for_tables_gsource_func (gpointer self); void dvb_scanner_on_dvb_read_failure_structure (DVBScanner* self); void dvb_scanner_on_pat_structure (DVBScanner* self, const GstStructure* structure); +void dvb_scanner_on_sdt_structure (DVBScanner* self, const GstStructure* structure); gboolean dvb_channel_list_contains (DVBChannelList* self, guint sid); void dvb_scanner_add_new_channel (DVBScanner* self, guint sid); void dvb_channel_set_Scrambled (DVBChannel* self, gboolean value); void dvb_channel_set_Name (DVBChannel* self, const char* value); void dvb_channel_set_TransportStreamId (DVBChannel* self, guint value); void dvb_channel_set_Network (DVBChannel* self, const char* value); -void dvb_scanner_on_sdt_structure (DVBScanner* self, const GstStructure* structure); -void dvb_channel_set_LogicalChannelNumber (DVBChannel* self, guint* value); +const char* dvb_channel_get_Name (DVBChannel* self); +gboolean dvb_channel_get_Scrambled (DVBChannel* self); void dvb_scanner_on_nit_structure (DVBScanner* self, const GstStructure* structure); +void dvb_channel_set_LogicalChannelNumber (DVBChannel* self, guint* value); +void dvb_scanner_on_pmt_structure (DVBScanner* self, const GstStructure* structure); void dvb_channel_set_VideoPID (DVBChannel* self, guint value); GeeList* dvb_channel_get_AudioPIDs (DVBChannel* self); -void dvb_scanner_on_pmt_structure (DVBScanner* self, const GstStructure* structure); -guint dvb_channel_get_TransportStreamId (DVBChannel* self); gboolean dvb_channel_is_valid (DVBChannel* self); gboolean dvb_channel_is_radio (DVBChannel* self); char* dvb_channel_to_string (DVBChannel* self); guint dvb_channel_get_Frequency (DVBChannel* self); -const char* dvb_channel_get_Name (DVBChannel* self); const char* dvb_channel_get_Network (DVBChannel* self); -gboolean dvb_channel_get_Scrambled (DVBChannel* self); void dvb_channel_set_Sid (DVBChannel* self, guint value); void dvb_channel_list_add (DVBChannelList* self, DVBChannel* channel); DVBScanner* dvb_scanner_construct (GType object_type); @@ -243,7 +250,11 @@ 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); +/** + * 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))); @@ -256,6 +267,10 @@ } +/** + * Use the frequency and possibly other data to + * 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))); @@ -268,6 +283,9 @@ } +/** + * 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))); @@ -280,6 +298,9 @@ } +/** + * 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))); @@ -292,29 +313,44 @@ } -static void* _dvb_scanner_worker_gthread_func (gpointer self) { - return dvb_scanner_worker (self); +/** + * Called to parse a line from the initial tuning data + */ +static void dvb_scanner_real_add_scanning_data_from_string (DVBScanner* self, const char* 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; } -static gboolean _dvb_scanner_bus_watch_func_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self) { - return dvb_scanner_bus_watch_func (self, bus, message); +void dvb_scanner_add_scanning_data_from_string (DVBScanner* self, const char* line) { + DVB_SCANNER_GET_CLASS (self)->add_scanning_data_from_string (self, line); } -static gboolean _dvb_scanner_start_scan_gsource_func (gpointer self) { - return dvb_scanner_start_scan (self); +/** + * Start the scanner + */ +static void* _dvb_scanner_worker_gthread_func (gpointer self) { + void* result; + result = dvb_scanner_worker (self); + return result; +} + + +static gboolean _dvb_scanner_bus_watch_func_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self) { + gboolean result; + result = dvb_scanner_bus_watch_func (self, bus, message); + return result; } void dvb_scanner_Run (DVBScanner* self, GError** error) { - GError * _inner_error_; GMainLoop* _tmp0_; DVBChannelList* _tmp2_; GstBus* bus; - GSource* source; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _inner_error_ = NULL; if (self->priv->running) { return; } @@ -324,23 +360,23 @@ GThread* _tmp1_; _tmp1_ = g_thread_create (_dvb_scanner_worker_gthread_func, self, TRUE, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch47_g_error; + goto __catch140_g_error; } self->priv->worker_thread = _tmp1_; } - goto __finally47; - __catch47_g_error: + goto __finally140; + __catch140_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Scanner.vala:154: Could not create thread: %s", e->message); + g_critical ("Scanner.vala:160: Could not create thread: %s", e->message); _g_error_free0 (e); return; } } - __finally47: + __finally140: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -359,23 +395,23 @@ GstElement* _tmp6_; _tmp5_ = (_tmp4_ = gst_parse_launch (_tmp3_ = g_strdup_printf (DVB_SCANNER_PIPELINE_TEMPLATE, dvb_device_get_Adapter (self->priv->_Device), dvb_device_get_Frontend (self->priv->_Device), DVB_SCANNER_BASE_PIDS), &_inner_error_), _g_free0 (_tmp3_), _tmp4_); if (_inner_error_ != NULL) { - goto __catch48_g_error; + goto __catch141_g_error; } self->pipeline = (_tmp6_ = _tmp5_, _gst_object_unref0 (self->pipeline), _tmp6_); } - goto __finally48; - __catch48_g_error: + goto __finally141; + __catch141_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Scanner.vala:165: Could not create pipeline: %s", e->message); + g_critical ("Scanner.vala:171: Could not create pipeline: %s", e->message); _g_error_free0 (e); return; } } - __finally48: + __finally141: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -389,14 +425,14 @@ bus = gst_element_get_bus (self->pipeline); self->priv->bus_watch_id = gst_bus_add_watch_context (bus, _dvb_scanner_bus_watch_func_gst_bus_func, self, self->priv->context); gst_element_set_state (self->pipeline, GST_STATE_READY); - source = g_idle_source_new (); - g_source_set_callback (source, _dvb_scanner_start_scan_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (source, self->priv->context); + dvb_scanner_queue_start_scan (self); _gst_object_unref0 (bus); - _g_source_unref0 (source); } +/** + * Abort scanning and cleanup + */ void dvb_scanner_Destroy (DVBScanner* self, GError** error) { g_return_if_fail (self != NULL); dvb_scanner_do_destroy (self); @@ -406,6 +442,7 @@ void dvb_scanner_do_destroy (DVBScanner* self) { DVBChannelList* _tmp0_; 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); @@ -422,18 +459,22 @@ } +/** + * @path: Location where the file will be stored + * + * Write all the channels stored in this.Channels to file + */ gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const char* path, GError** error) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean success; GFile* _tmp0_; - DVBChannelListWriter* _tmp1_; - DVBChannelListWriter* writer; + DVBioChannelListWriter* _tmp1_; + DVBioChannelListWriter* writer; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE); - _inner_error_ = NULL; success = TRUE; - writer = (_tmp1_ = dvb_channel_list_writer_new (_tmp0_ = g_file_new_for_path (path)), _g_object_unref0 (_tmp0_), _tmp1_); + writer = (_tmp1_ = dvb_io_channel_list_writer_new (_tmp0_ = g_file_new_for_path (path)), _g_object_unref0 (_tmp0_), _tmp1_); { GeeIterator* _c_it; _c_it = gee_iterable_iterator ((GeeIterable*) self->channels); @@ -444,24 +485,24 @@ } c = (DVBChannel*) gee_iterator_get (_c_it); { - dvb_channel_list_writer_write (writer, c, &_inner_error_); + dvb_io_channel_list_writer_write (writer, c, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch49_g_error; + goto __catch142_g_error; } } - goto __finally49; - __catch49_g_error: + goto __finally142; + __catch142_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Scanner.vala:215: Could not write to file: %s", e->message); + g_critical ("Scanner.vala:220: Could not write to file: %s", e->message); success = FALSE; _g_error_free0 (e); } } - __finally49: + __finally142: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -483,24 +524,24 @@ _g_object_unref0 (_c_it); } { - dvb_channel_list_writer_close (writer, &_inner_error_); + dvb_io_channel_list_writer_close (writer, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch50_g_error; + goto __catch143_g_error; } } - goto __finally50; - __catch50_g_error: + goto __finally143; + __catch143_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Scanner.vala:223: Could not close file handle: %s", e->message); + g_critical ("Scanner.vala:228: Could not close file handle: %s", e->message); success = FALSE; _g_error_free0 (e); } } - __finally50: + __finally143: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -519,18 +560,23 @@ } +/** + * @channel_sids: A list of channels' SIDs + * @path: Location where the file will be stored + * + * Write the channels with the given SIDs to file @path + */ gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean success; GFile* _tmp0_; - DVBChannelListWriter* _tmp1_; - DVBChannelListWriter* writer; + DVBioChannelListWriter* _tmp1_; + DVBioChannelListWriter* writer; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE); - _inner_error_ = NULL; success = TRUE; - writer = (_tmp1_ = dvb_channel_list_writer_new (_tmp0_ = g_file_new_for_path (path)), _g_object_unref0 (_tmp0_), _tmp1_); + writer = (_tmp1_ = dvb_io_channel_list_writer_new (_tmp0_ = g_file_new_for_path (path)), _g_object_unref0 (_tmp0_), _tmp1_); { guint* sid_collection; int sid_collection_length1; @@ -544,29 +590,29 @@ DVBChannel* c; c = dvb_channel_list_get_channel (self->channels, sid); if (c == NULL) { - g_warning ("Scanner.vala:244: Channel with SID %u does not exist", sid); + g_warning ("Scanner.vala:249: Channel with SID 0x%x does not exist", sid); _g_object_unref0 (c); continue; } { - dvb_channel_list_writer_write (writer, c, &_inner_error_); + dvb_io_channel_list_writer_write (writer, c, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch51_g_error; + goto __catch144_g_error; } } - goto __finally51; - __catch51_g_error: + goto __finally144; + __catch144_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Scanner.vala:250: Could not write to file: %s", e->message); + g_critical ("Scanner.vala:255: Could not write to file: %s", e->message); success = FALSE; _g_error_free0 (e); } } - __finally51: + __finally144: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -586,24 +632,24 @@ } } { - dvb_channel_list_writer_close (writer, &_inner_error_); + dvb_io_channel_list_writer_close (writer, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch52_g_error; + goto __catch145_g_error; } } - goto __finally52; - __catch52_g_error: + goto __finally145; + __catch145_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Scanner.vala:258: Could not close file handle: %s", e->message); + g_critical ("Scanner.vala:263: Could not close file handle: %s", e->message); success = FALSE; _g_error_free0 (e); } } - __finally52: + __finally145: if (_inner_error_ != NULL) { if (_inner_error_->domain == DBUS_GERROR) { g_propagate_error (error, _inner_error_); @@ -622,8 +668,180 @@ } +static char* string_chug (const char* self) { + char* result = NULL; + char* _result_; + g_return_val_if_fail (self != NULL, NULL); + _result_ = g_strdup (self); + g_strchug (_result_); + result = _result_; + return result; +} + + +gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const char* path, GError** error) { + gboolean result = FALSE; + GFile* datafile; + GDataInputStream* reader; + char* line; + gsize len = 0UL; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (path != NULL, FALSE); + datafile = g_file_new_for_path (path); + g_debug ("Scanner.vala:273: Reading scanning data from %s", path); + if (!dvb_utils_is_readable_file (datafile)) { + result = FALSE; + _g_object_unref0 (datafile); + return result; + } + reader = NULL; + { + GFileInputStream* _tmp0_; + GFileInputStream* _tmp1_; + GDataInputStream* _tmp2_; + _tmp0_ = g_file_read (datafile, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch146_g_error; + } + reader = (_tmp2_ = g_data_input_stream_new ((GInputStream*) (_tmp1_ = _tmp0_)), _g_object_unref0 (reader), _tmp2_); + _g_object_unref0 (_tmp1_); + } + goto __finally146; + __catch146_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Scanner.vala:281: Could not open %s: %s", path, e->message); + result = FALSE; + _g_error_free0 (e); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return result; + } + } + __finally146: + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return FALSE; + } else { + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + 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; + } + } + line = NULL; + { + while (TRUE) { + char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + _tmp3_ = g_data_input_stream_read_line (reader, &len, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch147_g_error; + } + if (!((line = (_tmp4_ = _tmp3_, _g_free0 (line), _tmp4_)) != NULL)) { + break; + } + if (len == 0) { + continue; + } + line = (_tmp5_ = string_chug (line), _g_free0 (line), _tmp5_); + if (g_str_has_prefix (line, "#")) { + continue; + } + dvb_scanner_add_scanning_data_from_string (self, line); + } + } + goto __finally147; + __catch147_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Scanner.vala:297: Could not read %s: %s", path, e->message); + result = FALSE; + _g_error_free0 (e); + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return result; + } + } + __finally147: + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return FALSE; + } else { + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + 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_input_stream_close ((GInputStream*) reader, NULL, &_inner_error_); + if (_inner_error_ != NULL) { + goto __catch148_g_error; + } + } + goto __finally148; + __catch148_g_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Scanner.vala:304: Could not close file handle: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return result; + } + } + __finally148: + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return FALSE; + } else { + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + 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; + _g_free0 (line); + _g_object_unref0 (reader); + _g_object_unref0 (datafile); + return result; +} + + static void* dvb_scanner_worker (DVBScanner* self) { - void* result; + void* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_main_loop_run (self->priv->loop); result = NULL; @@ -647,11 +865,11 @@ g_source_destroy (bus_watch_source); self->priv->bus_watch_id = (guint) 0; } + g_debug ("Scanner.vala:326: Disposing pipeline"); gst_element_set_state (self->pipeline, GST_STATE_NULL); self->pipeline = (_tmp0_ = NULL, _gst_object_unref0 (self->pipeline), _tmp0_); _g_source_unref0 (bus_watch_source); } - gee_abstract_map_clear ((GeeAbstractMap*) self->transport_streams); gee_abstract_collection_clear ((GeeAbstractCollection*) self->scanned_frequencies); dvb_scanner_clear_frequencies (self); self->current_tuning_params = (_tmp1_ = NULL, _gst_structure_free0 (self->current_tuning_params), _tmp1_); @@ -691,7 +909,7 @@ } item = dvb_scanner_get_scanned_item (self, structure); if (!gee_abstract_collection_contains ((GeeAbstractCollection*) self->scanned_frequencies, item)) { - g_debug ("Scanner.vala:308: Queueing new frequency %u", dvb_scanned_item_get_Frequency (item)); + g_debug ("Scanner.vala:354: Queueing new frequency %u", dvb_scanned_item_get_Frequency (item)); g_queue_push_tail (self->frequencies, _gst_structure_copy0 (structure)); gee_abstract_collection_add ((GeeAbstractCollection*) self->scanned_frequencies, item); } @@ -700,8 +918,12 @@ } +/** + * Pick up the next tuning paramters from the queue + * and start scanning with them + */ static char* bool_to_string (gboolean self) { - char* result; + char* result = NULL; if (self) { result = g_strdup ("true"); return result; @@ -713,25 +935,28 @@ static gboolean _dvb_scanner_check_for_lock_gsource_func (gpointer self) { - return dvb_scanner_check_for_lock (self); + gboolean result; + result = dvb_scanner_check_for_lock (self); + return result; } gboolean dvb_scanner_start_scan (DVBScanner* self) { - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; gboolean all_tables; - char* _tmp7_; - char* _tmp6_; - char* _tmp5_; - char* _tmp4_; char* _tmp3_; + char* _tmp4_; + char* _tmp5_; + char* _tmp6_; + char* _tmp7_; GstStructure* _tmp8_; guint freq = 0U; GstElement* dvbsrc; GSource* _tmp9_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); if (self->priv->sdt_arrived) { _tmp2_ = self->priv->nit_arrived; @@ -749,7 +974,7 @@ _tmp0_ = FALSE; } all_tables = _tmp0_; - g_debug ("Scanner.vala:321: Received all tables: %s (pat: %s, sdt: %s, nit: %s, " \ + g_debug ("Scanner.vala:367: Received all tables: %s (pat: %s, sdt: %s, nit: %s, " \ "pmt: %s)", _tmp3_ = bool_to_string (all_tables), _tmp4_ = bool_to_string (self->priv->pat_arrived), _tmp5_ = bool_to_string (self->priv->sdt_arrived), _tmp6_ = bool_to_string (self->priv->nit_arrived), _tmp7_ = bool_to_string (self->priv->pmt_arrived)); _g_free0 (_tmp7_); _g_free0 (_tmp6_); @@ -767,26 +992,36 @@ g_signal_emit_by_name (self, "frequency-scanned", old_freq, self->frequencies->length); } if (g_queue_is_empty (self->frequencies)) { - g_message ("Scanner.vala:339: Finished scanning"); - g_static_rec_mutex_lock (&self->priv->__lock_new_channels); + g_message ("Scanner.vala:385: Finished scanning"); { - g_debug ("Scanner.vala:343: %u channels still have missing or invalid informatio" \ -"n", (guint) gee_collection_get_size ((GeeCollection*) self->priv->new_channels)); + g_static_rec_mutex_lock (&self->priv->__lock_new_channels); { - GeeIterator* _sid_it; - _sid_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->new_channels); - while (TRUE) { - guint sid; - if (!gee_iterator_next (_sid_it)) { - break; + g_debug ("Scanner.vala:389: %u channels still have missing or invalid informatio" \ +"n", (guint) gee_collection_get_size ((GeeCollection*) self->priv->new_channels)); + { + GeeIterator* _sid_it; + _sid_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->new_channels); + while (TRUE) { + guint sid; + if (!gee_iterator_next (_sid_it)) { + break; + } + sid = GPOINTER_TO_UINT (gee_iterator_get (_sid_it)); + dvb_channel_list_remove (self->channels, sid); } - sid = GPOINTER_TO_UINT (gee_iterator_get (_sid_it)); - dvb_channel_list_remove (self->channels, sid); + _g_object_unref0 (_sid_it); } - _g_object_unref0 (_sid_it); + } + __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_); + return FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); dvb_scanner_clear_and_reset_all (self); g_signal_emit_by_name (self, "finished"); result = FALSE; @@ -794,7 +1029,7 @@ } self->current_tuning_params = (_tmp8_ = (GstStructure*) g_queue_pop_head (self->frequencies), _gst_structure_free0 (self->current_tuning_params), _tmp8_); gst_structure_get_uint (self->current_tuning_params, "frequency", &freq); - g_debug ("Scanner.vala:360: Starting scanning frequency %u (%u left)", freq, g_queue_get_length (self->frequencies)); + g_debug ("Scanner.vala:406: Starting scanning frequency %u (%u left)", freq, g_queue_get_length (self->frequencies)); gst_element_set_state (self->pipeline, GST_STATE_READY); dvb_scanner_prepare (self); dvbsrc = gst_bin_get_by_name (GST_BIN (self->pipeline), "dvbsrc"); @@ -809,8 +1044,12 @@ } +/** + * Check if we received a lock with the currently + * used tuning parameters + */ gboolean dvb_scanner_check_for_lock (DVBScanner* self) { - gboolean result; + gboolean result = FALSE; g_return_val_if_fail (self != NULL, FALSE); if (!self->priv->locked) { gst_element_set_state (self->pipeline, GST_STATE_READY); @@ -822,7 +1061,7 @@ gboolean dvb_scanner_wait_for_tables (DVBScanner* self) { - gboolean result; + gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; @@ -851,33 +1090,76 @@ } +void dvb_scanner_destroy_start_scan_source (DVBScanner* self) { + gboolean _tmp0_ = FALSE; + g_return_if_fail (self != NULL); + if (self->priv->start_scan_source != NULL) { + _tmp0_ = !g_source_is_destroyed (self->priv->start_scan_source); + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + GSource* _tmp1_; + g_source_destroy (self->priv->start_scan_source); + self->priv->start_scan_source = (_tmp1_ = NULL, _g_source_unref0 (self->priv->start_scan_source), _tmp1_); + } +} + + void dvb_scanner_remove_check_for_lock_timeout (DVBScanner* self) { + gboolean _tmp0_ = FALSE; g_return_if_fail (self != NULL); if (self->priv->check_for_lock_source != NULL) { - GSource* _tmp0_; + _tmp0_ = !g_source_is_destroyed (self->priv->check_for_lock_source); + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + GSource* _tmp1_; g_source_destroy (self->priv->check_for_lock_source); - self->priv->check_for_lock_source = (_tmp0_ = NULL, _g_source_unref0 (self->priv->check_for_lock_source), _tmp0_); + self->priv->check_for_lock_source = (_tmp1_ = NULL, _g_source_unref0 (self->priv->check_for_lock_source), _tmp1_); } } void dvb_scanner_remove_wait_for_tables_timeout (DVBScanner* self) { + gboolean _tmp0_ = FALSE; g_return_if_fail (self != NULL); if (self->priv->wait_for_tables_source != NULL) { - GSource* _tmp0_; + _tmp0_ = !g_source_is_destroyed (self->priv->wait_for_tables_source); + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + GSource* _tmp1_; g_source_destroy (self->priv->wait_for_tables_source); - self->priv->wait_for_tables_source = (_tmp0_ = NULL, _g_source_unref0 (self->priv->wait_for_tables_source), _tmp0_); + self->priv->wait_for_tables_source = (_tmp1_ = NULL, _g_source_unref0 (self->priv->wait_for_tables_source), _tmp1_); } } +static gboolean _dvb_scanner_start_scan_gsource_func (gpointer self) { + gboolean result; + result = dvb_scanner_start_scan (self); + return result; +} + + void dvb_scanner_queue_start_scan (DVBScanner* self) { - GSource* source; + gboolean _tmp0_ = FALSE; g_return_if_fail (self != NULL); - source = g_idle_source_new (); - g_source_set_callback (source, _dvb_scanner_start_scan_gsource_func, g_object_ref (self), g_object_unref); - g_source_attach (source, self->priv->context); - _g_source_unref0 (source); + if (self->priv->start_scan_source == NULL) { + _tmp0_ = TRUE; + } else { + _tmp0_ = g_source_is_destroyed (self->priv->start_scan_source); + } + if (_tmp0_) { + GSource* _tmp1_; + g_debug ("Scanner.vala:476: Queueing start_scan"); + self->priv->start_scan_source = (_tmp1_ = g_idle_source_new (), _g_source_unref0 (self->priv->start_scan_source), _tmp1_); + 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); + } } @@ -892,13 +1174,17 @@ static gboolean _dvb_scanner_wait_for_tables_gsource_func (gpointer self) { - return dvb_scanner_wait_for_tables (self); + gboolean result; + result = dvb_scanner_wait_for_tables (self); + return result; } void dvb_scanner_on_dvb_frontend_stats_structure (DVBScanner* self, const GstStructure* structure) { gboolean has_lock = FALSE; gboolean _tmp0_ = FALSE; + gint _signal = 0; + gint _snr = 0; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); gst_structure_get_boolean (structure, "lock", &has_lock); @@ -909,18 +1195,21 @@ } if (_tmp0_) { GSource* _tmp1_; - g_debug ("Scanner.vala:433: Got lock"); + g_debug ("Scanner.vala:494: Got lock"); dvb_scanner_remove_check_for_lock_timeout (self); self->priv->wait_for_tables_source = (_tmp1_ = g_timeout_source_new_seconds ((guint) 10), _g_source_unref0 (self->priv->wait_for_tables_source), _tmp1_); 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", &_signal); + gst_structure_get_int (structure, "snr", &_snr); + g_signal_emit_by_name (self, "frontend-stats", _signal / ((double) 0xffff), _snr / ((double) 0xffff)); } void dvb_scanner_on_dvb_read_failure_structure (DVBScanner* self) { g_return_if_fail (self != NULL); - g_warning ("Scanner.vala:443: Read failure"); + g_warning ("Scanner.vala:510: Read failure"); } @@ -935,11 +1224,10 @@ GstElement* dvbsrc; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:450: Received PAT"); + g_debug ("Scanner.vala:517: Received PAT"); pid_set = (GeeSet*) gee_hash_set_new (G_TYPE_UINT, NULL, NULL, NULL, NULL); gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER ((guint) 16)); gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER ((guint) 17)); - gee_collection_add ((GeeCollection*) pid_set, GUINT_TO_POINTER ((guint) 18)); programs = *gst_structure_get_value (structure, "programs"); size = gst_value_list_get_size (&programs); program = NULL; @@ -991,18 +1279,18 @@ } _g_object_unref0 (_pid_it); } - g_debug ("Scanner.vala:486: Setting %d pids: %s", gee_collection_get_size ((GeeCollection*) pid_set), new_pids->str); + g_debug ("Scanner.vala:552: Setting %d pids: %s", gee_collection_get_size ((GeeCollection*) pid_set), new_pids->str); dvbsrc = gst_bin_get_by_name (GST_BIN (self->pipeline), "dvbsrc"); g_object_set ((GObject*) dvbsrc, "pids", new_pids->str, NULL); self->priv->pat_arrived = TRUE; - _g_object_unref0 (pid_set); - _g_string_free0 (new_pids); _gst_object_unref0 (dvbsrc); + _g_string_free0 (new_pids); + _g_object_unref0 (pid_set); } static char* string_substring (const char* self, glong offset, glong len) { - char* result; + char* result = NULL; glong string_length; const char* start; g_return_val_if_fail (self != NULL, NULL); @@ -1024,12 +1312,11 @@ static char* string_replace (const char* self, const char* old, const char* replacement) { - char* result; - GError * _inner_error_; + char* result = NULL; + 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); - _inner_error_ = NULL; { char* _tmp0_; GRegex* _tmp1_; @@ -1038,7 +1325,7 @@ regex = (_tmp1_ = g_regex_new (_tmp0_ = g_regex_escape_string (old, -1), 0, 0, &_inner_error_), _g_free0 (_tmp0_), _tmp1_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch53_g_regex_error; + goto __catch150_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_); @@ -1048,7 +1335,7 @@ if (_inner_error_ != NULL) { _g_regex_unref0 (regex); if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch53_g_regex_error; + goto __catch150_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); @@ -1059,8 +1346,8 @@ _g_regex_unref0 (regex); return result; } - goto __finally53; - __catch53_g_regex_error: + goto __finally150; + __catch150_g_regex_error: { GError * e; e = _inner_error_; @@ -1070,7 +1357,7 @@ _g_error_free0 (e); } } - __finally53: + __finally150: 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_); @@ -1087,8 +1374,8 @@ const GstStructure* service; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:495: Received SDT"); gst_structure_get_uint (structure, "transport-stream-id", &tsid); + g_debug ("Scanner.vala:564: Received SDT (0x%x)", tsid); services = *gst_structure_get_value (structure, "services"); size = gst_value_list_get_size (&services); service = NULL; @@ -1106,6 +1393,7 @@ DVBChannel* channel; char* provider; gboolean _tmp5_ = FALSE; + char* _tmp6_; if (!_tmp0_) { i++; } @@ -1149,9 +1437,11 @@ } else { dvb_channel_set_Network (channel, ""); } - _g_free0 (name); - _g_object_unref0 (channel); + g_debug ("Scanner.vala:610: Found service 0x%x, %s, scrambled: %s", (guint) sid, dvb_channel_get_Name (channel), _tmp6_ = bool_to_string (dvb_channel_get_Scrambled (channel))); + _g_free0 (_tmp6_); _g_free0 (provider); + _g_object_unref0 (channel); + _g_free0 (name); } } } @@ -1160,6 +1450,7 @@ void dvb_scanner_on_nit_structure (DVBScanner* self, const GstStructure* structure) { + gboolean actual = FALSE; char* name; GValue transports; guint size; @@ -1167,7 +1458,11 @@ const GstStructure* transport; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:549: Received NIT"); + gst_structure_get_boolean (structure, "actual-network", &actual); + if (!actual) { + return; + } + g_debug ("Scanner.vala:623: Received NIT"); name = NULL; if (gst_structure_has_field (structure, "network-name")) { char* _tmp0_; @@ -1178,7 +1473,7 @@ gst_structure_get_uint (structure, "network-id", &nid); name = (_tmp1_ = g_strdup_printf ("%u", nid), _g_free0 (name), _tmp1_); } - g_debug ("Scanner.vala:559: Network name '%s'", name); + g_debug ("Scanner.vala:633: Network name '%s'", name); transports = *gst_structure_get_value (structure, "transports"); size = gst_value_list_get_size (&transports); transport = NULL; @@ -1206,8 +1501,7 @@ guint freq = 0U; delivery_val = *gst_structure_get_value (transport, "delivery"); delivery = gst_value_get_structure (&delivery_val); - g_debug ("Scanner.vala:578: Received TS %u", tsid); - gee_abstract_map_set ((GeeAbstractMap*) self->transport_streams, GUINT_TO_POINTER (tsid), delivery); + g_debug ("Scanner.vala:652: Received TS 0x%x", tsid); gst_structure_get_uint (delivery, "frequency", &freq); dvb_scanner_add_structure_to_scan (self, _gst_structure_copy0 (delivery)); } @@ -1272,7 +1566,7 @@ const GstStructure* stream; g_return_if_fail (self != NULL); g_return_if_fail (structure != NULL); - g_debug ("Scanner.vala:624: Received PMT"); + g_debug ("Scanner.vala:697: Received PMT"); gst_structure_get_uint (structure, "program-number", &program_number); if (!dvb_channel_list_contains (self->channels, program_number)) { dvb_scanner_add_new_channel (self, program_number); @@ -1306,7 +1600,7 @@ case 0x02: case 0x1b: { - g_debug ("Scanner.vala:656: Found video PID %u for channel %u", pid, program_number); + g_debug ("Scanner.vala:729: Found video PID 0x%x for channel 0x%x", pid, program_number); dvb_channel_set_VideoPID (dvb_channel, pid); break; } @@ -1315,13 +1609,13 @@ case 0x0f: case 0x11: { - g_debug ("Scanner.vala:664: Found audio PID %u for channel %u", pid, program_number); + g_debug ("Scanner.vala:737: Found audio PID 0x%x for channel 0x%x", pid, program_number); gee_collection_add ((GeeCollection*) dvb_channel_get_AudioPIDs (dvb_channel), GUINT_TO_POINTER (pid)); break; } default: { - g_debug ("Scanner.vala:669: Other stream type: 0x%02x", stream_type); + g_debug ("Scanner.vala:742: Other stream type: 0x%02x", stream_type); break; } } @@ -1334,11 +1628,13 @@ gboolean dvb_scanner_bus_watch_func (DVBScanner* self, GstBus* bus, GstMessage* message) { - gboolean result; + gboolean result = FALSE; gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; gboolean _tmp9_ = FALSE; gboolean _tmp10_ = FALSE; gboolean _tmp11_ = FALSE; + 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); @@ -1346,29 +1642,40 @@ case GST_MESSAGE_ELEMENT: { { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "dvb-frontend-stats") == 0) { - dvb_scanner_on_dvb_frontend_stats_structure (self, message->structure); + GstStructure* structure; + char* structure_name; + structure = _gst_structure_copy0 (gst_message_get_structure (message)); + structure_name = g_strdup (gst_structure_get_name (structure)); + if (_vala_strcmp0 (structure_name, "dvb-frontend-stats") == 0) { + dvb_scanner_on_dvb_frontend_stats_structure (self, structure); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "dvb-read-failure") == 0) { + if (_vala_strcmp0 (structure_name, "dvb-read-failure") == 0) { dvb_scanner_on_dvb_read_failure_structure (self); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "sdt") == 0) { - dvb_scanner_on_sdt_structure (self, message->structure); + if (_vala_strcmp0 (structure_name, "sdt") == 0) { + dvb_scanner_on_sdt_structure (self, structure); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "nit") == 0) { - dvb_scanner_on_nit_structure (self, message->structure); + if (_vala_strcmp0 (structure_name, "nit") == 0) { + dvb_scanner_on_nit_structure (self, structure); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "pat") == 0) { - dvb_scanner_on_pat_structure (self, message->structure); + if (_vala_strcmp0 (structure_name, "pat") == 0) { + dvb_scanner_on_pat_structure (self, structure); } else { - if (_vala_strcmp0 (gst_structure_get_name (message->structure), "pmt") == 0) { - dvb_scanner_on_pmt_structure (self, message->structure); + if (_vala_strcmp0 (structure_name, "pmt") == 0) { + dvb_scanner_on_pmt_structure (self, structure); + } else { + result = TRUE; + _g_free0 (structure_name); + _gst_structure_free0 (structure); + return result; } } } } } } + _g_free0 (structure_name); + _gst_structure_free0 (structure); break; } } @@ -1377,57 +1684,41 @@ { GError* gerror; char* debug; - char* _tmp3_; - char* _tmp2_ = NULL; - GError* _tmp1_; GError* _tmp0_ = NULL; + GError* _tmp1_; + char* _tmp2_ = NULL; + char* _tmp3_; gerror = NULL; debug = NULL; (gst_message_parse_error (message, &_tmp0_, &_tmp2_), gerror = (_tmp1_ = _tmp0_, _g_error_free0 (gerror), _tmp1_)); debug = (_tmp3_ = _tmp2_, _g_free0 (debug), _tmp3_); - g_critical ("Scanner.vala:698: %s %s", gerror->message, debug); - dvb_scanner_do_destroy (self); - result = FALSE; - _g_error_free0 (gerror); + g_warning ("Scanner.vala:775: %s %s", gerror->message, debug); + result = TRUE; _g_free0 (debug); + _g_error_free0 (gerror); return result; } } + default: + { + result = TRUE; + return result; + } } if (self->priv->nit_arrived) { - _tmp4_ = self->priv->sdt_arrived; + _tmp5_ = self->priv->sdt_arrived; + } else { + _tmp5_ = FALSE; + } + if (_tmp5_) { + _tmp4_ = self->priv->pat_arrived; } else { _tmp4_ = FALSE; } if (_tmp4_) { - g_static_rec_mutex_lock (&self->priv->__lock_new_channels); { + g_static_rec_mutex_lock (&self->priv->__lock_new_channels); { - GeeIterator* _sid_it; - _sid_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->new_channels); - while (TRUE) { - guint sid; - DVBChannel* channel; - guint tsid; - if (!gee_iterator_next (_sid_it)) { - break; - } - sid = GPOINTER_TO_UINT (gee_iterator_get (_sid_it)); - channel = dvb_channel_list_get_channel (self->channels, sid); - tsid = dvb_channel_get_TransportStreamId (channel); - if (gee_map_contains ((GeeMap*) self->transport_streams, GUINT_TO_POINTER (tsid))) { - GstStructure* _tmp5_; - dvb_scanner_add_values_from_structure_to_channel (self, _tmp5_ = (GstStructure*) gee_abstract_map_get ((GeeAbstractMap*) self->transport_streams, GUINT_TO_POINTER (tsid)), channel); - _gst_structure_free0 (_tmp5_); - } else { - g_debug ("Scanner.vala:718: TS %u for channel %u does not exist", tsid, sid); - self->priv->nit_arrived = FALSE; - } - _g_object_unref0 (channel); - } - _g_object_unref0 (_sid_it); - } - if (self->priv->pat_arrived) { GeeArrayList* del_channels; del_channels = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); { @@ -1452,14 +1743,14 @@ _tmp6_ = "TV"; } type = g_strdup (_tmp6_); - g_debug ("Scanner.vala:736: Channel added: %s", _tmp7_ = dvb_channel_to_string (channel)); + g_debug ("Scanner.vala:794: Channel added: %s", _tmp7_ = dvb_channel_to_string (channel)); _g_free0 (_tmp7_); g_signal_emit_by_name (self, "channel-added", dvb_channel_get_Frequency (channel), sid, dvb_channel_get_Name (channel), dvb_channel_get_Network (channel), type, dvb_channel_get_Scrambled (channel)); gee_abstract_collection_add ((GeeAbstractCollection*) del_channels, GUINT_TO_POINTER (sid)); _g_free0 (type); } else { char* _tmp8_; - g_debug ("Scanner.vala:743: Channel %u is not valid: %s", sid, _tmp8_ = dvb_channel_to_string (channel)); + g_debug ("Scanner.vala:801: Channel 0x%x is not valid: %s", sid, _tmp8_ = dvb_channel_to_string (channel)); _g_free0 (_tmp8_); self->priv->pmt_arrived = FALSE; } @@ -1482,8 +1773,16 @@ } _g_object_unref0 (del_channels); } + __finally151: + { + 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_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); } if (self->priv->sdt_arrived) { _tmp11_ = self->priv->nit_arrived; @@ -1511,23 +1810,36 @@ void dvb_scanner_add_new_channel (DVBScanner* self, guint sid) { DVBChannel* new_channel; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - g_debug ("Scanner.vala:770: Adding new channel with SID %u", sid); + g_debug ("Scanner.vala:827: Adding new channel with SID 0x%x", sid); new_channel = dvb_scanner_get_new_channel (self); 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); - g_static_rec_mutex_lock (&self->priv->__lock_new_channels); { - gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->new_channels, GUINT_TO_POINTER (sid)); + g_static_rec_mutex_lock (&self->priv->__lock_new_channels); + { + gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->new_channels, GUINT_TO_POINTER (sid)); + } + __finally152: + { + 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); + g_clear_error (&_inner_error_); + return; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_new_channels); _g_object_unref0 (new_channel); } DVBScanner* dvb_scanner_construct (GType object_type) { DVBScanner * self; - self = g_object_newv (object_type, 0, NULL); + self = (DVBScanner*) g_object_new (object_type, NULL); return self; } @@ -1562,12 +1874,16 @@ static guint _dvb_scanned_item_hash_ghash_func (void* key) { - return dvb_scanned_item_hash (key); + guint result; + result = dvb_scanned_item_hash (key); + return result; } static gboolean _dvb_scanned_item_equal_gequal_func (void* a, void* b) { - return dvb_scanned_item_equal (a, b); + gboolean result; + result = dvb_scanned_item_equal (a, b); + return result; } @@ -1582,13 +1898,11 @@ GeeHashSet* _tmp0_; GeeArrayList* _tmp1_; GQueue* _tmp2_; - GeeHashMap* _tmp3_; - GMainContext* _tmp4_; + GMainContext* _tmp3_; self->scanned_frequencies = (_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), _g_object_unref0 (self->scanned_frequencies), _tmp0_); self->priv->new_channels = (_tmp1_ = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL), _g_object_unref0 (self->priv->new_channels), _tmp1_); self->frequencies = (_tmp2_ = g_queue_new (), _g_queue_free0 (self->frequencies), _tmp2_); - self->transport_streams = (_tmp3_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, GST_TYPE_STRUCTURE, (GBoxedCopyFunc) gst_structure_copy, gst_structure_free, NULL, NULL, NULL), _g_object_unref0 (self->transport_streams), _tmp3_); - self->priv->context = (_tmp4_ = g_main_context_new (), _g_main_context_unref0 (self->priv->context), _tmp4_); + self->priv->context = (_tmp3_ = g_main_context_new (), _g_main_context_unref0 (self->priv->context), _tmp3_); self->priv->running = FALSE; } return obj; @@ -1602,15 +1916,40 @@ DVB_SCANNER_CLASS (klass)->get_scanned_item = dvb_scanner_real_get_scanned_item; DVB_SCANNER_CLASS (klass)->get_new_channel = dvb_scanner_real_get_new_channel; DVB_SCANNER_CLASS (klass)->add_values_from_structure_to_channel = dvb_scanner_real_add_values_from_structure_to_channel; + DVB_SCANNER_CLASS (klass)->add_scanning_data_from_string = dvb_scanner_real_add_scanning_data_from_string; G_OBJECT_CLASS (klass)->get_property = dvb_scanner_get_property; G_OBJECT_CLASS (klass)->set_property = dvb_scanner_set_property; G_OBJECT_CLASS (klass)->constructor = dvb_scanner_constructor; G_OBJECT_CLASS (klass)->finalize = dvb_scanner_finalize; + /** + * The DVB device the scanner should use + */ g_object_class_install_property (G_OBJECT_CLASS (klass), DVB_SCANNER_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_SCANNER_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)); + /** + * Emitted when the Destroy () method is called + */ g_signal_new ("destroyed", DVB_TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** + * Emitted when a frequency has been scanned. + * Whether a new channel has been found on that frequency or not. + */ g_signal_new ("frequency_scanned", DVB_TYPE_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); + /** + * @frequency: Frequency of the channel + * @sid: SID of the channel + * @name: Name of the channel + * @network: Name of network the channel is part of + * @type: What type of channel this is (Radio or TV) + * @scrambled: Whether the channel is scrambled + * + * Emitted when a new channel has been found + */ g_signal_new ("channel_added", DVB_TYPE_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_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); + /** + * 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); } @@ -1630,24 +1969,29 @@ _g_queue_free0 (self->frequencies); _gst_structure_free0 (self->current_tuning_params); _g_object_unref0 (self->scanned_frequencies); - _g_object_unref0 (self->transport_streams); g_static_rec_mutex_free (&self->priv->__lock_new_channels); _g_object_unref0 (self->priv->new_channels); _g_source_unref0 (self->priv->check_for_lock_source); _g_source_unref0 (self->priv->wait_for_tables_source); + _g_source_unref0 (self->priv->start_scan_source); _g_main_context_unref0 (self->priv->context); _g_main_loop_unref0 (self->priv->loop); G_OBJECT_CLASS (dvb_scanner_parent_class)->finalize (obj); } +/** + * An abstract class responsible for scanning for new channels + */ GType dvb_scanner_get_type (void) { - static GType dvb_scanner_type_id = 0; - if (dvb_scanner_type_id == 0) { + static volatile gsize dvb_scanner_type_id__volatile = 0; + if (g_once_init_enter (&dvb_scanner_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBScanner), 0, (GInstanceInitFunc) dvb_scanner_instance_init, NULL }; + GType dvb_scanner_type_id; dvb_scanner_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBScanner", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&dvb_scanner_type_id__volatile, dvb_scanner_type_id); } - return dvb_scanner_type_id; + return dvb_scanner_type_id__volatile; } @@ -1732,4 +2076,23 @@ } +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, double arg_1, double 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); +} + + diff -Nru gnome-dvb-daemon-0.1.16/src/Scanner.vala gnome-dvb-daemon-0.1.21/src/Scanner.vala --- gnome-dvb-daemon-0.1.16/src/Scanner.vala 2010-03-17 19:06:52.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Scanner.vala 2010-08-09 13:36:01.000000000 +0000 @@ -50,6 +50,9 @@ */ public signal void channel_added (uint frequency, uint sid, string name, string network, string type, bool scrambled); + + public signal void frontend_stats (double signal_strength, + double signal_noise_ratio); /** * Emitted when all frequencies have been scanned @@ -89,15 +92,14 @@ */ protected HashSet scanned_frequencies; - protected HashMap transport_streams; - - private static const string BASE_PIDS = "16:17:18"; - private static const string PIPELINE_TEMPLATE = "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=%s stats-reporting-interval=0 ! mpegtsparse ! fakesink silent=true"; + private static const string BASE_PIDS = "16:17"; // NIT, SDT + private static const string PIPELINE_TEMPLATE = "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=%s stats-reporting-interval=100 ! mpegtsparse ! fakesink silent=true"; // Contains SIDs private ArrayList new_channels; private Source check_for_lock_source; private Source wait_for_tables_source; + private Source start_scan_source; private bool nit_arrived; private bool sdt_arrived; private bool pat_arrived; @@ -114,7 +116,6 @@ new HashSet (ScannedItem.hash, ScannedItem.equal); this.new_channels = new ArrayList (); this.frequencies = new GLib.Queue (); - this.transport_streams = new HashMap (); this.context = new MainContext (); this.running = false; } @@ -139,6 +140,11 @@ * Retrieve the data from structure and add it to the Channel */ protected abstract void add_values_from_structure_to_channel (Gst.Structure delivery, Channel channel); + + /** + * Called to parse a line from the initial tuning data + */ + protected abstract void add_scanning_data_from_string (string line); /** * Start the scanner @@ -162,7 +168,7 @@ PIPELINE_TEMPLATE.printf (this.Device.Adapter, this.Device.Frontend, BASE_PIDS)); } catch (Error e) { - error ("Could not create pipeline: %s", e.message); + critical ("Could not create pipeline: %s", e.message); return; } @@ -172,9 +178,7 @@ this.pipeline.set_state(Gst.State.READY); - var source = new IdleSource (); - source.set_callback (this.start_scan); - source.attach (this.context); + this.queue_start_scan (); } /** @@ -184,7 +188,8 @@ this.do_destroy (); } - protected void do_destroy () { + public void do_destroy () { + this.destroy_start_scan_source (); this.remove_check_for_lock_timeout (); this.remove_wait_for_tables_timeout (); this.clear_and_reset_all (); @@ -207,7 +212,7 @@ */ public bool WriteAllChannelsToFile (string path) throws DBus.Error { bool success = true; - var writer = new ChannelListWriter (File.new_for_path (path)); + var writer = new io.ChannelListWriter (File.new_for_path (path)); foreach (DVB.Channel c in this.channels) { try { writer.write (c); @@ -237,11 +242,11 @@ throws DBus.Error { bool success = true; - var writer = new ChannelListWriter (File.new_for_path (path)); + var writer = new io.ChannelListWriter (File.new_for_path (path)); foreach (uint sid in channel_sids) { DVB.Channel? c = this.channels.get_channel (sid); if (c == null) { - warning ("Channel with SID %u does not exist", sid); + warning ("Channel with SID 0x%x does not exist", sid); continue; } try { @@ -262,6 +267,47 @@ return success; } + public bool AddScanningDataFromFile (string path) throws DBus.Error { + File datafile = File.new_for_path(path); + + debug ("Reading scanning data from %s", path); + + if (!Utils.is_readable_file (datafile)) return false; + + DataInputStream reader; + try { + reader = new DataInputStream (datafile.read (null)); + } catch (Error e) { + critical ("Could not open %s: %s", path, e.message); + return false; + } + + string line = null; + size_t len; + try { + while ((line = reader.read_line (out len, null)) != null) { + if (len == 0) continue; + + line = line.chug (); + if (line.has_prefix ("#")) continue; + + this.add_scanning_data_from_string (line); + } + } catch (Error e) { + critical ("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); + return false; + } + + return true; + } + /* Main Thread */ private void* worker () { this.loop.run (); @@ -277,12 +323,12 @@ bus_watch_source.destroy (); this.bus_watch_id = 0; } + debug ("Disposing pipeline"); this.pipeline.set_state (Gst.State.NULL); // Free pipeline this.pipeline = null; } - - this.transport_streams.clear (); + this.scanned_frequencies.clear (); this.clear_frequencies (); this.current_tuning_params = null; @@ -398,25 +444,40 @@ } return false; } + + protected void destroy_start_scan_source () { + if (this.start_scan_source != null && + !this.start_scan_source.is_destroyed ()) { + this.start_scan_source.destroy (); + this.start_scan_source = null; + } + } protected void remove_check_for_lock_timeout () { - if (this.check_for_lock_source != null) { + if (this.check_for_lock_source != null && + !this.check_for_lock_source.is_destroyed ()) { this.check_for_lock_source.destroy (); this.check_for_lock_source = null; } } protected void remove_wait_for_tables_timeout () { - if (this.wait_for_tables_source != null) { + if (this.wait_for_tables_source != null && + !this.wait_for_tables_source.is_destroyed ()) { this.wait_for_tables_source.destroy (); this.wait_for_tables_source = null; } } protected void queue_start_scan () { - var source = new IdleSource (); - source.set_callback (this.start_scan); - source.attach (this.context); + /* Avoid creating source multiple times */ + if (this.start_scan_source == null || + this.start_scan_source.is_destroyed ()) { + 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); + } } protected static void set_uint_property (Gst.Element src, @@ -437,6 +498,12 @@ this.wait_for_tables_source.set_callback (this.wait_for_tables); this.wait_for_tables_source.attach (this.context); } + int _signal; + structure.get_int ("signal", out _signal); + int _snr; + structure.get_int ("snr", out _snr); + this.frontend_stats ((_signal / (double)0xffff), + (_snr / (double)0xffff)); } protected void on_dvb_read_failure_structure () { @@ -453,7 +520,6 @@ // add BASE_PIDS pid_set.add (16); pid_set.add (17); - pid_set.add (18); Gst.Value programs = structure.get_value ("programs"); uint size = programs.list_get_size (); @@ -492,11 +558,11 @@ } protected void on_sdt_structure (Gst.Structure structure) { - debug("Received SDT"); - uint tsid; structure.get_uint ("transport-stream-id", out tsid); + debug("Received SDT (0x%x)", tsid); + Gst.Value services = structure.get_value ("services"); uint size = services.list_get_size (); @@ -540,12 +606,20 @@ } else { channel.Network = ""; } + + debug ("Found service 0x%x, %s, scrambled: %s", sid, + channel.Name, channel.Scrambled.to_string ()); } this.sdt_arrived = true; } protected void on_nit_structure (Gst.Structure structure) { + bool actual; + structure.get_boolean ("actual-network", out actual); + if (!actual) + return; + debug("Received NIT"); string name; @@ -575,8 +649,7 @@ weak Gst.Structure delivery = delivery_val.get_structure (); - debug ("Received TS %u", tsid); - this.transport_streams.set (tsid, delivery); + debug ("Received TS 0x%x", tsid); uint freq; delivery.get_uint ("frequency", out freq); @@ -653,7 +726,7 @@ case 0x01: case 0x02: case 0x1b: /* H.264 video stream */ - debug ("Found video PID %u for channel %u", + debug ("Found video PID 0x%x for channel 0x%x", pid, program_number); dvb_channel.VideoPID = pid; break; @@ -661,7 +734,7 @@ case 0x04: case 0x0f: case 0x11: - debug ("Found audio PID %u for channel %u", + debug ("Found audio PID 0x%x for channel 0x%x", pid, program_number); dvb_channel.AudioPIDs.add (pid); break; @@ -677,79 +750,63 @@ protected bool bus_watch_func (Gst.Bus bus, Gst.Message message) { switch (message.type) { case Gst.MessageType.ELEMENT: { - if (message.structure.get_name() == "dvb-frontend-stats") - this.on_dvb_frontend_stats_structure (message.structure); - else if (message.structure.get_name() == "dvb-read-failure") + Gst.Structure structure = message.get_structure (); + string structure_name = structure.get_name(); + if (structure_name == "dvb-frontend-stats") + this.on_dvb_frontend_stats_structure (structure); + else if (structure_name == "dvb-read-failure") this.on_dvb_read_failure_structure (); - else if (message.structure.get_name() == "sdt") - this.on_sdt_structure (message.structure); - else if (message.structure.get_name() == "nit") - this.on_nit_structure (message.structure); - else if (message.structure.get_name() == "pat") - this.on_pat_structure (message.structure); - else if (message.structure.get_name() == "pmt") - this.on_pmt_structure (message.structure); + else if (structure_name == "sdt") + this.on_sdt_structure (structure); + else if (structure_name == "nit") + this.on_nit_structure (structure); + else if (structure_name == "pat") + this.on_pat_structure (structure); + else if (structure_name == "pmt") + this.on_pmt_structure (structure); + else + return true; /* We are not interested in the message */ break; } case Gst.MessageType.ERROR: { Error gerror; string debug; message.parse_error (out gerror, out debug); - critical ("%s %s", gerror.message, debug); - this.do_destroy (); - return false; + warning ("%s %s", gerror.message, debug); + return true; } + default: + return true; /* We are not interested in the message */ } // NIT gives us the transport stream, SDT links SID and TS ID - if (this.nit_arrived && this.sdt_arrived) { + if (this.nit_arrived && this.sdt_arrived && this.pat_arrived) { + // We received all tables at least once. Add valid channels. lock (this.new_channels) { + ArrayList del_channels = new ArrayList (); foreach (uint sid in this.new_channels) { DVB.Channel channel = this.channels.get_channel (sid); - - uint tsid = channel.TransportStreamId; - // Check if already came across the transport stream - if (this.transport_streams.contains (tsid)) { - // add values from Gst.Structure to Channel - this.add_values_from_structure_to_channel ( - this.transport_streams.get (tsid), - channel); + + // If this fails we may miss video or audio pid, + // 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 ()); + 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 ("TS %u for channel %u does not exist", tsid, - sid); - // We haven't seen the transport stream, yet - // Maybe it comes with a later bus message - this.nit_arrived = false; + debug ("Channel 0x%x is not valid: %s", sid, + channel.to_string ()); + this.pmt_arrived = false; } } - // We received all tables at least once. Add valid channels. - if (this.pat_arrived) { - ArrayList del_channels = new ArrayList (); - foreach (uint sid in this.new_channels) { - DVB.Channel channel = this.channels.get_channel (sid); - - // If this fails we may miss video or audio pid, - // 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 ()); - 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 %u is not valid: %s", sid, - channel.to_string ()); - this.pmt_arrived = false; - } - } - - // Only remove those channels we have all the information for - foreach (uint sid in del_channels) { - this.new_channels.remove (sid); - } + // Only remove those channels we have all the information for + foreach (uint sid in del_channels) { + this.new_channels.remove (sid); } } } @@ -767,9 +824,13 @@ } protected void add_new_channel (uint sid) { - debug ("Adding new channel with SID %u", sid); + 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 + this.add_values_from_structure_to_channel ( + this.current_tuning_params, + new_channel); this.channels.add (new_channel); lock (this.new_channels) { this.new_channels.add (sid); diff -Nru gnome-dvb-daemon-0.1.16/src/Schedule.c gnome-dvb-daemon-0.1.21/src/Schedule.c --- gnome-dvb-daemon-0.1.16/src/Schedule.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Schedule.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Schedule.c generated by valac, the Vala compiler +/* Schedule.c generated by valac 0.9.7, the Vala compiler * generated from Schedule.vala, do not modify */ /* @@ -93,9 +93,19 @@ typedef struct _DVBEvent DVBEvent; typedef struct _DVBEventClass DVBEventClass; #define _g_sequence_free0(var) ((var == NULL) ? NULL : (var = (g_sequence_free (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))) #define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#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)) +#define DVB_DATABASE_SQLITE_SQLITE_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE, DVBdatabasesqliteSqliteDatabaseClass)) +#define DVB_DATABASE_SQLITE_IS_SQLITE_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE)) +#define DVB_DATABASE_SQLITE_IS_SQLITE_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE)) +#define DVB_DATABASE_SQLITE_SQLITE_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DVB_DATABASE_SQLITE_TYPE_SQLITE_DATABASE, DVBdatabasesqliteSqliteDatabaseClass)) + +typedef struct _DVBdatabasesqliteSqliteDatabase DVBdatabasesqliteSqliteDatabase; +typedef struct _DVBdatabasesqliteSqliteDatabaseClass DVBdatabasesqliteSqliteDatabaseClass; typedef struct _DVBEventPrivate DVBEventPrivate; #define DVB_EVENT_TYPE_AUDIO_COMPONENT (dvb_event_audio_component_get_type ()) @@ -209,6 +219,7 @@ gboolean (*add_or_update_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); DVBEvent* (*get_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); gboolean (*remove_event) (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); + gboolean (*remove_events_older_than) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); gboolean (*contains_event) (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); GeeList* (*get_events) (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); gboolean (*remove_events_of_group) (DVBdatabaseEPGStore* self, guint group_id, GError** error); @@ -258,7 +269,7 @@ static gpointer dvb_schedule_parent_class = NULL; static DVBIDBusScheduleIface* dvb_schedule_dvb_id_bus_schedule_parent_iface = NULL; -GType dvb_event_element_get_type (void); +GType dvb_event_element_get_type (void) G_GNUC_CONST; enum { DVB_EVENT_ELEMENT_DUMMY_PROPERTY }; @@ -267,68 +278,81 @@ DVBEventElement* dvb_event_element_new (void); DVBEventElement* dvb_event_element_construct (GType object_type); static void dvb_event_element_finalize (GObject* obj); -GType dvb_event_info_get_type (void); +DVBIDBusSchedule* dvb_id_bus_schedule_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +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); -GType dvb_schedule_get_type (void); -GType dvb_channel_get_type (void); +GType dvb_id_bus_schedule_get_type (void) G_GNUC_CONST; +GType dvb_schedule_get_type (void) G_GNUC_CONST; +GType dvb_channel_get_type (void) G_GNUC_CONST; 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); +GType dvb_event_get_type (void) G_GNUC_CONST; GQuark dvb_database_sql_error_quark (void); -GType dvb_database_epg_store_get_type (void); +GType dvb_database_epg_store_get_type (void) G_GNUC_CONST; #define DVB_SCHEDULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_SCHEDULE, DVBSchedulePrivate)) enum { DVB_SCHEDULE_DUMMY_PROPERTY, DVB_SCHEDULE_CHANNEL }; -DVBSchedule* dvb_schedule_new (DVBChannel* channel); -DVBSchedule* dvb_schedule_construct (GType object_type, DVBChannel* channel); -DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id); -gboolean dvb_event_has_expired (DVBEvent* self); -gboolean dvb_database_epg_store_remove_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); +static gboolean dvb_schedule_restore (DVBSchedule* self); +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); +gboolean dvb_event_has_expired (DVBEvent* self); +static void dvb_schedule_create_and_add_event_element (DVBSchedule* self, DVBEvent* event); +gboolean dvb_database_epg_store_remove_events_older_than (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); +DVBSchedule* dvb_schedule_new (DVBChannel* channel); +DVBSchedule* dvb_schedule_construct (GType object_type, DVBChannel* channel); void dvb_schedule_remove_expired_events (DVBSchedule* self); +DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id); +const char* dvb_channel_get_Name (DVBChannel* self); DVBEvent* dvb_database_epg_store_get_event (DVBdatabaseEPGStore* self, guint event_id, guint channel_sid, guint group_id, GError** error); +void dvb_schedule_add (DVBSchedule* self, DVBEvent* event); +static void dvb_schedule_store_event (DVBSchedule* self, DVBEvent* event); +void dvb_schedule_add_all (DVBSchedule* self, GeeCollection* new_events); +GType dvb_database_sqlite_sqlite_database_get_type (void) G_GNUC_CONST; +void dvb_database_sqlite_sqlite_database_begin_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error); +void dvb_database_sqlite_sqlite_database_end_transaction (DVBdatabasesqliteSqliteDatabase* self, GError** error); gpointer dvb_event_audio_component_ref (gpointer instance); void dvb_event_audio_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_audio_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_audio_component (GValue* value, gpointer v_object); +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_audio_component (const GValue* value); -GType dvb_event_audio_component_get_type (void); +GType dvb_event_audio_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_video_component_ref (gpointer instance); void dvb_event_video_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_video_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_video_component (GValue* value, gpointer v_object); +void dvb_event_value_take_video_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_video_component (const GValue* value); -GType dvb_event_video_component_get_type (void); +GType dvb_event_video_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_teletext_component_ref (gpointer instance); void dvb_event_teletext_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_teletext_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_teletext_component (GValue* value, gpointer v_object); +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); -static void dvb_schedule_create_and_add_event_element (DVBSchedule* self, DVBEvent* event); +GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; gboolean dvb_database_epg_store_add_or_update_event (DVBdatabaseEPGStore* self, DVBEvent* event, guint channel_sid, guint group_id, GError** error); -void dvb_schedule_add (DVBSchedule* self, DVBEvent* event); void dvb_event_get_utc_start_time (DVBEvent* self, struct tm* result); static gint _dvb_event_element_compare_gcompare_data_func (void* a, void* b, gpointer self); gboolean dvb_schedule_contains (DVBSchedule* self, guint event_id); -gboolean dvb_event_is_running (DVBEvent* self); DVBEvent* dvb_schedule_get_running_event (DVBSchedule* self); +gboolean dvb_event_is_running (DVBEvent* self); DVBEvent* dvb_schedule_get_event_around (DVBSchedule* self, struct tm* start, guint duration); static guint32* dvb_schedule_real_GetAllEvents (DVBIDBusSchedule* base, int* result_length1, GError** error); +static DVBEventInfo* dvb_schedule_real_GetAllEventInfos (DVBIDBusSchedule* base, int* result_length1, GError** error); static void dvb_schedule_event_to_event_info (DVBEvent* event, DVBEventInfo* result); static void _vala_DVBEventInfo_array_free (DVBEventInfo* array, gint array_length); -static DVBEventInfo* dvb_schedule_real_GetAllEventInfos (DVBIDBusSchedule* base, int* result_length1, GError** error); static gboolean dvb_schedule_real_GetInformations (DVBIDBusSchedule* base, guint32 event_id, DVBEventInfo* event_info, GError** error); static guint32 dvb_schedule_real_NowPlaying (DVBIDBusSchedule* base, GError** error); static guint32 dvb_schedule_real_Next (DVBIDBusSchedule* base, guint32 event_id, GError** error); @@ -336,17 +360,19 @@ static gboolean dvb_schedule_real_GetShortDescription (DVBIDBusSchedule* base, guint32 event_id, char** description, GError** error); static gboolean dvb_schedule_real_GetExtendedDescription (DVBIDBusSchedule* base, guint32 event_id, char** description, GError** error); static gboolean dvb_schedule_real_GetDuration (DVBIDBusSchedule* base, guint32 event_id, guint* duration, GError** error); +static gboolean dvb_schedule_real_GetLocalStartTime (DVBIDBusSchedule* base, guint32 event_id, guint** start_time, int* start_time_length1, GError** error); void dvb_event_get_local_start_time (DVBEvent* self, struct tm* result); static guint* dvb_schedule_to_time_array (struct tm* local_time, int* result_length1); -static gboolean dvb_schedule_real_GetLocalStartTime (DVBIDBusSchedule* base, guint32 event_id, guint** start_time, int* start_time_length1, GError** error); static gboolean dvb_schedule_real_GetLocalStartTimestamp (DVBIDBusSchedule* base, guint32 event_id, gint64* timestamp, GError** error); static gboolean dvb_schedule_real_IsRunning (DVBIDBusSchedule* base, guint32 event_id, gboolean* running, GError** error); static gboolean dvb_schedule_real_IsScrambled (DVBIDBusSchedule* base, guint32 event_id, gboolean* scrambled, GError** error); static void dvb_schedule_set_channel (DVBSchedule* self, DVBChannel* value); static void _dvb_event_element_destroy_gdestroy_notify (void* data); DVBdatabaseEPGStore* dvb_factory_get_epg_store (void); -GeeList* dvb_database_epg_store_get_events (DVBdatabaseEPGStore* self, guint channel_sid, guint group_id, GError** error); +static gboolean _dvb_schedule_restore_gsource_func (gpointer self); static GObject * dvb_schedule_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties); +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); @@ -354,15 +380,13 @@ static void dvb_schedule_finalize (GObject* obj); static void dvb_schedule_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void dvb_schedule_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; gint dvb_event_element_compare (DVBEventElement* event1, DVBEventElement* event2) { - gint result; + gint result = 0; gboolean _tmp0_ = FALSE; if (event1 == NULL) { _tmp0_ = event2 == NULL; @@ -452,13 +476,137 @@ } +/** + * We don't want to hold the complete information about + * every event in memory. Just remember id and starttime + * so we can have a sorted list. + */ GType dvb_event_element_get_type (void) { - static GType dvb_event_element_type_id = 0; - if (dvb_event_element_type_id == 0) { + static volatile gsize dvb_event_element_type_id__volatile = 0; + if (g_once_init_enter (&dvb_event_element_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBEventElementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_event_element_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBEventElement), 0, (GInstanceInitFunc) dvb_event_element_instance_init, NULL }; + GType dvb_event_element_type_id; dvb_event_element_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBEventElement", &g_define_type_info, 0); + g_once_init_leave (&dvb_event_element_type_id__volatile, dvb_event_element_type_id); + } + return dvb_event_element_type_id__volatile; +} + + +static gboolean dvb_schedule_restore (DVBSchedule* self) { + gboolean result = FALSE; + GeeList* levents; + gint newest_expired; + GError * _inner_error_ = NULL; + g_return_val_if_fail (self != NULL, FALSE); + levents = NULL; + { + GeeList* _tmp0_; + GeeList* _tmp1_; + _tmp0_ = dvb_database_epg_store_get_events (self->priv->epgstore, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch153_dvb_database_sql_error; + } + _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; + } + levents = (_tmp1_ = _tmp0_, _g_object_unref0 (levents), _tmp1_); + } + goto __finally153; + __catch153_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:80: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _g_object_unref0 (levents); + return result; + } + } + __finally153: + 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_); + return FALSE; + } + newest_expired = -1; + { + gint i; + i = 0; + { + gboolean _tmp2_; + _tmp2_ = TRUE; + while (TRUE) { + DVBEvent* event; + if (!_tmp2_) { + i++; + } + _tmp2_ = FALSE; + if (!(i < gee_collection_get_size ((GeeCollection*) levents))) { + break; + } + event = (DVBEvent*) gee_list_get (levents, i); + if (dvb_event_has_expired (event)) { + newest_expired = i; + } else { + dvb_schedule_create_and_add_event_element (self, event); + } + _dvb_event_unref0 (event); + } + } + } + if (newest_expired != (-1)) { + DVBEvent* event; + event = (DVBEvent*) gee_list_get (levents, newest_expired); + { + dvb_database_epg_store_remove_events_older_than (self->priv->epgstore, event, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch154_dvb_database_sql_error; + } + _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 __finally154; + __catch154_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:101: %s", e->message); + result = FALSE; + _g_error_free0 (e); + _dvb_event_unref0 (event); + _g_object_unref0 (levents); + return result; + } + } + __finally154: + 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_); + return FALSE; + } + _dvb_event_unref0 (event); } - return dvb_event_element_type_id; + g_debug ("Schedule.vala:106: Finished restoring EPG events for channel %u", dvb_channel_get_Sid (self->priv->_channel)); + result = FALSE; + _g_object_unref0 (levents); + return result; } @@ -476,93 +624,146 @@ void dvb_schedule_remove_expired_events (DVBSchedule* self) { - GError * _inner_error_; GSList* expired_events; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); - _inner_error_ = NULL; expired_events = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_events); { + g_static_rec_mutex_lock (&self->priv->__lock_events); { - gint i; - i = 0; + GSList* last_iter; { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* e; - gboolean _tmp1_ = FALSE; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < g_sequence_get_length (self->priv->events))) { - break; - } - iter = g_sequence_get_iter_at_pos (self->priv->events, i); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - e = dvb_schedule_get_event (self, element->id); - if (e != NULL) { - _tmp1_ = dvb_event_has_expired (e); - } else { - _tmp1_ = FALSE; - } - if (_tmp1_) { - expired_events = g_slist_prepend (expired_events, iter); - } else { - _g_object_unref0 (element); + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* e; + gboolean _tmp1_ = FALSE; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_sequence_get_length (self->priv->events))) { + break; + } + iter = g_sequence_get_iter_at_pos (self->priv->events, i); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + e = dvb_schedule_get_event (self, element->id); + if (e != NULL) { + _tmp1_ = dvb_event_has_expired (e); + } else { + _tmp1_ = FALSE; + } + if (_tmp1_) { + expired_events = g_slist_prepend (expired_events, iter); + } else { + _dvb_event_unref0 (e); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (e); - break; + _g_object_unref0 (element); } - _g_object_unref0 (element); - _dvb_event_unref0 (e); } } - } - { - GSList* iter_collection; - GSList* iter_it; - iter_collection = expired_events; - for (iter_it = iter_collection; iter_it != NULL; iter_it = iter_it->next) { - GSequenceIter* iter; - iter = (GSequenceIter*) iter_it->data; + g_debug ("Schedule.vala:133: Removing expired events of channel %s (%u)", dvb_channel_get_Name (self->priv->_channel), dvb_channel_get_Sid (self->priv->_channel)); + last_iter = g_slist_last (expired_events); + if (last_iter != NULL) { + DVBEventElement* element; + DVBEvent* event; + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get ((GSequenceIter*) last_iter->data)); + event = dvb_schedule_get_event (self, element->id); { - DVBEventElement* element; - g_debug ("Schedule.vala:109: Removing expired event"); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - gee_map_remove (self->priv->event_id_map, GUINT_TO_POINTER (element->id), NULL); - g_sequence_remove (iter); - dvb_database_epg_store_remove_event (self->priv->epgstore, element->id, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); + dvb_database_epg_store_remove_events_older_than (self->priv->epgstore, event, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch156_dvb_database_sql_error; + } + _dvb_event_unref0 (event); _g_object_unref0 (element); + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } _g_slist_free0 (expired_events); - 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_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 __finally156; + __catch156_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:145: %s", e->message); + _g_error_free0 (e); + } + } + __finally156: + 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_slist_free0 (expired_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); + } + { + GSList* iter_collection; + GSList* iter_it; + iter_collection = expired_events; + for (iter_it = iter_collection; iter_it != NULL; iter_it = iter_it->next) { + GSequenceIter* iter; + iter = (GSequenceIter*) iter_it->data; + { + DVBEventElement* element; + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + gee_map_unset (self->priv->event_id_map, GUINT_TO_POINTER (element->id), NULL); + g_sequence_remove (iter); + _g_object_unref0 (element); + } } } } + __finally155: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + _g_slist_free0 (expired_events); + 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_static_rec_mutex_unlock (&self->priv->__lock_events); _g_slist_free0 (expired_events); } DVBEvent* dvb_schedule_get_event (DVBSchedule* self, guint event_id) { - DVBEvent* result; - GError * _inner_error_; + DVBEvent* result = NULL; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); - _inner_error_ = NULL; { DVBEvent* _tmp0_; _tmp0_ = dvb_database_epg_store_get_event (self->priv->epgstore, event_id, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch54_dvb_database_sql_error; + goto __catch157_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_); @@ -571,21 +772,21 @@ result = _tmp0_; return result; } - goto __finally54; - __catch54_dvb_database_sql_error: + goto __finally157; + __catch157_dvb_database_sql_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Schedule.vala:125: %s", e->message); + g_critical ("Schedule.vala:163: %s", e->message); result = NULL; _g_error_free0 (e); return result; } } - __finally54: - if (_inner_error_ != NULL) { + __finally157: + { 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; @@ -593,32 +794,184 @@ } +/** + * When an event with the same id already exists, it's replaced + */ void dvb_schedule_add (DVBSchedule* self, DVBEvent* event) { - GError * _inner_error_; + GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (event != NULL); - _inner_error_ = NULL; if (dvb_event_has_expired (event)) { return; } - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (!gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER (event->id))) { - dvb_schedule_create_and_add_event_element (self, event); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + dvb_schedule_store_event (self, event); + } + __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_); + return; + } + } +} + + +void dvb_schedule_add_all (DVBSchedule* self, GeeCollection* new_events) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (new_events != NULL); + { + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + { + 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 __catch160_dvb_database_sql_error; + } + { + 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 __finally160; + __catch160_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:184: %s", e->message); + _g_error_free0 (e); + } + } + __finally160: + if (_inner_error_ != NULL) { + { + 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* _event_it; + _event_it = gee_iterable_iterator ((GeeIterable*) new_events); + while (TRUE) { + DVBEvent* event; + if (!gee_iterator_next (_event_it)) { + break; + } + event = (DVBEvent*) gee_iterator_get (_event_it); + if (!dvb_event_has_expired (event)) { + dvb_schedule_store_event (self, event); + } + _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 __catch161_dvb_database_sql_error; + } + { + 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 __finally161; + __catch161_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:193: %s", e->message); + _g_error_free0 (e); + } + } + __finally161: + if (_inner_error_ != NULL) { + { + 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; + } + } + __finally159: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); } - dvb_database_epg_store_add_or_update_event (self->priv->epgstore, event, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); 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; } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); } +static void dvb_schedule_store_event (DVBSchedule* self, DVBEvent* event) { + GError * _inner_error_ = NULL; + g_return_if_fail (self != NULL); + g_return_if_fail (event != NULL); + if (!gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER (event->id))) { + dvb_schedule_create_and_add_event_element (self, event); + } + { + dvb_database_epg_store_add_or_update_event (self->priv->epgstore, event, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { + goto __catch162_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; + } + } + goto __finally162; + __catch162_dvb_database_sql_error: + { + GError * e; + e = _inner_error_; + _inner_error_ = NULL; + { + g_critical ("Schedule.vala:207: %s", e->message); + _g_error_free0 (e); + } + } + __finally162: + 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; + } +} + + +/** + * Create event element from @event and add it to list of events + */ static gint _dvb_event_element_compare_gcompare_data_func (void* a, void* b, gpointer self) { - return dvb_event_element_compare (a, b); + gint result; + result = dvb_event_element_compare (a, b); + return result; } @@ -641,14 +994,25 @@ gboolean dvb_schedule_contains (DVBSchedule* self, guint event_id) { - gboolean result; + gboolean result = FALSE; gboolean val = FALSE; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - g_static_rec_mutex_lock (&self->priv->__lock_events); { - val = gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER (event_id)); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + val = gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER (event_id)); + } + __finally163: + { + 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_); + return FALSE; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = val; return result; } @@ -660,57 +1024,75 @@ DVBEvent* dvb_schedule_get_running_event (DVBSchedule* self) { - DVBEvent* result; + DVBEvent* result = NULL; DVBEvent* running_event; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); running_event = NULL; - g_static_rec_mutex_lock (&self->priv->__lock_events); { + g_static_rec_mutex_lock (&self->priv->__lock_events); { - gint i; - i = 0; { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - gboolean _tmp1_ = FALSE; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < g_sequence_get_length (self->priv->events))) { - break; - } - iter = g_sequence_get_iter_at_pos (self->priv->events, i); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - if (event != NULL) { - _tmp1_ = dvb_event_is_running (event); - } else { - _tmp1_ = FALSE; - } - if (_tmp1_) { - DVBEvent* _tmp2_; - running_event = (_tmp2_ = _dvb_event_ref0 (event), _dvb_event_unref0 (running_event), _tmp2_); - _g_object_unref0 (element); + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + gboolean _tmp1_ = FALSE; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_sequence_get_length (self->priv->events))) { + break; + } + iter = g_sequence_get_iter_at_pos (self->priv->events, i); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + _tmp1_ = dvb_event_is_running (event); + } else { + _tmp1_ = FALSE; + } + if (_tmp1_) { + DVBEvent* _tmp2_; + running_event = (_tmp2_ = _dvb_event_ref0 (event), _dvb_event_unref0 (running_event), _tmp2_); + _dvb_event_unref0 (event); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (event); - break; + _g_object_unref0 (element); } - _g_object_unref0 (element); - _dvb_event_unref0 (event); } } } + __finally164: + { + 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); + g_clear_error (&_inner_error_); + return NULL; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = running_event; return result; } +/** + * @start: local time of event + * @duration: how long the event is + * @returns: the event that starts after @start + * and spans the given time period + */ static void g_time_local (time_t time, struct tm* result) { struct tm _result_ = {0}; localtime_r (&time, &_result_); @@ -720,84 +1102,96 @@ DVBEvent* dvb_schedule_get_event_around (DVBSchedule* self, struct tm* start, guint duration) { - DVBEvent* result; + DVBEvent* result = NULL; DVBEvent* _result_; time_t timer_start; time_t timer_end; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); _result_ = NULL; timer_start = mktime (start); timer_end = timer_start + (duration * 60); - g_static_rec_mutex_lock (&self->priv->__lock_events); { - time_t last_diff; - last_diff = (time_t) 0; + g_static_rec_mutex_lock (&self->priv->__lock_events); { - gint i; - i = 0; + time_t last_diff; + last_diff = (time_t) 0; { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - GSequenceIter* iter; - DVBEventElement* element; - struct tm _tmp2_; - struct tm _tmp1_ = {0}; - time_t event_start; - DVBEvent* event; - time_t event_end; - time_t _tmp3_; - time_t min_end; - time_t _tmp4_; - time_t max_start; - time_t overlap; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < g_sequence_get_length (self->priv->events))) { - break; - } - iter = g_sequence_get_iter_at_pos (self->priv->events, i); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event_start = timegm ((_tmp2_ = (g_time_local (element->starttime, &_tmp1_), _tmp1_), &_tmp2_)); - event = dvb_schedule_get_event (self, element->id); - if (event == NULL) { - _g_object_unref0 (element); + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + GSequenceIter* iter; + DVBEventElement* element; + struct tm _tmp1_ = {0}; + struct tm _tmp2_; + time_t event_start; + DVBEvent* event; + time_t event_end; + time_t _tmp3_; + time_t min_end; + time_t _tmp4_; + time_t max_start; + time_t overlap; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_sequence_get_length (self->priv->events))) { + break; + } + iter = g_sequence_get_iter_at_pos (self->priv->events, i); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event_start = timegm ((_tmp2_ = (g_time_local (element->starttime, &_tmp1_), _tmp1_), &_tmp2_)); + event = dvb_schedule_get_event (self, element->id); + if (event == NULL) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + continue; + } + event_end = event_start + event->duration; + if (timer_end < event_end) { + _tmp3_ = timer_end; + } else { + _tmp3_ = event_end; + } + min_end = _tmp3_; + if (timer_start > event_start) { + _tmp4_ = timer_start; + } else { + _tmp4_ = event_start; + } + max_start = _tmp4_; + overlap = min_end - max_start; + if (last_diff < overlap) { + DVBEvent* _tmp5_; + last_diff = overlap; + _result_ = (_tmp5_ = _dvb_event_ref0 (event), _dvb_event_unref0 (_result_), _tmp5_); + } + if (event_start > timer_end) { + _dvb_event_unref0 (event); + _g_object_unref0 (element); + break; + } _dvb_event_unref0 (event); - continue; - } - event_end = event_start + event->duration; - if (timer_end < event_end) { - _tmp3_ = timer_end; - } else { - _tmp3_ = event_end; - } - min_end = _tmp3_; - if (timer_start > event_start) { - _tmp4_ = timer_start; - } else { - _tmp4_ = event_start; - } - max_start = _tmp4_; - overlap = min_end - max_start; - if (last_diff < overlap) { - DVBEvent* _tmp5_; - last_diff = overlap; - _result_ = (_tmp5_ = _dvb_event_ref0 (event), _dvb_event_unref0 (_result_), _tmp5_); - } - if (event_start > timer_end) { _g_object_unref0 (element); - _dvb_event_unref0 (event); - break; } - _g_object_unref0 (element); - _dvb_event_unref0 (event); } } } + __finally165: + { + 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); + g_clear_error (&_inner_error_); + return NULL; + } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = _result_; return result; } @@ -805,63 +1199,87 @@ static guint32* dvb_schedule_real_GetAllEvents (DVBIDBusSchedule* base, int* result_length1, GError** error) { DVBSchedule * self; - guint32* result; + guint32* result = NULL; GeeArrayList* events; - guint32* _tmp2_; - gint event_ids_size; gint event_ids_length1; - gint _tmp1_; + gint _event_ids_size_; + guint32* _tmp3_; + gint _tmp2_; guint32* event_ids; - guint32* _tmp4_; + guint32* _tmp5_; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; events = gee_array_list_new (G_TYPE_UINT, NULL, NULL, NULL); - g_static_rec_mutex_lock (&self->priv->__lock_events); { + g_static_rec_mutex_lock (&self->priv->__lock_events); { - gint i; - i = 0; { - gboolean _tmp0_; - _tmp0_ = TRUE; - while (TRUE) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - if (!_tmp0_) { - i++; - } - _tmp0_ = FALSE; - if (!(i < g_sequence_get_length (self->priv->events))) { - break; - } - iter = g_sequence_get_iter_at_pos (self->priv->events, i); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - if (dvb_event_has_expired (event)) { - _g_object_unref0 (element); + gint i; + i = 0; + { + gboolean _tmp0_; + _tmp0_ = TRUE; + while (TRUE) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + gboolean _tmp1_ = FALSE; + if (!_tmp0_) { + i++; + } + _tmp0_ = FALSE; + if (!(i < g_sequence_get_length (self->priv->events))) { + break; + } + iter = g_sequence_get_iter_at_pos (self->priv->events, i); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event == NULL) { + _tmp1_ = TRUE; + } else { + _tmp1_ = dvb_event_has_expired (event); + } + if (_tmp1_) { + _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); - continue; + _g_object_unref0 (element); } - gee_abstract_collection_add ((GeeAbstractCollection*) events, GUINT_TO_POINTER ((guint32) element->id)); - _g_object_unref0 (element); - _dvb_event_unref0 (event); } } } + __finally166: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (events); + return NULL; + } else { + _g_object_unref0 (events); + 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 (&self->priv->__lock_events); - event_ids = (_tmp2_ = g_new0 (guint32, _tmp1_ = gee_collection_get_size ((GeeCollection*) events)), event_ids_length1 = _tmp1_, event_ids_size = event_ids_length1, _tmp2_); + event_ids = (_tmp3_ = g_new0 (guint32, _tmp2_ = gee_collection_get_size ((GeeCollection*) events)), event_ids_length1 = _tmp2_, _event_ids_size_ = event_ids_length1, _tmp3_); { gint i; i = 0; { - gboolean _tmp3_; - _tmp3_ = TRUE; + gboolean _tmp4_; + _tmp4_ = TRUE; while (TRUE) { - if (!_tmp3_) { + if (!_tmp4_) { i++; } - _tmp3_ = FALSE; + _tmp4_ = FALSE; if (!(i < event_ids_length1)) { break; } @@ -869,11 +1287,11 @@ } } } - result = (_tmp4_ = event_ids, *result_length1 = event_ids_length1, _tmp4_); + result = (_tmp5_ = event_ids, *result_length1 = event_ids_length1, _tmp5_); _g_object_unref0 (events); return result; - _g_object_unref0 (events); event_ids = (g_free (event_ids), NULL); + _g_object_unref0 (events); } @@ -890,121 +1308,161 @@ static DVBEventInfo* dvb_schedule_real_GetAllEventInfos (DVBIDBusSchedule* base, int* result_length1, GError** error) { DVBSchedule * self; - DVBEventInfo* result; + DVBEventInfo* result = NULL; GeeArrayList* events; gint n_events; - DVBEventInfo* _tmp1_; - gint event_infos_size; gint event_infos_length1; + gint _event_infos_size_; + DVBEventInfo* _tmp2_; DVBEventInfo* event_infos; gint i; DVBEvent* event; - DVBEventInfo* _tmp7_; + DVBEventInfo* _tmp8_; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; events = gee_array_list_new (DVB_TYPE_EVENT, (GBoxedCopyFunc) dvb_event_ref, dvb_event_unref, NULL); - g_static_rec_mutex_lock (&self->priv->__lock_events); { - GSequenceIter* iter; - iter = g_sequence_get_begin_iter (self->priv->events); - if (!g_sequence_iter_is_end (iter)) { - DVBEventElement* element; - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - while (TRUE) { - DVBEvent* event; - if (!(!g_sequence_iter_is_end (iter))) { - break; - } - event = dvb_schedule_get_event (self, element->id); - if (!dvb_event_has_expired (event)) { - gee_abstract_collection_add ((GeeAbstractCollection*) events, event); - } - iter = g_sequence_iter_next (iter); - if (!g_sequence_iter_is_end (iter)) { - DVBEventElement* _tmp0_; - element = (_tmp0_ = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)), _g_object_unref0 (element), _tmp0_); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + GSequenceIter* iter; + iter = g_sequence_get_begin_iter (self->priv->events); + if (!g_sequence_iter_is_end (iter)) { + DVBEventElement* element; + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + while (TRUE) { + DVBEvent* event; + gboolean _tmp0_ = FALSE; + if (!(!g_sequence_iter_is_end (iter))) { + break; + } + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + _tmp0_ = !dvb_event_has_expired (event); + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + gee_abstract_collection_add ((GeeAbstractCollection*) events, event); + } + iter = g_sequence_iter_next (iter); + if (!g_sequence_iter_is_end (iter)) { + DVBEventElement* _tmp1_; + element = (_tmp1_ = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)), _g_object_unref0 (element), _tmp1_); + } + _dvb_event_unref0 (event); } - _dvb_event_unref0 (event); + _g_object_unref0 (element); + } + } + __finally167: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + _g_object_unref0 (events); + return NULL; + } else { + _g_object_unref0 (events); + 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_object_unref0 (element); } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); n_events = gee_collection_get_size ((GeeCollection*) events); - event_infos = (_tmp1_ = g_new0 (DVBEventInfo, n_events), event_infos_length1 = n_events, event_infos_size = event_infos_length1, _tmp1_); + event_infos = (_tmp2_ = g_new0 (DVBEventInfo, n_events), event_infos_length1 = n_events, _event_infos_size_ = event_infos_length1, _tmp2_); i = 0; event = NULL; if (n_events > i) { - DVBEvent* _tmp2_; - event = (_tmp2_ = (DVBEvent*) gee_abstract_list_get ((GeeAbstractList*) events, i), _dvb_event_unref0 (event), _tmp2_); + DVBEvent* _tmp3_; + event = (_tmp3_ = (DVBEvent*) gee_abstract_list_get ((GeeAbstractList*) events, i), _dvb_event_unref0 (event), _tmp3_); } while (TRUE) { - DVBEventInfo _tmp4_; - DVBEventInfo _tmp3_ = {0}; + DVBEventInfo _tmp4_ = {0}; + DVBEventInfo _tmp5_; if (!(event != NULL)) { break; } - event_infos[i] = (_tmp4_ = (dvb_schedule_event_to_event_info (event, &_tmp3_), _tmp3_), dvb_event_info_destroy (&event_infos[i]), _tmp4_); + event_infos[i] = (_tmp5_ = (dvb_schedule_event_to_event_info (event, &_tmp4_), _tmp4_), dvb_event_info_destroy (&event_infos[i]), _tmp5_); if ((i + 1) == n_events) { - DVBEvent* _tmp5_; + DVBEvent* _tmp6_; event_infos[i].next = (guint32) 0; - event = (_tmp5_ = NULL, _dvb_event_unref0 (event), _tmp5_); + event = (_tmp6_ = NULL, _dvb_event_unref0 (event), _tmp6_); } else { - DVBEvent* _tmp6_; - event = (_tmp6_ = (DVBEvent*) gee_abstract_list_get ((GeeAbstractList*) events, i + 1), _dvb_event_unref0 (event), _tmp6_); + DVBEvent* _tmp7_; + event = (_tmp7_ = (DVBEvent*) gee_abstract_list_get ((GeeAbstractList*) events, i + 1), _dvb_event_unref0 (event), _tmp7_); event_infos[i].next = (guint32) event->id; } i++; } - result = (_tmp7_ = event_infos, *result_length1 = event_infos_length1, _tmp7_); - _g_object_unref0 (events); + result = (_tmp8_ = event_infos, *result_length1 = event_infos_length1, _tmp8_); _dvb_event_unref0 (event); - return result; _g_object_unref0 (events); - event_infos = (_vala_DVBEventInfo_array_free (event_infos, event_infos_length1), NULL); + return result; _dvb_event_unref0 (event); + event_infos = (_vala_DVBEventInfo_array_free (event_infos, event_infos_length1), NULL); + _g_object_unref0 (events); } static gboolean dvb_schedule_real_GetInformations (DVBIDBusSchedule* base, guint32 event_id, DVBEventInfo* event_info, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret = FALSE; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - DVBEventInfo _tmp1_; - DVBEventInfo _tmp0_ = {0}; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - *event_info = (_tmp1_ = (dvb_schedule_event_to_event_info (event, &_tmp0_), _tmp0_), dvb_event_info_destroy (event_info), _tmp1_); - iter = g_sequence_iter_next (iter); - if (g_sequence_iter_is_end (iter)) { + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + DVBEventInfo _tmp0_ = {0}; + DVBEventInfo _tmp1_; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + *event_info = (_tmp1_ = (dvb_schedule_event_to_event_info (event, &_tmp0_), _tmp0_), dvb_event_info_destroy (event_info), _tmp1_); + iter = g_sequence_iter_next (iter); + if (g_sequence_iter_is_end (iter)) { + (*event_info).next = (guint32) 0; + } else { + DVBEventElement* _tmp2_; + element = (_tmp2_ = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)), _g_object_unref0 (element), _tmp2_); + (*event_info).next = (guint32) element->id; + } + ret = TRUE; + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + char* _tmp3_; + char* _tmp4_; + (*event_info).id = (guint32) 0; + (*event_info).name = (_tmp3_ = g_strdup (""), _g_free0 ((*event_info).name), _tmp3_); + (*event_info).duration = (guint) 0; + (*event_info).short_description = (_tmp4_ = g_strdup (""), _g_free0 ((*event_info).short_description), _tmp4_); (*event_info).next = (guint32) 0; + ret = FALSE; + } + } + __finally168: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; } else { - DVBEventElement* _tmp2_; - element = (_tmp2_ = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)), _g_object_unref0 (element), _tmp2_); - (*event_info).next = (guint32) element->id; + 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; } - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - char* _tmp3_; - char* _tmp4_; - (*event_info).id = (guint32) 0; - (*event_info).name = (_tmp3_ = g_strdup (""), _g_free0 ((*event_info).name), _tmp3_); - (*event_info).duration = (guint) 0; - (*event_info).short_description = (_tmp4_ = g_strdup (""), _g_free0 ((*event_info).short_description), _tmp4_); - (*event_info).next = (guint32) 0; - ret = FALSE; } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } @@ -1012,7 +1470,7 @@ static guint32 dvb_schedule_real_NowPlaying (DVBIDBusSchedule* base, GError** error) { DVBSchedule * self; - guint32 result; + guint32 result = 0U; DVBEvent* event; guint _tmp0_ = 0U; self = (DVBSchedule*) base; @@ -1030,28 +1488,44 @@ static guint32 dvb_schedule_real_Next (DVBIDBusSchedule* base, guint32 event_id, GError** error) { DVBSchedule * self; - guint32 result; + guint32 result = 0U; guint32 next_event; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; next_event = (guint32) 0; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - GSequenceIter* next_iter; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - next_iter = g_sequence_iter_next (iter); - if (!g_sequence_iter_is_end (next_iter)) { - DVBEventElement* element; - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (next_iter)); - next_event = (guint32) element->id; - _g_object_unref0 (element); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + GSequenceIter* next_iter; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + next_iter = g_sequence_iter_next (iter); + if (!g_sequence_iter_is_end (next_iter)) { + DVBEventElement* element; + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (next_iter)); + next_event = (guint32) element->id; + _g_object_unref0 (element); + } + } else { + g_debug ("Schedule.vala:405: No event with id %u", (guint) event_id); + } + } + __finally169: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return 0U; + } 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 0U; } - } else { - g_debug ("Schedule.vala:340: No event with id %u", (guint) event_id); } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = next_event; return result; } @@ -1059,37 +1533,59 @@ static gboolean dvb_schedule_real_GetName (DVBIDBusSchedule* base, guint32 event_id, char** name, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; if (name != NULL) { *name = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - if (event->name != NULL) { - char* _tmp0_; - *name = (_tmp0_ = g_strdup (event->name), _g_free0 (*name), _tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + gboolean _tmp0_ = FALSE; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + _tmp0_ = event->name != NULL; + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + char* _tmp1_; + *name = (_tmp1_ = g_strdup (event->name), _g_free0 (*name), _tmp1_); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:425: No event with id %u", (guint) event_id); + } + } + __finally170: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:360: No event with id %u", (guint) event_id); } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (!ret) { - char* _tmp1_; - *name = (_tmp1_ = g_strdup (""), _g_free0 (*name), _tmp1_); + char* _tmp2_; + *name = (_tmp2_ = g_strdup (""), _g_free0 (*name), _tmp2_); } result = ret; return result; @@ -1098,37 +1594,59 @@ static gboolean dvb_schedule_real_GetShortDescription (DVBIDBusSchedule* base, guint32 event_id, char** description, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; if (description != NULL) { *description = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - if (event->description != NULL) { - char* _tmp0_; - *description = (_tmp0_ = g_strdup (event->description), _g_free0 (*description), _tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + gboolean _tmp0_ = FALSE; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + _tmp0_ = event->description != NULL; + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + char* _tmp1_; + *description = (_tmp1_ = g_strdup (event->description), _g_free0 (*description), _tmp1_); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:447: No event with id %u", (guint) event_id); + } + } + __finally171: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:382: No event with id %u", (guint) event_id); } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (!ret) { - char* _tmp1_; - *description = (_tmp1_ = g_strdup (""), _g_free0 (*description), _tmp1_); + char* _tmp2_; + *description = (_tmp2_ = g_strdup (""), _g_free0 (*description), _tmp2_); } result = ret; return result; @@ -1137,37 +1655,59 @@ static gboolean dvb_schedule_real_GetExtendedDescription (DVBIDBusSchedule* base, guint32 event_id, char** description, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; if (description != NULL) { *description = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - if (event->extended_description != NULL) { - char* _tmp0_; - *description = (_tmp0_ = g_strdup (event->extended_description), _g_free0 (*description), _tmp0_); - ret = TRUE; + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + gboolean _tmp0_ = FALSE; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + _tmp0_ = event->extended_description != NULL; + } else { + _tmp0_ = FALSE; + } + if (_tmp0_) { + char* _tmp1_; + *description = (_tmp1_ = g_strdup (event->extended_description), _g_free0 (*description), _tmp1_); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:469: No event with id %u", (guint) event_id); + } + } + __finally172: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; } - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:404: No event with id %u", (guint) event_id); } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); if (!ret) { - char* _tmp1_; - *description = (_tmp1_ = g_strdup (""), _g_free0 (*description), _tmp1_); + char* _tmp2_; + *description = (_tmp2_ = g_strdup (""), _g_free0 (*description), _tmp2_); } result = ret; return result; @@ -1176,28 +1716,46 @@ static gboolean dvb_schedule_real_GetDuration (DVBIDBusSchedule* base, guint32 event_id, guint* duration, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - *duration = event->duration; - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:424: No event with id %u", (guint) event_id); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + *duration = event->duration; + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:491: No event with id %u", (guint) event_id); + } + } + __finally173: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } @@ -1205,39 +1763,61 @@ static gboolean dvb_schedule_real_GetLocalStartTime (DVBIDBusSchedule* base, guint32 event_id, guint** start_time, int* start_time_length1, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; if (start_time != NULL) { *start_time = NULL; } ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - struct tm _tmp0_ = {0}; - struct tm local_time; - guint* _tmp2_; - gint _tmp1_; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - local_time = (dvb_event_get_local_start_time (event, &_tmp0_), _tmp0_); - *start_time = (_tmp2_ = dvb_schedule_to_time_array (&local_time, &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - guint* _tmp4_; - guint* _tmp3_ = NULL; - g_debug ("Schedule.vala:445: No event with id %u", (guint) event_id); - *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + struct tm _tmp0_ = {0}; + struct tm local_time; + gint _tmp1_; + guint* _tmp2_; + local_time = (dvb_event_get_local_start_time (event, &_tmp0_), _tmp0_); + *start_time = (_tmp2_ = dvb_schedule_to_time_array (&local_time, &_tmp1_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = _tmp1_, _tmp2_); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + guint* _tmp3_ = NULL; + guint* _tmp4_; + g_debug ("Schedule.vala:514: No event with id %u", (guint) event_id); + *start_time = (_tmp4_ = (_tmp3_ = g_new0 (guint, 0), _tmp3_), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp4_); + } } + __finally174: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } + } + } + if (!ret) { + guint* _tmp5_; + *start_time = (_tmp5_ = g_new0 (guint, 0), *start_time = (g_free (*start_time), NULL), *start_time_length1 = 0, _tmp5_); } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } @@ -1245,29 +1825,47 @@ static gboolean dvb_schedule_real_GetLocalStartTimestamp (DVBIDBusSchedule* base, guint32 event_id, gint64* timestamp, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - struct tm _tmp0_ = {0}; - struct tm local_time; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - local_time = (dvb_event_get_local_start_time (event, &_tmp0_), _tmp0_); - *timestamp = (gint64) mktime (&local_time); - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + struct tm _tmp0_ = {0}; + struct tm local_time; + local_time = (dvb_event_get_local_start_time (event, &_tmp0_), _tmp0_); + *timestamp = (gint64) mktime (&local_time); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } + } + __finally175: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } @@ -1275,28 +1873,46 @@ static gboolean dvb_schedule_real_IsRunning (DVBIDBusSchedule* base, guint32 event_id, gboolean* running, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - *running = dvb_event_is_running (event); - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:483: No event with id %u", (guint) event_id); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + *running = dvb_event_is_running (event); + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:558: No event with id %u", (guint) event_id); + } + } + __finally176: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } @@ -1304,41 +1920,59 @@ static gboolean dvb_schedule_real_IsScrambled (DVBIDBusSchedule* base, guint32 event_id, gboolean* scrambled, GError** error) { DVBSchedule * self; - gboolean result; + gboolean result = FALSE; gboolean ret; + GError * _inner_error_ = NULL; self = (DVBSchedule*) base; ret = FALSE; - g_static_rec_mutex_lock (&self->priv->__lock_events); { - if (gee_map_contains (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { - GSequenceIter* iter; - DVBEventElement* element; - DVBEvent* event; - iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); - element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); - event = dvb_schedule_get_event (self, element->id); - *scrambled = !event->free_ca_mode; - ret = TRUE; - _g_object_unref0 (element); - _dvb_event_unref0 (event); - } else { - g_debug ("Schedule.vala:503: No event with id %u", (guint) event_id); + g_static_rec_mutex_lock (&self->priv->__lock_events); + { + if (gee_map_has_key (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id))) { + GSequenceIter* iter; + DVBEventElement* element; + DVBEvent* event; + iter = (GSequenceIter*) gee_map_get (self->priv->event_id_map, GUINT_TO_POINTER ((guint) event_id)); + element = _g_object_ref0 ((DVBEventElement*) g_sequence_get (iter)); + event = dvb_schedule_get_event (self, element->id); + if (event != NULL) { + *scrambled = !event->free_ca_mode; + ret = TRUE; + } + _dvb_event_unref0 (event); + _g_object_unref0 (element); + } else { + g_debug ("Schedule.vala:580: No event with id %u", (guint) event_id); + } + } + __finally177: + { + g_static_rec_mutex_unlock (&self->priv->__lock_events); + } + if (_inner_error_ != NULL) { + if (_inner_error_->domain == DBUS_GERROR) { + g_propagate_error (error, _inner_error_); + return FALSE; + } 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 FALSE; + } } } - g_static_rec_mutex_unlock (&self->priv->__lock_events); result = ret; return result; } static guint* dvb_schedule_to_time_array (struct tm* local_time, int* result_length1) { - guint* result; - guint* _tmp0_; - gint start_size; + guint* result = NULL; gint start_length1; + gint _start_size_; + guint* _tmp0_; guint* start; guint* _tmp1_; - start = (_tmp0_ = g_new0 (guint, 6), start_length1 = 6, start_size = start_length1, _tmp0_); + start = (_tmp0_ = g_new0 (guint, 6), start_length1 = 6, _start_size_ = start_length1, _tmp0_); start[0] = (guint) ((*local_time).tm_year + 1900); start[1] = (guint) ((*local_time).tm_mon + 1); start[2] = (guint) (*local_time).tm_mday; @@ -1352,16 +1986,15 @@ static void dvb_schedule_event_to_event_info (DVBEvent* event, DVBEventInfo* result) { - DVBEventInfo _tmp0_ = {0}; - DVBEventInfo event_info; + DVBEventInfo event_info = {0}; + char* _tmp0_; char* _tmp1_; - char* _tmp2_; g_return_if_fail (event != NULL); - event_info = (memset (&_tmp0_, 0, sizeof (DVBEventInfo)), _tmp0_); + memset (&event_info, 0, sizeof (DVBEventInfo)); event_info.id = (guint32) event->id; - event_info.name = (_tmp1_ = g_strdup (event->name), _g_free0 (event_info.name), _tmp1_); + event_info.name = (_tmp0_ = g_strdup (event->name), _g_free0 (event_info.name), _tmp0_); event_info.duration = event->duration; - event_info.short_description = (_tmp2_ = g_strdup (event->description), _g_free0 (event_info.short_description), _tmp2_); + event_info.short_description = (_tmp1_ = g_strdup (event->description), _g_free0 (event_info.short_description), _tmp1_); *result = event_info; return; } @@ -1387,85 +2020,52 @@ } +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; - GError * _inner_error_; parent_class = G_OBJECT_CLASS (dvb_schedule_parent_class); obj = parent_class->constructor (type, n_construct_properties, construct_properties); self = DVB_SCHEDULE (obj); - _inner_error_ = NULL; { GSequence* _tmp0_; GeeMap* _tmp1_; + DVBdatabaseEPGStore* _tmp2_; self->priv->events = (_tmp0_ = g_sequence_new (_dvb_event_element_destroy_gdestroy_notify), _g_sequence_free0 (self->priv->events), _tmp0_); self->priv->event_id_map = (_tmp1_ = (GeeMap*) 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), _tmp1_); - self->priv->epgstore = dvb_factory_get_epg_store (); - { - GeeList* events; - events = dvb_database_epg_store_get_events (self->priv->epgstore, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch55_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_); - } - { - GeeIterator* _event_it; - _event_it = gee_iterable_iterator ((GeeIterable*) events); - while (TRUE) { - DVBEvent* event; - if (!gee_iterator_next (_event_it)) { - break; - } - event = (DVBEvent*) gee_iterator_get (_event_it); - if (dvb_event_has_expired (event)) { - dvb_database_epg_store_remove_event (self->priv->epgstore, event->id, dvb_channel_get_Sid (self->priv->_channel), dvb_channel_get_GroupId (self->priv->_channel), &_inner_error_); - if (_inner_error_ != NULL) { - _dvb_event_unref0 (event); - _g_object_unref0 (_event_it); - _g_object_unref0 (events); - if (_inner_error_->domain == DVB_DATABASE_SQL_ERROR) { - goto __catch55_dvb_database_sql_error; - } - _dvb_event_unref0 (event); - _g_object_unref0 (_event_it); - _g_object_unref0 (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_); - } - } else { - dvb_schedule_create_and_add_event_element (self, event); - } - _dvb_event_unref0 (event); - } - _g_object_unref0 (_event_it); - } - _g_object_unref0 (events); - } - goto __finally55; - __catch55_dvb_database_sql_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("Schedule.vala:83: %s", e->message); - _g_error_free0 (e); - } - } - __finally55: - 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_); - } + self->priv->epgstore = (_tmp2_ = dvb_factory_get_epg_store (), _g_object_unref0 (self->priv->epgstore), _tmp2_); + g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dvb_schedule_restore_gsource_func, g_object_ref (self), g_object_unref); } return obj; } +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_schedule_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -1566,19 +2166,25 @@ g_static_rec_mutex_free (&self->priv->__lock_events); _g_sequence_free0 (self->priv->events); _g_object_unref0 (self->priv->event_id_map); + _g_object_unref0 (self->priv->epgstore); G_OBJECT_CLASS (dvb_schedule_parent_class)->finalize (obj); } +/** + * Represents a series of events of a channel + */ GType dvb_schedule_get_type (void) { - static GType dvb_schedule_type_id = 0; - if (dvb_schedule_type_id == 0) { + static volatile gsize dvb_schedule_type_id__volatile = 0; + if (g_once_init_enter (&dvb_schedule_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBScheduleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_schedule_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBSchedule), 0, (GInstanceInitFunc) dvb_schedule_instance_init, NULL }; static const GInterfaceInfo dvb_id_bus_schedule_info = { (GInterfaceInitFunc) dvb_schedule_dvb_id_bus_schedule_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType dvb_schedule_type_id; dvb_schedule_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBSchedule", &g_define_type_info, 0); g_type_add_interface_static (dvb_schedule_type_id, DVB_TYPE_ID_BUS_SCHEDULE, &dvb_id_bus_schedule_info); + g_once_init_leave (&dvb_schedule_type_id__volatile, dvb_schedule_type_id); } - return dvb_schedule_type_id; + return dvb_schedule_type_id__volatile; } @@ -1610,24 +2216,5 @@ } -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); -} - - diff -Nru gnome-dvb-daemon-0.1.16/src/Schedule.vala gnome-dvb-daemon-0.1.21/src/Schedule.vala --- gnome-dvb-daemon-0.1.16/src/Schedule.vala 2009-11-28 01:09:02.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Schedule.vala 2010-08-09 13:22:26.000000000 +0000 @@ -61,27 +61,51 @@ private Sequence events; private Map> event_id_map; - private weak EPGStore epgstore; + private EPGStore epgstore; construct { this.events = new Sequence (EventElement.destroy); this.event_id_map = new HashMap> (); this.epgstore = Factory.get_epg_store (); - - try { - Gee.List events = this.epgstore.get_events ( - this.channel.Sid, this.channel.GroupId); - foreach (Event event in events) { - if (event.has_expired ()) { - this.epgstore.remove_event (event.id, this.channel.Sid, - this.channel.GroupId); - } else { - this.create_and_add_event_element (event); - } - } + + Idle.add (this.restore); + } + + private bool 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; + } + + int newest_expired = -1; + for (int i=0; i> expired_events = new SList > (); + SList> expired_events = + new SList > (); lock (this.events) { for (int i=0; i> last_iter = + expired_events.last (); + if (last_iter != null) { + EventElement element = this.events.get (last_iter.data); + Event? event = this.get_event (element.id); + try { + this.epgstore.remove_events_older_than (event, + this.channel.Sid, this.channel.GroupId); + } catch (SqlError e) { + critical ("%s", e.message); + } + } + foreach (weak SequenceIter iter in expired_events) { - debug ("Removing expired event"); EventElement element = this.events.get (iter); - this.event_id_map.remove (element.id); + this.event_id_map.unset (element.id); this.events.remove (iter); - this.epgstore.remove_event ( - element.id, this.channel.Sid, this.channel.GroupId); } } } @@ -134,12 +172,39 @@ if (event.has_expired ()) return; lock (this.events) { - if (!this.event_id_map.contains (event.id)) { - this.create_and_add_event_element (event); + this.store_event (event); + } + } + + public void add_all (Collection new_events) { + lock (this.events) { + try { + ((database.sqlite.SqliteDatabase)this.epgstore).begin_transaction (); + } catch (SqlError e) { + critical ("%s", e.message); + } + foreach (Event event in new_events) { + if (!event.has_expired ()) + this.store_event (event); } - + try { + ((database.sqlite.SqliteDatabase)this.epgstore).end_transaction (); + } catch (SqlError e) { + critical ("%s", e.message); + } + } + } + + private void store_event (Event event) { + if (!this.event_id_map.has_key (event.id)) { + this.create_and_add_event_element (event); + } + + try { this.epgstore.add_or_update_event (event, this.channel.Sid, this.channel.GroupId); + } catch (SqlError e) { + critical ("%s", e.message); } } @@ -161,7 +226,7 @@ public bool contains (uint event_id) { bool val; lock (this.events) { - val = this.event_id_map.contains (event_id); + val = this.event_id_map.has_key (event_id); } return val; } @@ -233,7 +298,7 @@ SequenceIter iter = this.events.get_iter_at_pos (i); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - if (event.has_expired ()) continue; + if (event == null || event.has_expired ()) continue; events.add (element.id); } } @@ -254,7 +319,7 @@ while (!iter.is_end ()) { Event? event = this.get_event (element.id); - if (!event.has_expired ()) + if (event != null && !event.has_expired ()) events.add (event); iter = iter.next (); @@ -292,7 +357,7 @@ bool ret; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); @@ -328,7 +393,7 @@ public uint32 Next (uint32 event_id) throws DBus.Error { uint32 next_event = 0; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); SequenceIter next_iter = iter.next (); // Check if a new event follows @@ -348,11 +413,11 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - if (event.name != null) { + if (event != null && event.name != null) { name = event.name; ret = true; } @@ -370,11 +435,11 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - if (event.description != null) { + if (event != null && event.description != null) { description = event.description; ret = true; } @@ -392,11 +457,11 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - if (event.extended_description != null) { + if (event != null && event.extended_description != null) { description = event.extended_description; ret = true; } @@ -414,12 +479,14 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - duration = event.duration; - ret = true; + if (event != null) { + duration = event.duration; + ret = true; + } } else { debug ("No event with id %u", event_id); } @@ -434,18 +501,22 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - Time local_time = event.get_local_start_time (); - start_time = to_time_array (local_time); - ret = true; + if (event != null) { + Time local_time = event.get_local_start_time (); + start_time = to_time_array (local_time); + ret = true; + } } else { debug ("No event with id %u", event_id); start_time = new uint[] {}; } } + + if (!ret) start_time = new uint[0]; return ret; } @@ -455,13 +526,15 @@ { bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - Time local_time = event.get_local_start_time (); - timestamp = (int64)local_time.mktime (); - ret = true; + if (event != null) { + Time local_time = event.get_local_start_time (); + timestamp = (int64)local_time.mktime (); + ret = true; + } } } return ret; @@ -473,12 +546,14 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - running = (event.is_running ()); - ret = true; + if (event != null) { + running = (event.is_running ()); + ret = true; + } } else { debug ("No event with id %u", event_id); } @@ -493,12 +568,14 @@ bool ret = false; lock (this.events) { - if (this.event_id_map.contains (event_id)) { + if (this.event_id_map.has_key (event_id)) { weak SequenceIter iter = this.event_id_map.get (event_id); EventElement element = this.events.get (iter); Event? event = this.get_event (element.id); - scrambled = (!event.free_ca_mode); - ret = true; + if (event != null) { + scrambled = (!event.free_ca_mode); + ret = true; + } } else { debug ("No event with id %u", event_id); } diff -Nru gnome-dvb-daemon-0.1.16/src/Settings.c gnome-dvb-daemon-0.1.21/src/Settings.c --- gnome-dvb-daemon-0.1.16/src/Settings.c 2010-03-17 19:35:06.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Settings.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Settings.c generated by valac, the Vala compiler +/* Settings.c generated by valac 0.9.7, the Vala compiler * generated from Settings.vala, do not modify */ /* @@ -60,7 +60,7 @@ static gpointer dvb_settings_parent_class = NULL; -GType dvb_settings_get_type (void); +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 @@ -102,7 +102,7 @@ GFile* dvb_settings_get_settings_file (DVBSettings* self) { - GFile* result; + GFile* result = NULL; GFile* config_dir; GFile* our_config; GFile* settings_file; @@ -111,19 +111,18 @@ our_config = g_file_get_child (config_dir, "gnome-dvb-daemon"); settings_file = g_file_get_child (our_config, "settings.ini"); result = settings_file; - _g_object_unref0 (config_dir); _g_object_unref0 (our_config); + _g_object_unref0 (config_dir); return result; } gboolean dvb_settings_load (DVBSettings* self) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; GFile* settings_file; gboolean success; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; settings_file = dvb_settings_get_settings_file (self); success = TRUE; if (!g_file_query_exists (settings_file, NULL)) { @@ -134,12 +133,12 @@ GFileOutputStream* _tmp1_; _tmp0_ = g_file_create (settings_file, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch56_g_error; + goto __catch178_g_error; } stream = (_tmp1_ = _tmp0_, _g_object_unref0 (stream), _tmp1_); } - goto __finally56; - __catch56_g_error: + goto __finally178; + __catch178_g_error: { GError * e; e = _inner_error_; @@ -155,7 +154,7 @@ return result; } } - __finally56: + __finally178: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -166,11 +165,11 @@ { g_output_stream_write ((GOutputStream*) stream, DVB_SETTINGS_DEFAULT_SETTINGS, strlen (DVB_SETTINGS_DEFAULT_SETTINGS), NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch57_g_error; + goto __catch179_g_error; } } - goto __finally57; - __catch57_g_error: + goto __finally179; + __catch179_g_error: { GError * e; e = _inner_error_; @@ -183,7 +182,7 @@ _g_error_free0 (e); } } - __finally57: + __finally179: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -194,11 +193,11 @@ { g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch58_g_error; + goto __catch180_g_error; } } - goto __finally58; - __catch58_g_error: + goto __finally180; + __catch180_g_error: { GError * e; e = _inner_error_; @@ -209,7 +208,7 @@ _g_error_free0 (e); } } - __finally58: + __finally180: if (_inner_error_ != NULL) { _g_object_unref0 (stream); _g_object_unref0 (settings_file); @@ -226,10 +225,10 @@ _g_free0 (_tmp4_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { - goto __catch59_g_key_file_error; + goto __catch181_g_key_file_error; } if (_inner_error_->domain == G_FILE_ERROR) { - goto __catch59_g_file_error; + goto __catch181_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); @@ -237,8 +236,8 @@ return FALSE; } } - goto __finally59; - __catch59_g_key_file_error: + goto __finally181; + __catch181_g_key_file_error: { GError * e; e = _inner_error_; @@ -249,8 +248,8 @@ _g_error_free0 (e); } } - goto __finally59; - __catch59_g_file_error: + goto __finally181; + __catch181_g_file_error: { GError * e; e = _inner_error_; @@ -261,7 +260,7 @@ _g_error_free0 (e); } } - __finally59: + __finally181: 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); @@ -276,15 +275,14 @@ gboolean dvb_settings_save (DVBSettings* self) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; GFile* settings_file; GFileOutputStream* stream; char* data; gsize data_len = 0UL; char* _tmp3_; + GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, FALSE); - _inner_error_ = NULL; settings_file = dvb_settings_get_settings_file (self); stream = NULL; { @@ -292,12 +290,12 @@ GFileOutputStream* _tmp1_; _tmp0_ = g_file_replace (settings_file, NULL, TRUE, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch60_g_error; + goto __catch182_g_error; } stream = (_tmp1_ = _tmp0_, _g_object_unref0 (stream), _tmp1_); } - goto __finally60; - __catch60_g_error: + goto __finally182; + __catch182_g_error: { GError * e; e = _inner_error_; @@ -308,15 +306,15 @@ _g_free0 (_tmp2_); result = FALSE; _g_error_free0 (e); - _g_object_unref0 (settings_file); _g_object_unref0 (stream); + _g_object_unref0 (settings_file); return result; } } - __finally60: + __finally182: if (_inner_error_ != NULL) { - _g_object_unref0 (settings_file); _g_object_unref0 (stream); + _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); g_clear_error (&_inner_error_); return FALSE; @@ -326,11 +324,11 @@ { g_output_stream_write_all ((GOutputStream*) stream, data, data_len, NULL, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch61_g_error; + goto __catch183_g_error; } } - goto __finally61; - __catch61_g_error: + goto __finally183; + __catch183_g_error: { GError * e; e = _inner_error_; @@ -341,17 +339,17 @@ _g_free0 (_tmp4_); result = FALSE; _g_error_free0 (e); - _g_object_unref0 (settings_file); - _g_object_unref0 (stream); _g_free0 (data); + _g_object_unref0 (stream); + _g_object_unref0 (settings_file); return result; } } - __finally61: + __finally183: if (_inner_error_ != NULL) { - _g_object_unref0 (settings_file); - _g_object_unref0 (stream); _g_free0 (data); + _g_object_unref0 (stream); + _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); g_clear_error (&_inner_error_); return FALSE; @@ -359,11 +357,11 @@ { g_output_stream_close ((GOutputStream*) stream, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch62_g_error; + goto __catch184_g_error; } } - goto __finally62; - __catch62_g_error: + goto __finally184; + __catch184_g_error: { GError * e; e = _inner_error_; @@ -373,31 +371,30 @@ _g_error_free0 (e); } } - __finally62: + __finally184: if (_inner_error_ != NULL) { - _g_object_unref0 (settings_file); - _g_object_unref0 (stream); _g_free0 (data); + _g_object_unref0 (stream); + _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); g_clear_error (&_inner_error_); return FALSE; } result = FALSE; - _g_object_unref0 (settings_file); - _g_object_unref0 (stream); _g_free0 (data); + _g_object_unref0 (stream); + _g_object_unref0 (settings_file); return result; } char* dvb_settings_get_string (DVBSettings* self, const char* group_name, const char* key, GError** error) { - char* result; - GError * _inner_error_; + char* result = NULL; char* _tmp0_; + 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); - _inner_error_ = NULL; _tmp0_ = g_key_file_get_string (self->priv->keyfile, group_name, key, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { @@ -415,13 +412,12 @@ gboolean dvb_settings_get_boolean (DVBSettings* self, const char* group_name, const char* key, GError** error) { - gboolean result; - GError * _inner_error_; + gboolean result = FALSE; gboolean _tmp0_; + 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); - _inner_error_ = NULL; _tmp0_ = g_key_file_get_boolean (self->priv->keyfile, group_name, key, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { @@ -439,13 +435,12 @@ gint dvb_settings_get_integer (DVBSettings* self, const char* group_name, const char* key, GError** error) { - gint result; - GError * _inner_error_; + gint result = 0; gint _tmp0_; + 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); - _inner_error_ = NULL; _tmp0_ = g_key_file_get_integer (self->priv->keyfile, group_name, key, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { @@ -463,13 +458,12 @@ double dvb_settings_get_double (DVBSettings* self, const char* group_name, const char* key, GError** error) { - double result; - GError * _inner_error_; + double result = 0.0; double _tmp0_; + 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); - _inner_error_ = NULL; _tmp0_ = g_key_file_get_double (self->priv->keyfile, group_name, key, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { @@ -487,19 +481,18 @@ char** dvb_settings_get_string_list (DVBSettings* self, const char* group_name, const char* key, int* result_length1, GError** error) { - char** result; - GError * _inner_error_; - char** _tmp2_; - gint _tmp1__size; + char** result = NULL; gint _tmp1__length1; + gint __tmp1__size_; + char** _tmp2_; gsize _tmp0_; char** _tmp1_; char** _tmp3_; + 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); - _inner_error_ = NULL; - _tmp1_ = (_tmp2_ = g_key_file_get_string_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, _tmp1__size = _tmp1__length1, _tmp2_); + _tmp1_ = (_tmp2_ = g_key_file_get_string_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -516,19 +509,18 @@ gboolean* dvb_settings_get_boolean_list (DVBSettings* self, const char* group_name, const char* key, int* result_length1, GError** error) { - gboolean* result; - GError * _inner_error_; - gboolean* _tmp2_; - gint _tmp1__size; + gboolean* result = NULL; gint _tmp1__length1; + gint __tmp1__size_; + gboolean* _tmp2_; gsize _tmp0_; gboolean* _tmp1_; gboolean* _tmp3_; + 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); - _inner_error_ = NULL; - _tmp1_ = (_tmp2_ = g_key_file_get_boolean_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, _tmp1__size = _tmp1__length1, _tmp2_); + _tmp1_ = (_tmp2_ = g_key_file_get_boolean_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -545,19 +537,18 @@ gint* dvb_settings_get_integer_list (DVBSettings* self, const char* group_name, const char* key, int* result_length1, GError** error) { - gint* result; - GError * _inner_error_; - gint* _tmp2_; - gint _tmp1__size; + gint* result = NULL; gint _tmp1__length1; + gint __tmp1__size_; + gint* _tmp2_; gsize _tmp0_; gint* _tmp1_; gint* _tmp3_; + 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); - _inner_error_ = NULL; - _tmp1_ = (_tmp2_ = g_key_file_get_integer_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, _tmp1__size = _tmp1__length1, _tmp2_); + _tmp1_ = (_tmp2_ = g_key_file_get_integer_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -574,19 +565,18 @@ double* dvb_settings_get_double_list (DVBSettings* self, const char* group_name, const char* key, int* result_length1, GError** error) { - double* result; - GError * _inner_error_; - double* _tmp2_; - gint _tmp1__size; + double* result = NULL; gint _tmp1__length1; + gint __tmp1__size_; + double* _tmp2_; gsize _tmp0_; double* _tmp1_; double* _tmp3_; + 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); - _inner_error_ = NULL; - _tmp1_ = (_tmp2_ = g_key_file_get_double_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, _tmp1__size = _tmp1__length1, _tmp2_); + _tmp1_ = (_tmp2_ = g_key_file_get_double_list (self->priv->keyfile, group_name, key, &_tmp0_, &_inner_error_), _tmp1__length1 = _tmp0_, __tmp1__size_ = _tmp1__length1, _tmp2_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_KEY_FILE_ERROR) { g_propagate_error (error, _inner_error_); @@ -639,7 +629,7 @@ 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, val, val_length1); + g_key_file_set_string_list (self->priv->keyfile, group_name, key, (const gchar* const*) val, val_length1); } @@ -669,7 +659,7 @@ DVBSettings* dvb_settings_construct (GType object_type) { DVBSettings * self; - self = g_object_newv (object_type, 0, NULL); + self = (DVBSettings*) g_object_new (object_type, NULL); return self; } @@ -716,12 +706,14 @@ GType dvb_settings_get_type (void) { - static GType dvb_settings_type_id = 0; - if (dvb_settings_type_id == 0) { + static volatile gsize dvb_settings_type_id__volatile = 0; + if (g_once_init_enter (&dvb_settings_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBSettings), 0, (GInstanceInitFunc) dvb_settings_instance_init, NULL }; + GType dvb_settings_type_id; dvb_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBSettings", &g_define_type_info, 0); + g_once_init_leave (&dvb_settings_type_id__volatile, dvb_settings_type_id); } - return dvb_settings_type_id; + return dvb_settings_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialChannel.c gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialChannel.c --- gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialChannel.c 2009-10-01 10:38:15.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialChannel.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* TerrestrialChannel.c generated by valac, the Vala compiler +/* TerrestrialChannel.c generated by valac 0.9.7, the Vala compiler * generated from TerrestrialChannel.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -159,15 +159,15 @@ static gpointer dvb_terrestrial_channel_parent_class = NULL; -GType dvb_channel_get_type (void); -GType dvb_terrestrial_channel_get_type (void); -GType dvb_dvb_src_inversion_get_type (void); -GType dvb_dvb_src_bandwidth_get_type (void); -GType dvb_dvb_src_code_rate_get_type (void); -GType dvb_dvb_src_modulation_get_type (void); -GType dvb_dvb_src_transmission_mode_get_type (void); -GType dvb_dvb_src_guard_get_type (void); -GType dvb_dvb_src_hierarchy_get_type (void); +GType dvb_channel_get_type (void) G_GNUC_CONST; +GType dvb_terrestrial_channel_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_bandwidth_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_transmission_mode_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_guard_get_type (void) G_GNUC_CONST; +GType dvb_dvb_src_hierarchy_get_type (void) G_GNUC_CONST; #define DVB_TERRESTRIAL_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_TERRESTRIAL_CHANNEL, DVBTerrestrialChannelPrivate)) enum { DVB_TERRESTRIAL_CHANNEL_DUMMY_PROPERTY, @@ -180,6 +180,10 @@ DVB_TERRESTRIAL_CHANNEL_GUARD_INTERVAL, DVB_TERRESTRIAL_CHANNEL_HIERARCHY }; +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); +static void dvb_terrestrial_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); DVBDvbSrcModulation dvb_terrestrial_channel_get_Constellation (DVBTerrestrialChannel* self); DVBDvbSrcTransmissionMode dvb_terrestrial_channel_get_TransmissionMode (DVBTerrestrialChannel* self); DVBDvbSrcCodeRate dvb_terrestrial_channel_get_CodeRateHP (DVBTerrestrialChannel* self); @@ -189,16 +193,15 @@ guint dvb_channel_get_Frequency (DVBChannel* self); DVBDvbSrcHierarchy dvb_terrestrial_channel_get_Hierarchy (DVBTerrestrialChannel* self); DVBDvbSrcInversion dvb_terrestrial_channel_get_Inversion (DVBTerrestrialChannel* self); -static void dvb_terrestrial_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source); +static char* dvb_terrestrial_channel_real_to_string (DVBChannel* base); const char* dvb_channel_get_Name (DVBChannel* self); const char* dvb_utils_get_nick_from_enum (GType enumtype, gint val); guint dvb_channel_get_VideoPID (DVBChannel* self); char* dvb_channel_get_audio_pids_string (DVBChannel* self); guint dvb_channel_get_Sid (DVBChannel* self); -static char* dvb_terrestrial_channel_real_to_string (DVBChannel* base); -DVBChannel* dvb_channel_construct (GType object_type); 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); @@ -213,6 +216,18 @@ +DVBTerrestrialChannel* dvb_terrestrial_channel_construct_without_schedule (GType object_type) { + DVBTerrestrialChannel * self; + self = (DVBTerrestrialChannel*) dvb_channel_construct_without_schedule (object_type); + return self; +} + + +DVBTerrestrialChannel* dvb_terrestrial_channel_new_without_schedule (void) { + return dvb_terrestrial_channel_construct_without_schedule (DVB_TYPE_TERRESTRIAL_CHANNEL); +} + + static void dvb_terrestrial_channel_real_setup_dvb_source (DVBChannel* base, GstElement* source) { DVBTerrestrialChannel * self; self = (DVBTerrestrialChannel*) base; @@ -231,7 +246,7 @@ static char* dvb_terrestrial_channel_real_to_string (DVBChannel* base) { DVBTerrestrialChannel * self; - char* result; + char* result = NULL; char* _tmp0_; char* _tmp1_; self = (DVBTerrestrialChannel*) base; @@ -404,12 +419,14 @@ GType dvb_terrestrial_channel_get_type (void) { - static GType dvb_terrestrial_channel_type_id = 0; - if (dvb_terrestrial_channel_type_id == 0) { + static volatile gsize dvb_terrestrial_channel_type_id__volatile = 0; + if (g_once_init_enter (&dvb_terrestrial_channel_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBTerrestrialChannelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_terrestrial_channel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBTerrestrialChannel), 0, (GInstanceInitFunc) dvb_terrestrial_channel_instance_init, NULL }; + GType dvb_terrestrial_channel_type_id; dvb_terrestrial_channel_type_id = g_type_register_static (DVB_TYPE_CHANNEL, "DVBTerrestrialChannel", &g_define_type_info, 0); + g_once_init_leave (&dvb_terrestrial_channel_type_id__volatile, dvb_terrestrial_channel_type_id); } - return dvb_terrestrial_channel_type_id; + return dvb_terrestrial_channel_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialChannel.vala gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialChannel.vala --- gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialChannel.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialChannel.vala 2010-05-26 16:23:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -31,6 +31,10 @@ public DvbSrcTransmissionMode TransmissionMode {get; set;} public DvbSrcGuard GuardInterval {get; set;} public DvbSrcHierarchy Hierarchy {get; set;} + + public TerrestrialChannel.without_schedule () { + Channel.without_schedule (); + } public override void setup_dvb_source (Gst.Element source) { source.set ("modulation", this.Constellation); diff -Nru gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialScanner.c gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialScanner.c --- gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialScanner.c 2010-02-23 13:10:56.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialScanner.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,8 +1,8 @@ -/* TerrestrialScanner.c generated by valac, the Vala compiler +/* TerrestrialScanner.c generated by valac 0.9.7, the Vala compiler * generated from TerrestrialScanner.vala, do not modify */ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -26,10 +26,11 @@ #include #include #include +#include +#include +#include #include #include -#include -#include #define DVB_TYPE_ID_BUS_TERRESTRIAL_SCANNER (dvb_id_bus_terrestrial_scanner_get_type ()) @@ -39,6 +40,7 @@ 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; @@ -105,8 +107,6 @@ typedef struct _DVBDevice DVBDevice; typedef struct _DVBDeviceClass DVBDeviceClass; #define _gst_structure_free0(var) ((var == NULL) ? NULL : (var = (gst_structure_free (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define DVB_TYPE_DVB_SRC_BANDWIDTH (dvb_dvb_src_bandwidth_get_type ()) @@ -132,7 +132,7 @@ typedef struct _DVBTerrestrialChannelClass DVBTerrestrialChannelClass; #define DVB_TYPE_DVB_SRC_INVERSION (dvb_dvb_src_inversion_get_type ()) -typedef struct _DBusObjectVTable _DBusObjectVTable; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _DVBIDBusTerrestrialScannerIface { GTypeInterface parent_iface; @@ -144,6 +144,10 @@ gboolean (*AddScanningDataFromFile) (DVBIDBusTerrestrialScanner* self, const char* path, GError** error); }; +struct _DBusObjectVTable { + void (*register_object) (DBusConnection*, const char*, void*); +}; + struct _DVBIDBusTerrestrialScannerDBusProxy { DBusGProxy parent_instance; gboolean disposed; @@ -157,7 +161,6 @@ GQueue* frequencies; GstStructure* current_tuning_params; GeeHashSet* scanned_frequencies; - GeeHashMap* transport_streams; }; struct _DVBScannerClass { @@ -166,6 +169,7 @@ DVBScannedItem* (*get_scanned_item) (DVBScanner* self, const GstStructure* structure); DVBChannel* (*get_new_channel) (DVBScanner* self); void (*add_values_from_structure_to_channel) (DVBScanner* self, const GstStructure* delivery, DVBChannel* channel); + void (*add_scanning_data_from_string) (DVBScanner* self, const char* line); }; struct _DVBTerrestrialScanner { @@ -235,21 +239,20 @@ DVB_DVB_SRC_INVERSION_INVERSION_AUTO } DVBDvbSrcInversion; -struct _DBusObjectVTable { - void (*register_object) (DBusConnection*, const char*, void*); -}; - static gpointer dvb_terrestrial_scanner_parent_class = NULL; static DVBIDBusTerrestrialScannerIface* dvb_terrestrial_scanner_dvb_id_bus_terrestrial_scanner_parent_iface = NULL; -GType dvb_id_bus_terrestrial_scanner_get_type (void); +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 char* path, GError** error); gboolean dvb_id_bus_terrestrial_scanner_WriteChannelsToFile (DVBIDBusTerrestrialScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); void dvb_id_bus_terrestrial_scanner_AddScanningData (DVBIDBusTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const char* transmode, const char* code_rate_hp, const char* code_rate_lp, const char* constellation, guint guard, GError** error); gboolean dvb_id_bus_terrestrial_scanner_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* self, const char* path, 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_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); @@ -264,11 +267,12 @@ 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 char* name, const char* network, const char* type, gboolean scrambled, DBusConnection* _connection); -GType dvb_id_bus_terrestrial_scanner_dbus_proxy_get_type (void); -DVBIDBusTerrestrialScanner* dvb_id_bus_terrestrial_scanner_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path); +static void _dbus_dvb_id_bus_terrestrial_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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 @@ -282,44 +286,44 @@ static void dvb_id_bus_terrestrial_scanner_dbus_proxy_dvb_id_bus_terrestrial_scanner__interface_init (DVBIDBusTerrestrialScannerIface* iface); static void dvb_id_bus_terrestrial_scanner_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void 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); -GType dvb_scanned_item_get_type (void); -GType dvb_channel_get_type (void); -GType dvb_channel_list_get_type (void); -GType dvb_terrestrial_scanner_get_type (void); +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_terrestrial_scanner_get_type (void) G_GNUC_CONST; enum { DVB_TERRESTRIAL_SCANNER_DUMMY_PROPERTY }; -GType dvb_device_get_type (void); +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 inline void dvb_terrestrial_scanner_add_scanning_data (DVBTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const char* transmode, const char* code_rate_hp, const char* code_rate_lp, const char* constellation, guint guard); static void dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusTerrestrialScanner* base, guint frequency, guint hierarchy, guint bandwidth, const char* transmode, const char* code_rate_hp, const char* code_rate_lp, const char* constellation, guint guard, GError** error); +static inline void dvb_terrestrial_scanner_add_scanning_data (DVBTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const char* transmode, const char* code_rate_hp, const char* code_rate_lp, const char* constellation, guint guard); void dvb_scanner_add_structure_to_scan (DVBScanner* self, GstStructure* structure); -char* dvb_utils_read_file_contents (GFile* file, GError** error); -static gboolean dvb_terrestrial_scanner_real_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* base, const char* path, GError** error); +static void dvb_terrestrial_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line); +static void dvb_terrestrial_scanner_real_prepare (DVBScanner* base); void dvb_scanner_set_uint_property (GstElement* src, const GstStructure* params, const char* key); -GType dvb_dvb_src_bandwidth_get_type (void); +GType dvb_dvb_src_bandwidth_get_type (void) G_GNUC_CONST; DVBDvbSrcBandwidth dvb_get_bandwidth_val (guint bandwidth); -GType dvb_dvb_src_hierarchy_get_type (void); +GType dvb_dvb_src_hierarchy_get_type (void) G_GNUC_CONST; DVBDvbSrcHierarchy dvb_get_hierarchy_val (guint hierarchy); -GType dvb_dvb_src_modulation_get_type (void); +GType dvb_dvb_src_modulation_get_type (void) G_GNUC_CONST; DVBDvbSrcModulation dvb_get_modulation_val (const char* constellation); -GType dvb_dvb_src_code_rate_get_type (void); +GType dvb_dvb_src_code_rate_get_type (void) G_GNUC_CONST; DVBDvbSrcCodeRate dvb_get_code_rate_val (const char* code_rate_string); -GType dvb_dvb_src_guard_get_type (void); +GType dvb_dvb_src_guard_get_type (void) G_GNUC_CONST; DVBDvbSrcGuard dvb_get_guard_interval_val (guint guard); -GType dvb_dvb_src_transmission_mode_get_type (void); +GType dvb_dvb_src_transmission_mode_get_type (void) G_GNUC_CONST; DVBDvbSrcTransmissionMode dvb_get_transmission_mode_val (const char* transmode); -static void dvb_terrestrial_scanner_real_prepare (DVBScanner* base); +static DVBScannedItem* dvb_terrestrial_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); DVBScannedItem* dvb_scanned_item_new (guint frequency); DVBScannedItem* dvb_scanned_item_construct (GType object_type, guint frequency); -static DVBScannedItem* dvb_terrestrial_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure); -DVBTerrestrialChannel* dvb_terrestrial_channel_new (void); -DVBTerrestrialChannel* dvb_terrestrial_channel_construct (GType object_type); -GType dvb_terrestrial_channel_get_type (void); static DVBChannel* dvb_terrestrial_scanner_real_get_new_channel (DVBScanner* base); -GType dvb_dvb_src_inversion_get_type (void); +DVBTerrestrialChannel* dvb_terrestrial_channel_new_without_schedule (void); +DVBTerrestrialChannel* dvb_terrestrial_channel_construct_without_schedule (GType object_type); +GType dvb_terrestrial_channel_get_type (void) G_GNUC_CONST; +static void dvb_terrestrial_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); +GType dvb_dvb_src_inversion_get_type (void) G_GNUC_CONST; void dvb_terrestrial_channel_set_Inversion (DVBTerrestrialChannel* self, DVBDvbSrcInversion value); void dvb_channel_set_Frequency (DVBChannel* self, guint value); void dvb_terrestrial_channel_set_Bandwidth (DVBTerrestrialChannel* self, DVBDvbSrcBandwidth value); @@ -329,7 +333,6 @@ void dvb_terrestrial_channel_set_CodeRateLP (DVBTerrestrialChannel* self, DVBDvbSrcCodeRate value); void dvb_terrestrial_channel_set_GuardInterval (DVBTerrestrialChannel* self, DVBDvbSrcGuard value); void dvb_terrestrial_channel_set_TransmissionMode (DVBTerrestrialChannel* self, DVBDvbSrcTransmissionMode value); -static void dvb_terrestrial_scanner_real_add_values_from_structure_to_channel (DVBScanner* base, const GstStructure* delivery, DVBChannel* channel); 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); @@ -338,12 +341,11 @@ void dvb_scanner_Destroy (DVBScanner* self, GError** error); gboolean dvb_scanner_WriteAllChannelsToFile (DVBScanner* self, const char* path, GError** error); gboolean dvb_scanner_WriteChannelsToFile (DVBScanner* self, guint* channel_sids, int channel_sids_length1, const char* path, GError** error); +gboolean dvb_scanner_AddScanningDataFromFile (DVBScanner* self, const char* path, 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 gint _vala_array_length (gpointer array); static int _vala_strcmp0 (const char * str1, const char * str2); -static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object); -static void _vala_dbus_unregister_object (gpointer connection, GObject* object); 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}; @@ -352,6 +354,7 @@ 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); void dvb_id_bus_terrestrial_scanner_Run (DVBIDBusTerrestrialScanner* self, GError** error) { DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->Run (self, error); @@ -378,11 +381,36 @@ } +/** + * @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 char* path, GError** error) { return DVB_ID_BUS_TERRESTRIAL_SCANNER_GET_INTERFACE (self)->AddScanningDataFromFile (self, path, 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_terrestrial_scanner_dbus_unregister (DBusConnection* connection, void* _user_data_) { } @@ -396,7 +424,7 @@ 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"); + 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]); @@ -1416,6 +1444,24 @@ } +static void _dbus_dvb_id_bus_terrestrial_scanner_frontend_stats (GObject* _sender, double signal_strength, double 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)); @@ -1425,6 +1471,7 @@ 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); } @@ -1435,20 +1482,23 @@ 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 GType dvb_id_bus_terrestrial_scanner_type_id = 0; - if (dvb_id_bus_terrestrial_scanner_type_id == 0) { + 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; + return dvb_id_bus_terrestrial_scanner_type_id__volatile; } @@ -1481,20 +1531,20 @@ 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 _tmp26_; + dbus_uint32_t _tmp59_; guint freq_left = 0U; - dbus_uint32_t _tmp27_; + 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, &_tmp26_); + dbus_message_iter_get_basic (&iter, &_tmp59_); dbus_message_iter_next (&iter); - frequency = _tmp26_; - dbus_message_iter_get_basic (&iter, &_tmp27_); + frequency = _tmp59_; + dbus_message_iter_get_basic (&iter, &_tmp60_); dbus_message_iter_next (&iter); - freq_left = _tmp27_; + freq_left = _tmp60_; g_signal_emit_by_name (self, "frequency-scanned", frequency, freq_left); } @@ -1513,40 +1563,40 @@ 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 _tmp28_; + dbus_uint32_t _tmp61_; guint sid = 0U; - dbus_uint32_t _tmp29_; + dbus_uint32_t _tmp62_; char* name = NULL; - const char* _tmp30_; + const char* _tmp63_; char* network = NULL; - const char* _tmp31_; + const char* _tmp64_; char* type = NULL; - const char* _tmp32_; + const char* _tmp65_; gboolean scrambled = FALSE; - dbus_bool_t _tmp33_; + 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, &_tmp28_); + dbus_message_iter_get_basic (&iter, &_tmp61_); dbus_message_iter_next (&iter); - frequency = _tmp28_; - dbus_message_iter_get_basic (&iter, &_tmp29_); + frequency = _tmp61_; + dbus_message_iter_get_basic (&iter, &_tmp62_); dbus_message_iter_next (&iter); - sid = _tmp29_; - dbus_message_iter_get_basic (&iter, &_tmp30_); + sid = _tmp62_; + dbus_message_iter_get_basic (&iter, &_tmp63_); dbus_message_iter_next (&iter); - name = g_strdup (_tmp30_); - dbus_message_iter_get_basic (&iter, &_tmp31_); + name = g_strdup (_tmp63_); + dbus_message_iter_get_basic (&iter, &_tmp64_); dbus_message_iter_next (&iter); - network = g_strdup (_tmp31_); - dbus_message_iter_get_basic (&iter, &_tmp32_); + network = g_strdup (_tmp64_); + dbus_message_iter_get_basic (&iter, &_tmp65_); dbus_message_iter_next (&iter); - type = g_strdup (_tmp32_); - dbus_message_iter_get_basic (&iter, &_tmp33_); + type = g_strdup (_tmp65_); + dbus_message_iter_get_basic (&iter, &_tmp66_); dbus_message_iter_next (&iter); - scrambled = _tmp33_; + scrambled = _tmp66_; g_signal_emit_by_name (self, "channel-added", frequency, sid, name, network, type, scrambled); _g_free0 (name); _g_free0 (network); @@ -1554,6 +1604,27 @@ } +static void _dbus_handle_dvb_id_bus_terrestrial_scanner_frontend_stats (DVBIDBusTerrestrialScanner* self, DBusConnection* connection, DBusMessage* message) { + DBusMessageIter iter; + double signal_strength = 0.0; + double _tmp67_; + double 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")) { @@ -1562,6 +1633,8 @@ _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; @@ -1598,7 +1671,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1612,78 +1685,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp34_; + const char* _tmp69_; _edomain = DBUS_GERROR; - _tmp34_ = _dbus_error.name + 27; - if (strcmp (_tmp34_, "Failed") == 0) { + _tmp69_ = _dbus_error.name + 27; + if (strcmp (_tmp69_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp34_, "NoMemory") == 0) { + } else if (strcmp (_tmp69_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp34_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp69_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp34_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp69_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp34_, "NoReply") == 0) { + } else if (strcmp (_tmp69_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp34_, "IOError") == 0) { + } else if (strcmp (_tmp69_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp34_, "BadAddress") == 0) { + } else if (strcmp (_tmp69_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp34_, "NotSupported") == 0) { + } else if (strcmp (_tmp69_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp34_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp69_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp34_, "AccessDenied") == 0) { + } else if (strcmp (_tmp69_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp34_, "AuthFailed") == 0) { + } else if (strcmp (_tmp69_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp34_, "NoServer") == 0) { + } else if (strcmp (_tmp69_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp34_, "Timeout") == 0) { + } else if (strcmp (_tmp69_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp34_, "NoNetwork") == 0) { + } else if (strcmp (_tmp69_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp34_, "AddressInUse") == 0) { + } else if (strcmp (_tmp69_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp34_, "Disconnected") == 0) { + } else if (strcmp (_tmp69_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp34_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp69_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp34_, "FileNotFound") == 0) { + } else if (strcmp (_tmp69_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp34_, "FileExists") == 0) { + } else if (strcmp (_tmp69_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp34_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp69_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp34_, "TimedOut") == 0) { + } else if (strcmp (_tmp69_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp34_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp69_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp34_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp69_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp34_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp69_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp69_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp34_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp69_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp34_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp69_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp34_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp69_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp34_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp69_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp34_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp69_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp34_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp69_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp34_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp69_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp34_, "RemoteException") == 0) { + } else if (strcmp (_tmp69_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1703,7 +1776,7 @@ DBusMessage *_message, *_reply; DBusMessageIter _iter; if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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"); @@ -1717,78 +1790,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp35_; + const char* _tmp70_; _edomain = DBUS_GERROR; - _tmp35_ = _dbus_error.name + 27; - if (strcmp (_tmp35_, "Failed") == 0) { + _tmp70_ = _dbus_error.name + 27; + if (strcmp (_tmp70_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp35_, "NoMemory") == 0) { + } else if (strcmp (_tmp70_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp35_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp70_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp35_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp70_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp35_, "NoReply") == 0) { + } else if (strcmp (_tmp70_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp35_, "IOError") == 0) { + } else if (strcmp (_tmp70_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp35_, "BadAddress") == 0) { + } else if (strcmp (_tmp70_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp35_, "NotSupported") == 0) { + } else if (strcmp (_tmp70_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp35_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp70_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp35_, "AccessDenied") == 0) { + } else if (strcmp (_tmp70_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp35_, "AuthFailed") == 0) { + } else if (strcmp (_tmp70_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp35_, "NoServer") == 0) { + } else if (strcmp (_tmp70_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp35_, "Timeout") == 0) { + } else if (strcmp (_tmp70_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp35_, "NoNetwork") == 0) { + } else if (strcmp (_tmp70_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp35_, "AddressInUse") == 0) { + } else if (strcmp (_tmp70_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp35_, "Disconnected") == 0) { + } else if (strcmp (_tmp70_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp35_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp70_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp35_, "FileNotFound") == 0) { + } else if (strcmp (_tmp70_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp35_, "FileExists") == 0) { + } else if (strcmp (_tmp70_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp35_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp70_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp35_, "TimedOut") == 0) { + } else if (strcmp (_tmp70_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp35_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp70_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp35_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp70_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp35_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp70_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp35_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp70_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp35_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp70_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp35_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp70_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp35_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp70_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp35_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp70_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp35_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp70_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp35_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp70_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp35_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp70_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp35_, "RemoteException") == 0) { + } else if (strcmp (_tmp70_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -1807,17 +1880,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp36_; + const char* _tmp71_; gboolean _result; - dbus_bool_t _tmp37_; + dbus_bool_t _tmp72_; if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp36_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp36_); + _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); @@ -1827,78 +1900,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp38_; + const char* _tmp73_; _edomain = DBUS_GERROR; - _tmp38_ = _dbus_error.name + 27; - if (strcmp (_tmp38_, "Failed") == 0) { + _tmp73_ = _dbus_error.name + 27; + if (strcmp (_tmp73_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp38_, "NoMemory") == 0) { + } else if (strcmp (_tmp73_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp38_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp73_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp38_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp73_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp38_, "NoReply") == 0) { + } else if (strcmp (_tmp73_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp38_, "IOError") == 0) { + } else if (strcmp (_tmp73_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp38_, "BadAddress") == 0) { + } else if (strcmp (_tmp73_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp38_, "NotSupported") == 0) { + } else if (strcmp (_tmp73_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp38_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp73_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp38_, "AccessDenied") == 0) { + } else if (strcmp (_tmp73_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp38_, "AuthFailed") == 0) { + } else if (strcmp (_tmp73_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp38_, "NoServer") == 0) { + } else if (strcmp (_tmp73_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp38_, "Timeout") == 0) { + } else if (strcmp (_tmp73_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp38_, "NoNetwork") == 0) { + } else if (strcmp (_tmp73_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp38_, "AddressInUse") == 0) { + } else if (strcmp (_tmp73_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp38_, "Disconnected") == 0) { + } else if (strcmp (_tmp73_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp38_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp73_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp38_, "FileNotFound") == 0) { + } else if (strcmp (_tmp73_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp38_, "FileExists") == 0) { + } else if (strcmp (_tmp73_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp38_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp73_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp38_, "TimedOut") == 0) { + } else if (strcmp (_tmp73_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp38_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp73_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp38_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp73_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp38_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp73_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp38_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp73_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp38_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp73_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp38_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp73_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp38_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp73_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp38_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp73_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp38_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp73_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp38_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp73_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp38_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp73_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp38_, "RemoteException") == 0) { + } else if (strcmp (_tmp73_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -1908,9 +1981,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp37_); + dbus_message_iter_get_basic (&_iter, &_tmp72_); dbus_message_iter_next (&_iter); - _result = _tmp37_; + _result = _tmp72_; dbus_message_unref (_reply); return _result; } @@ -1921,29 +1994,29 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - guint* _tmp39_; - DBusMessageIter _tmp40_; - int _tmp41_; - const char* _tmp43_; + guint* _tmp74_; + DBusMessageIter _tmp75_; + int _tmp76_; + const char* _tmp78_; gboolean _result; - dbus_bool_t _tmp44_; + dbus_bool_t _tmp79_; if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp39_ = channel_sids; - dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "u", &_tmp40_); - for (_tmp41_ = 0; _tmp41_ < channel_sids_length1; _tmp41_++) { - dbus_uint32_t _tmp42_; - _tmp42_ = *_tmp39_; - dbus_message_iter_append_basic (&_tmp40_, DBUS_TYPE_UINT32, &_tmp42_); - _tmp39_++; - } - dbus_message_iter_close_container (&_iter, &_tmp40_); - _tmp43_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp43_); + _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); @@ -1953,78 +2026,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp45_; + const char* _tmp80_; _edomain = DBUS_GERROR; - _tmp45_ = _dbus_error.name + 27; - if (strcmp (_tmp45_, "Failed") == 0) { + _tmp80_ = _dbus_error.name + 27; + if (strcmp (_tmp80_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp45_, "NoMemory") == 0) { + } else if (strcmp (_tmp80_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp45_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp80_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp45_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp80_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp45_, "NoReply") == 0) { + } else if (strcmp (_tmp80_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp45_, "IOError") == 0) { + } else if (strcmp (_tmp80_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp45_, "BadAddress") == 0) { + } else if (strcmp (_tmp80_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp45_, "NotSupported") == 0) { + } else if (strcmp (_tmp80_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp45_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp80_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp45_, "AccessDenied") == 0) { + } else if (strcmp (_tmp80_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp45_, "AuthFailed") == 0) { + } else if (strcmp (_tmp80_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp45_, "NoServer") == 0) { + } else if (strcmp (_tmp80_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp45_, "Timeout") == 0) { + } else if (strcmp (_tmp80_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp45_, "NoNetwork") == 0) { + } else if (strcmp (_tmp80_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp45_, "AddressInUse") == 0) { + } else if (strcmp (_tmp80_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp45_, "Disconnected") == 0) { + } else if (strcmp (_tmp80_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp45_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp80_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp45_, "FileNotFound") == 0) { + } else if (strcmp (_tmp80_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp45_, "FileExists") == 0) { + } else if (strcmp (_tmp80_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp45_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp80_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp45_, "TimedOut") == 0) { + } else if (strcmp (_tmp80_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp45_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp80_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp45_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp80_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp45_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp80_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp45_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp80_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp45_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp80_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp45_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp80_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp45_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp80_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp45_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp80_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp45_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp80_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp45_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp80_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp45_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp80_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp45_, "RemoteException") == 0) { + } else if (strcmp (_tmp80_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2034,9 +2107,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp44_); + dbus_message_iter_get_basic (&_iter, &_tmp79_); dbus_message_iter_next (&_iter); - _result = _tmp44_; + _result = _tmp79_; dbus_message_unref (_reply); return _result; } @@ -2047,36 +2120,36 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - dbus_uint32_t _tmp46_; - dbus_uint32_t _tmp47_; - dbus_uint32_t _tmp48_; - const char* _tmp49_; - const char* _tmp50_; - const char* _tmp51_; - const char* _tmp52_; - dbus_uint32_t _tmp53_; + 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_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp46_ = frequency; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp46_); - _tmp47_ = hierarchy; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp47_); - _tmp48_ = bandwidth; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp48_); - _tmp49_ = transmode; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp49_); - _tmp50_ = code_rate_hp; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp50_); - _tmp51_ = code_rate_lp; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp51_); - _tmp52_ = constellation; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp52_); - _tmp53_ = guard; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_UINT32, &_tmp53_); + _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); @@ -2086,78 +2159,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp54_; + const char* _tmp89_; _edomain = DBUS_GERROR; - _tmp54_ = _dbus_error.name + 27; - if (strcmp (_tmp54_, "Failed") == 0) { + _tmp89_ = _dbus_error.name + 27; + if (strcmp (_tmp89_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp54_, "NoMemory") == 0) { + } else if (strcmp (_tmp89_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp54_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp89_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp54_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp89_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp54_, "NoReply") == 0) { + } else if (strcmp (_tmp89_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp54_, "IOError") == 0) { + } else if (strcmp (_tmp89_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp54_, "BadAddress") == 0) { + } else if (strcmp (_tmp89_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp54_, "NotSupported") == 0) { + } else if (strcmp (_tmp89_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp54_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp89_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp54_, "AccessDenied") == 0) { + } else if (strcmp (_tmp89_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp54_, "AuthFailed") == 0) { + } else if (strcmp (_tmp89_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp54_, "NoServer") == 0) { + } else if (strcmp (_tmp89_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp54_, "Timeout") == 0) { + } else if (strcmp (_tmp89_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp54_, "NoNetwork") == 0) { + } else if (strcmp (_tmp89_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp54_, "AddressInUse") == 0) { + } else if (strcmp (_tmp89_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp54_, "Disconnected") == 0) { + } else if (strcmp (_tmp89_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp54_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp89_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp54_, "FileNotFound") == 0) { + } else if (strcmp (_tmp89_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp54_, "FileExists") == 0) { + } else if (strcmp (_tmp89_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp54_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp89_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp54_, "TimedOut") == 0) { + } else if (strcmp (_tmp89_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp54_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp89_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp54_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp89_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp54_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp89_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp54_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp89_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp54_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp89_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp54_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp89_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp54_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp89_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp54_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp89_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp54_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp89_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp54_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp89_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp54_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp89_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp54_, "RemoteException") == 0) { + } else if (strcmp (_tmp89_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return; } @@ -2176,17 +2249,17 @@ DBusGConnection *_connection; DBusMessage *_message, *_reply; DBusMessageIter _iter; - const char* _tmp55_; + const char* _tmp90_; gboolean _result; - dbus_bool_t _tmp56_; + dbus_bool_t _tmp91_; if (((DVBIDBusTerrestrialScannerDBusProxy*) self)->disposed) { - g_set_error_literal (error, DBUS_GERROR, DBUS_GERROR_DISCONNECTED, "Connection is closed"); + 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); - _tmp55_ = path; - dbus_message_iter_append_basic (&_iter, DBUS_TYPE_STRING, &_tmp55_); + _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); @@ -2196,78 +2269,78 @@ GQuark _edomain; gint _ecode; if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) { - const char* _tmp57_; + const char* _tmp92_; _edomain = DBUS_GERROR; - _tmp57_ = _dbus_error.name + 27; - if (strcmp (_tmp57_, "Failed") == 0) { + _tmp92_ = _dbus_error.name + 27; + if (strcmp (_tmp92_, "Failed") == 0) { _ecode = DBUS_GERROR_FAILED; - } else if (strcmp (_tmp57_, "NoMemory") == 0) { + } else if (strcmp (_tmp92_, "NoMemory") == 0) { _ecode = DBUS_GERROR_NO_MEMORY; - } else if (strcmp (_tmp57_, "ServiceUnknown") == 0) { + } else if (strcmp (_tmp92_, "ServiceUnknown") == 0) { _ecode = DBUS_GERROR_SERVICE_UNKNOWN; - } else if (strcmp (_tmp57_, "NameHasNoOwner") == 0) { + } else if (strcmp (_tmp92_, "NameHasNoOwner") == 0) { _ecode = DBUS_GERROR_NAME_HAS_NO_OWNER; - } else if (strcmp (_tmp57_, "NoReply") == 0) { + } else if (strcmp (_tmp92_, "NoReply") == 0) { _ecode = DBUS_GERROR_NO_REPLY; - } else if (strcmp (_tmp57_, "IOError") == 0) { + } else if (strcmp (_tmp92_, "IOError") == 0) { _ecode = DBUS_GERROR_IO_ERROR; - } else if (strcmp (_tmp57_, "BadAddress") == 0) { + } else if (strcmp (_tmp92_, "BadAddress") == 0) { _ecode = DBUS_GERROR_BAD_ADDRESS; - } else if (strcmp (_tmp57_, "NotSupported") == 0) { + } else if (strcmp (_tmp92_, "NotSupported") == 0) { _ecode = DBUS_GERROR_NOT_SUPPORTED; - } else if (strcmp (_tmp57_, "LimitsExceeded") == 0) { + } else if (strcmp (_tmp92_, "LimitsExceeded") == 0) { _ecode = DBUS_GERROR_LIMITS_EXCEEDED; - } else if (strcmp (_tmp57_, "AccessDenied") == 0) { + } else if (strcmp (_tmp92_, "AccessDenied") == 0) { _ecode = DBUS_GERROR_ACCESS_DENIED; - } else if (strcmp (_tmp57_, "AuthFailed") == 0) { + } else if (strcmp (_tmp92_, "AuthFailed") == 0) { _ecode = DBUS_GERROR_AUTH_FAILED; - } else if (strcmp (_tmp57_, "NoServer") == 0) { + } else if (strcmp (_tmp92_, "NoServer") == 0) { _ecode = DBUS_GERROR_NO_SERVER; - } else if (strcmp (_tmp57_, "Timeout") == 0) { + } else if (strcmp (_tmp92_, "Timeout") == 0) { _ecode = DBUS_GERROR_TIMEOUT; - } else if (strcmp (_tmp57_, "NoNetwork") == 0) { + } else if (strcmp (_tmp92_, "NoNetwork") == 0) { _ecode = DBUS_GERROR_NO_NETWORK; - } else if (strcmp (_tmp57_, "AddressInUse") == 0) { + } else if (strcmp (_tmp92_, "AddressInUse") == 0) { _ecode = DBUS_GERROR_ADDRESS_IN_USE; - } else if (strcmp (_tmp57_, "Disconnected") == 0) { + } else if (strcmp (_tmp92_, "Disconnected") == 0) { _ecode = DBUS_GERROR_DISCONNECTED; - } else if (strcmp (_tmp57_, "InvalidArgs") == 0) { + } else if (strcmp (_tmp92_, "InvalidArgs") == 0) { _ecode = DBUS_GERROR_INVALID_ARGS; - } else if (strcmp (_tmp57_, "FileNotFound") == 0) { + } else if (strcmp (_tmp92_, "FileNotFound") == 0) { _ecode = DBUS_GERROR_FILE_NOT_FOUND; - } else if (strcmp (_tmp57_, "FileExists") == 0) { + } else if (strcmp (_tmp92_, "FileExists") == 0) { _ecode = DBUS_GERROR_FILE_EXISTS; - } else if (strcmp (_tmp57_, "UnknownMethod") == 0) { + } else if (strcmp (_tmp92_, "UnknownMethod") == 0) { _ecode = DBUS_GERROR_UNKNOWN_METHOD; - } else if (strcmp (_tmp57_, "TimedOut") == 0) { + } else if (strcmp (_tmp92_, "TimedOut") == 0) { _ecode = DBUS_GERROR_TIMED_OUT; - } else if (strcmp (_tmp57_, "MatchRuleNotFound") == 0) { + } else if (strcmp (_tmp92_, "MatchRuleNotFound") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_NOT_FOUND; - } else if (strcmp (_tmp57_, "MatchRuleInvalid") == 0) { + } else if (strcmp (_tmp92_, "MatchRuleInvalid") == 0) { _ecode = DBUS_GERROR_MATCH_RULE_INVALID; - } else if (strcmp (_tmp57_, "Spawn.ExecFailed") == 0) { + } else if (strcmp (_tmp92_, "Spawn.ExecFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_EXEC_FAILED; - } else if (strcmp (_tmp57_, "Spawn.ForkFailed") == 0) { + } else if (strcmp (_tmp92_, "Spawn.ForkFailed") == 0) { _ecode = DBUS_GERROR_SPAWN_FORK_FAILED; - } else if (strcmp (_tmp57_, "Spawn.ChildExited") == 0) { + } else if (strcmp (_tmp92_, "Spawn.ChildExited") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_EXITED; - } else if (strcmp (_tmp57_, "Spawn.ChildSignaled") == 0) { + } else if (strcmp (_tmp92_, "Spawn.ChildSignaled") == 0) { _ecode = DBUS_GERROR_SPAWN_CHILD_SIGNALED; - } else if (strcmp (_tmp57_, "Spawn.Failed") == 0) { + } else if (strcmp (_tmp92_, "Spawn.Failed") == 0) { _ecode = DBUS_GERROR_SPAWN_FAILED; - } else if (strcmp (_tmp57_, "UnixProcessIdUnknown") == 0) { + } else if (strcmp (_tmp92_, "UnixProcessIdUnknown") == 0) { _ecode = DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN; - } else if (strcmp (_tmp57_, "InvalidSignature") == 0) { + } else if (strcmp (_tmp92_, "InvalidSignature") == 0) { _ecode = DBUS_GERROR_INVALID_SIGNATURE; - } else if (strcmp (_tmp57_, "InvalidFileContent") == 0) { + } else if (strcmp (_tmp92_, "InvalidFileContent") == 0) { _ecode = DBUS_GERROR_INVALID_FILE_CONTENT; - } else if (strcmp (_tmp57_, "SELinuxSecurityContextUnknown") == 0) { + } else if (strcmp (_tmp92_, "SELinuxSecurityContextUnknown") == 0) { _ecode = DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN; - } else if (strcmp (_tmp57_, "RemoteException") == 0) { + } else if (strcmp (_tmp92_, "RemoteException") == 0) { _ecode = DBUS_GERROR_REMOTE_EXCEPTION; } } - g_set_error_literal (error, _edomain, _ecode, _dbus_error.message); + g_set_error (error, _edomain, _ecode, "%s", _dbus_error.message); dbus_error_free (&_dbus_error); return FALSE; } @@ -2277,9 +2350,9 @@ return FALSE; } dbus_message_iter_init (_reply, &_iter); - dbus_message_iter_get_basic (&_iter, &_tmp56_); + dbus_message_iter_get_basic (&_iter, &_tmp91_); dbus_message_iter_next (&_iter); - _result = _tmp56_; + _result = _tmp91_; dbus_message_unref (_reply); return _result; } @@ -2316,6 +2389,9 @@ } +/** + * See enums in MpegTsEnums + */ static void dvb_terrestrial_scanner_real_AddScanningData (DVBIDBusTerrestrialScanner* base, guint frequency, guint hierarchy, guint bandwidth, const char* transmode, const char* code_rate_hp, const char* code_rate_lp, const char* constellation, guint guard, GError** error) { DVBTerrestrialScanner * self; self = (DVBTerrestrialScanner*) base; @@ -2345,163 +2421,76 @@ } -static char* string_chug (const char* self) { - char* result; - char* _result_; - g_return_val_if_fail (self != NULL, NULL); - _result_ = g_strdup (self); - g_strchug (_result_); - result = _result_; - return result; -} - - -static gboolean dvb_terrestrial_scanner_real_AddScanningDataFromFile (DVBIDBusTerrestrialScanner* base, const char* path, GError** error) { +static void dvb_terrestrial_scanner_real_add_scanning_data_from_string (DVBScanner* base, const char* line) { DVBTerrestrialScanner * self; - gboolean result; - GError * _inner_error_; - GFile* datafile; - char* contents; + gint cols_length1; + gint _cols_size_; + char** _tmp1_; + char** _tmp0_; + char** cols; + gint cols_length; + guint freq; + guint hierarchy; + char** _tmp2_; + char** _tmp3_; + gint _tmp3__length1; + char* _tmp4_; + char* bandwidth_str; + guint bandwidth; + char* transmode; + char* code_rate_hp; + char* code_rate_lp; + char* constellation; + char** _tmp5_; + char** _tmp6_; + gint _tmp6__length1; + char* _tmp7_; + char* guard_str; + guint guard; self = (DVBTerrestrialScanner*) base; - g_return_val_if_fail (path != NULL, FALSE); - _inner_error_ = NULL; - datafile = g_file_new_for_path (path); - g_debug ("TerrestrialScanner.vala:95: Reading scanning data from %s", path); - contents = NULL; - { - char* _tmp0_; - char* _tmp1_; - _tmp0_ = dvb_utils_read_file_contents (datafile, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch2_g_error; + g_return_if_fail (line != NULL); + cols = (_tmp1_ = _tmp0_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp0_), _cols_size_ = cols_length1, _tmp1_); + cols_length = 0; + while (TRUE) { + if (!(cols[cols_length] != NULL)) { + break; } - contents = (_tmp1_ = _tmp0_, _g_free0 (contents), _tmp1_); + cols_length++; } - goto __finally2; - __catch2_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("TerrestrialScanner.vala:101: Could not read %s: %s", e->message, path); - _g_error_free0 (e); - } + cols_length++; + if (cols_length < 9) { + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); + return; } - __finally2: - if (_inner_error_ != NULL) { - if (_inner_error_->domain == DBUS_GERROR) { - g_propagate_error (error, _inner_error_); - _g_object_unref0 (datafile); - _g_free0 (contents); - return FALSE; + freq = (guint) atoi (cols[1]); + hierarchy = (guint) 0; + if (_vala_strcmp0 (cols[8], "1") == 0) { + hierarchy = (guint) 1; + } else { + if (_vala_strcmp0 (cols[8], "2") == 0) { + hierarchy = (guint) 2; } else { - _g_object_unref0 (datafile); - _g_free0 (contents); - 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 (contents == NULL) { - result = FALSE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; - } - { - char** _tmp2_; - char** line_collection; - int line_collection_length1; - int line_it; - line_collection = _tmp2_ = g_strsplit (contents, "\n", 0); - line_collection_length1 = _vala_array_length (_tmp2_); - for (line_it = 0; line_it < _vala_array_length (_tmp2_); line_it = line_it + 1) { - char* line; - line = g_strdup (line_collection[line_it]); - { - char* _tmp3_; - char** _tmp5_; - gint cols_size; - gint cols_length1; - char** _tmp4_; - char** cols; - gint cols_length; - guint freq; - guint hierarchy; - gint _tmp7__length1; - char** _tmp7_; - char** _tmp6_; - char* _tmp8_; - char* bandwidth_str; - guint bandwidth; - char* transmode; - char* code_rate_hp; - char* code_rate_lp; - char* constellation; - gint _tmp10__length1; - char** _tmp10_; - char** _tmp9_; - char* _tmp11_; - char* guard_str; - guint guard; - line = (_tmp3_ = string_chug (line), _g_free0 (line), _tmp3_); - if (g_str_has_prefix (line, "#")) { - _g_free0 (line); - continue; - } - cols = (_tmp5_ = _tmp4_ = g_regex_split_simple ("\\s+", line, 0, 0), cols_length1 = _vala_array_length (_tmp4_), cols_size = cols_length1, _tmp5_); - cols_length = 0; - while (TRUE) { - if (!(cols[cols_length] != NULL)) { - break; - } - cols_length++; - } - cols_length++; - if (cols_length < 9) { - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - continue; - } - freq = (guint) atoi (cols[1]); - hierarchy = (guint) 0; - if (_vala_strcmp0 (cols[8], "1") == 0) { - hierarchy = (guint) 1; - } else { - if (_vala_strcmp0 (cols[8], "2") == 0) { - hierarchy = (guint) 2; - } else { - if (_vala_strcmp0 (cols[8], "4") == 0) { - hierarchy = (guint) 3; - } - } - } - bandwidth_str = (_tmp8_ = g_strdup ((_tmp7_ = _tmp6_ = g_strsplit (cols[2], "MHz", 0), _tmp7__length1 = _vala_array_length (_tmp6_), _tmp7_)[0]), _tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL), _tmp8_); - bandwidth = (guint) atoi (bandwidth_str); - transmode = g_strdup (cols[6]); - code_rate_hp = g_strdup (cols[3]); - code_rate_lp = g_strdup (cols[4]); - constellation = g_strdup (cols[5]); - guard_str = (_tmp11_ = g_strdup ((_tmp10_ = _tmp9_ = g_strsplit (cols[7], "/", 0), _tmp10__length1 = _vala_array_length (_tmp9_), _tmp10_)[1]), _tmp10_ = (_vala_array_free (_tmp10_, _tmp10__length1, (GDestroyNotify) g_free), NULL), _tmp11_); - guard = (guint) atoi (guard_str); - dvb_terrestrial_scanner_add_scanning_data (self, freq, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard); - _g_free0 (line); - cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); - _g_free0 (bandwidth_str); - _g_free0 (transmode); - _g_free0 (code_rate_hp); - _g_free0 (code_rate_lp); - _g_free0 (constellation); - _g_free0 (guard_str); + if (_vala_strcmp0 (cols[8], "4") == 0) { + hierarchy = (guint) 3; } } - line_collection = (_vala_array_free (line_collection, line_collection_length1, (GDestroyNotify) g_free), NULL); } - result = TRUE; - _g_object_unref0 (datafile); - _g_free0 (contents); - return result; + bandwidth_str = (_tmp4_ = g_strdup ((_tmp3_ = _tmp2_ = g_strsplit (cols[2], "MHz", 0), _tmp3__length1 = _vala_array_length (_tmp2_), _tmp3_)[0]), _tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL), _tmp4_); + bandwidth = (guint) atoi (bandwidth_str); + transmode = g_strdup (cols[6]); + code_rate_hp = g_strdup (cols[3]); + code_rate_lp = g_strdup (cols[4]); + constellation = g_strdup (cols[5]); + guard_str = (_tmp7_ = g_strdup ((_tmp6_ = _tmp5_ = g_strsplit (cols[7], "/", 0), _tmp6__length1 = _vala_array_length (_tmp5_), _tmp6_)[1]), _tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL), _tmp7_); + guard = (guint) atoi (guard_str); + dvb_terrestrial_scanner_add_scanning_data (self, freq, hierarchy, bandwidth, transmode, code_rate_hp, code_rate_lp, constellation, guard); + _g_free0 (guard_str); + _g_free0 (constellation); + _g_free0 (code_rate_lp); + _g_free0 (code_rate_hp); + _g_free0 (transmode); + _g_free0 (bandwidth_str); + cols = (_vala_array_free (cols, cols_length1, (GDestroyNotify) g_free), NULL); } @@ -2514,7 +2503,7 @@ guint guard = 0U; char* transmode; self = (DVBTerrestrialScanner*) base; - g_debug ("TerrestrialScanner.vala:153: Setting up pipeline for DVB-T scan"); + g_debug ("TerrestrialScanner.vala:136: Setting up pipeline for DVB-T scan"); dvbsrc = gst_bin_get_by_name (GST_BIN (DVB_SCANNER (self)->pipeline), "dvbsrc"); dvb_scanner_set_uint_property (dvbsrc, DVB_SCANNER (self)->current_tuning_params, "frequency"); gst_structure_get_uint (((DVBScanner*) self)->current_tuning_params, "bandwidth", &bandwidth); @@ -2529,15 +2518,15 @@ g_object_set ((GObject*) dvbsrc, "guard", dvb_get_guard_interval_val (guard), NULL); transmode = g_strdup (gst_structure_get_string (((DVBScanner*) self)->current_tuning_params, "transmission-mode")); g_object_set ((GObject*) dvbsrc, "trans-mode", dvb_get_transmission_mode_val (transmode), NULL); - _gst_object_unref0 (dvbsrc); - _g_free0 (constellation); _g_free0 (transmode); + _g_free0 (constellation); + _gst_object_unref0 (dvbsrc); } static DVBScannedItem* dvb_terrestrial_scanner_real_get_scanned_item (DVBScanner* base, const GstStructure* structure) { DVBTerrestrialScanner * self; - DVBScannedItem* result; + DVBScannedItem* result = NULL; guint freq = 0U; self = (DVBTerrestrialScanner*) base; g_return_val_if_fail (structure != NULL, NULL); @@ -2549,9 +2538,9 @@ static DVBChannel* dvb_terrestrial_scanner_real_get_new_channel (DVBScanner* base) { DVBTerrestrialScanner * self; - DVBChannel* result; + DVBChannel* result = NULL; self = (DVBTerrestrialScanner*) base; - result = (DVBChannel*) dvb_terrestrial_channel_new (); + result = (DVBChannel*) dvb_terrestrial_channel_new_without_schedule (); return result; } @@ -2592,9 +2581,9 @@ dvb_terrestrial_channel_set_GuardInterval (tc, dvb_get_guard_interval_val (guard)); transmode = g_strdup (gst_structure_get_string (delivery, "transmission-mode")); dvb_terrestrial_channel_set_TransmissionMode (tc, dvb_get_transmission_mode_val (transmode)); - _g_object_unref0 (tc); - _g_free0 (constellation); _g_free0 (transmode); + _g_free0 (constellation); + _g_object_unref0 (tc); } @@ -2611,7 +2600,7 @@ 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"); + 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]); @@ -2658,6 +2647,7 @@ static void dvb_terrestrial_scanner_class_init (DVBTerrestrialScannerClass * klass) { dvb_terrestrial_scanner_parent_class = g_type_class_peek_parent (klass); + DVB_SCANNER_CLASS (klass)->add_scanning_data_from_string = dvb_terrestrial_scanner_real_add_scanning_data_from_string; DVB_SCANNER_CLASS (klass)->prepare = dvb_terrestrial_scanner_real_prepare; 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; @@ -2669,11 +2659,11 @@ 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 = dvb_terrestrial_scanner_real_AddScanningData; - iface->AddScanningDataFromFile = dvb_terrestrial_scanner_real_AddScanningDataFromFile; iface->Run = (void (*)(DVBIDBusTerrestrialScanner* ,GError**)) dvb_scanner_Run; iface->Destroy = (void (*)(DVBIDBusTerrestrialScanner* ,GError**)) dvb_scanner_Destroy; iface->WriteAllChannelsToFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,const char* ,GError**)) dvb_scanner_WriteAllChannelsToFile; iface->WriteChannelsToFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,guint* ,int ,const char* ,GError**)) dvb_scanner_WriteChannelsToFile; + iface->AddScanningDataFromFile = (gboolean (*)(DVBIDBusTerrestrialScanner* ,const char* ,GError**)) dvb_scanner_AddScanningDataFromFile; } @@ -2682,14 +2672,16 @@ GType dvb_terrestrial_scanner_get_type (void) { - static GType dvb_terrestrial_scanner_type_id = 0; - if (dvb_terrestrial_scanner_type_id == 0) { + 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}; + 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_once_init_leave (&dvb_terrestrial_scanner_type_id__volatile, dvb_terrestrial_scanner_type_id); } - return dvb_terrestrial_scanner_type_id; + return dvb_terrestrial_scanner_type_id__volatile; } @@ -2734,25 +2726,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); -} - - 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); @@ -2792,4 +2765,23 @@ } +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, double arg_1, double 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); +} + + diff -Nru gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialScanner.vala gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialScanner.vala --- gnome-dvb-daemon-0.1.16/src/Terrestrial/TerrestrialScanner.vala 2009-11-14 14:15:39.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Terrestrial/TerrestrialScanner.vala 2010-06-13 11:05:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008,2009 Sebastian Pölsterl + * Copyright (C) 2008-2010 Sebastian Pölsterl * * This file is part of GNOME DVB Daemon. * @@ -28,6 +28,8 @@ 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; @@ -89,64 +91,45 @@ base.add_structure_to_scan (tuning_params); } - public bool AddScanningDataFromFile (string path) throws DBus.Error { - File datafile = File.new_for_path(path); + protected override void add_scanning_data_from_string (string line) { + // line looks like: + // T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy + + string[] cols = Regex.split_simple ("\\s+", line); - debug ("Reading scanning data from %s", path); + int cols_length = 0; + while (cols[cols_length] != null) + cols_length++; + cols_length++; - string? contents = null; - try { - contents = Utils.read_file_contents (datafile); - } catch (Error e) { - critical ("Could not read %s: %s", e.message, path); + if (cols_length < 9) { + return; } - if (contents == null) return false; + uint freq = (uint)cols[1].to_int (); - // line looks like: - // T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy - foreach (string line in contents.split("\n")) { - line = line.chug (); - if (line.has_prefix ("#")) continue; - - string[] cols = Regex.split_simple ("\\s+", line); - - int cols_length = 0; - while (cols[cols_length] != null) - cols_length++; - cols_length++; - - if (cols_length < 9) { - continue; - } - - uint freq = (uint)cols[1].to_int (); - - uint hierarchy = 0; - if (cols[8] == "1") { - hierarchy = 1; - } else if (cols[8] == "2") { - hierarchy = 2; - } else if (cols[8] == "4") { - hierarchy = 3; - } - - string bandwidth_str = cols[2].split("MHz")[0]; - uint bandwidth = (uint)bandwidth_str.to_int (); - string transmode = cols[6]; - string code_rate_hp = cols[3]; - string code_rate_lp = cols[4]; - string constellation = cols[5]; - - string guard_str = cols[7].split("/")[1]; - uint guard = (uint)guard_str.to_int (); - - this.add_scanning_data (freq, hierarchy, - bandwidth, transmode, code_rate_hp, - code_rate_lp, constellation, guard); + uint hierarchy = 0; + if (cols[8] == "1") { + hierarchy = 1; + } else if (cols[8] == "2") { + hierarchy = 2; + } else if (cols[8] == "4") { + hierarchy = 3; } - return true; + string bandwidth_str = cols[2].split("MHz")[0]; + uint bandwidth = (uint)bandwidth_str.to_int (); + string transmode = cols[6]; + string code_rate_hp = cols[3]; + string code_rate_lp = cols[4]; + string constellation = cols[5]; + + string guard_str = cols[7].split("/")[1]; + uint guard = (uint)guard_str.to_int (); + + this.add_scanning_data (freq, hierarchy, + bandwidth, transmode, code_rate_hp, + code_rate_lp, constellation, guard); } protected override void prepare () { @@ -187,7 +170,7 @@ } protected override Channel get_new_channel () { - return new TerrestrialChannel (); + return new TerrestrialChannel.without_schedule (); } protected override void add_values_from_structure_to_channel ( diff -Nru gnome-dvb-daemon-0.1.16/src/Timer.c gnome-dvb-daemon-0.1.21/src/Timer.c --- gnome-dvb-daemon-0.1.16/src/Timer.c 2010-02-23 13:10:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Timer.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Timer.c generated by valac, the Vala compiler +/* Timer.c generated by valac 0.9.7, the Vala compiler * generated from Timer.vala, do not modify */ /* @@ -160,8 +160,8 @@ static gpointer dvb_timer_parent_class = NULL; -GType dvb_timer_get_type (void); -GType dvb_channel_get_type (void); +GType dvb_timer_get_type (void) G_GNUC_CONST; +GType dvb_channel_get_type (void) G_GNUC_CONST; #define DVB_TIMER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DVB_TYPE_TIMER, DVBTimerPrivate)) enum { DVB_TIMER_DUMMY_PROPERTY, @@ -171,59 +171,63 @@ DVB_TIMER_SINK, DVB_TIMER_EVENT_ID }; +DVBTimer* dvb_timer_new (guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); +DVBTimer* dvb_timer_construct (GType object_type, guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); void dvb_timer_set_EventID (DVBTimer* self, guint value); void dvb_timer_set_Duration (DVBTimer* self, guint value); void dvb_timer_set_start_time (DVBTimer* self, gint year, gint month, gint day, gint hour, gint minute); -DVBTimer* dvb_timer_new (guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); -DVBTimer* dvb_timer_construct (GType object_type, guint32 id, DVBChannel* channel, gint year, gint month, gint day, gint hour, gint minute, guint duration); void dvb_utils_create_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); static void dvb_timer_update_epg_event (DVBTimer* self); +gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2); static time_t dvb_timer_get_start_time_timestamp (DVBTimer* self); DVBChannel* dvb_timer_get_Channel (DVBTimer* self); gboolean dvb_channel_on_same_transport_stream (DVBChannel* self, DVBChannel* channel); static time_t dvb_timer_get_end_time_timestamp (DVBTimer* self); -gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2); -GType dvb_overlap_type_get_type (void); -static DVBOverlapType dvb_timer_get_overlap (time_t this_start, time_t this_end, time_t other_start, time_t other_end); +GType dvb_overlap_type_get_type (void) G_GNUC_CONST; 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); +static DVBOverlapType dvb_timer_get_overlap (time_t this_start, time_t this_end, time_t other_start, time_t other_end); 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); void dvb_timer_add_to_start_time (DVBTimer* self, gint minutes); guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1); void dvb_timer_get_start_time_time (DVBTimer* self, struct tm* result); guint* dvb_timer_get_end_time (DVBTimer* self, int* result_length1); -gboolean dvb_timer_has_expired (DVBTimer* self); gboolean dvb_timer_is_start_due (DVBTimer* self); +gboolean dvb_timer_has_expired (DVBTimer* self); gboolean dvb_timer_is_end_due (DVBTimer* self); +char* dvb_timer_to_string (DVBTimer* self); guint dvb_channel_get_Sid (DVBChannel* self); guint dvb_timer_get_Duration (DVBTimer* self); -char* dvb_timer_to_string (DVBTimer* self); -GType dvb_schedule_get_type (void); +GType dvb_schedule_get_type (void) G_GNUC_CONST; DVBSchedule* dvb_channel_get_Schedule (DVBChannel* 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); void dvb_value_set_event (GValue* value, gpointer v_object); +void dvb_value_take_event (GValue* value, gpointer v_object); gpointer dvb_value_get_event (const GValue* value); -GType dvb_event_get_type (void); +GType dvb_event_get_type (void) G_GNUC_CONST; DVBEvent* dvb_schedule_get_event_around (DVBSchedule* self, struct tm* start, guint duration); gpointer dvb_event_audio_component_ref (gpointer instance); void dvb_event_audio_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_audio_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_audio_component (GValue* value, gpointer v_object); +void dvb_event_value_take_audio_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_audio_component (const GValue* value); -GType dvb_event_audio_component_get_type (void); +GType dvb_event_audio_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_video_component_ref (gpointer instance); void dvb_event_video_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_video_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_video_component (GValue* value, gpointer v_object); +void dvb_event_value_take_video_component (GValue* value, gpointer v_object); gpointer dvb_event_value_get_video_component (const GValue* value); -GType dvb_event_video_component_get_type (void); +GType dvb_event_video_component_get_type (void) G_GNUC_CONST; gpointer dvb_event_teletext_component_ref (gpointer instance); void dvb_event_teletext_component_unref (gpointer instance); GParamSpec* dvb_event_param_spec_teletext_component (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void dvb_event_value_set_teletext_component (GValue* value, gpointer v_object); +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); +GType dvb_event_teletext_component_get_type (void) G_GNUC_CONST; guint32 dvb_timer_get_Id (DVBTimer* self); static void dvb_timer_set_Id (DVBTimer* self, guint32 value); static void dvb_timer_set_Channel (DVBTimer* self, DVBChannel* value); @@ -260,13 +264,16 @@ } +/** + * Whether the timer conflicts with the other one + */ static gpointer _g_object_ref0 (gpointer self) { return self ? g_object_ref (self) : NULL; } gboolean dvb_timer_conflicts_with (DVBTimer* self, DVBTimer* t2) { - gboolean result; + gboolean result = FALSE; time_t this_start; time_t other_start; DVBChannel* t1_c; @@ -279,32 +286,40 @@ t2_c = _g_object_ref0 (t2->priv->_Channel); if (dvb_channel_on_same_transport_stream (t1_c, t2_c)) { result = FALSE; - _g_object_unref0 (t1_c); _g_object_unref0 (t2_c); + _g_object_unref0 (t1_c); return result; } if (this_start <= other_start) { time_t this_end; this_end = dvb_timer_get_end_time_timestamp (self); result = this_end > other_start; - _g_object_unref0 (t1_c); _g_object_unref0 (t2_c); + _g_object_unref0 (t1_c); return result; } else { time_t other_end; other_end = dvb_timer_get_end_time_timestamp (t2); result = other_end > this_start; - _g_object_unref0 (t1_c); _g_object_unref0 (t2_c); + _g_object_unref0 (t1_c); return result; } - _g_object_unref0 (t1_c); _g_object_unref0 (t2_c); + _g_object_unref0 (t1_c); } +/** + * @duration: in minutes + * @returns: The overlap between the timer and the given time range. + * The timer is the reference, i.e. if the time range is completely + * contained in the timer OverlapType.COMPLETE is returned. + * + * The given time range must be in local time. + */ 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; + DVBOverlapType result = 0; time_t this_start; time_t this_end; struct tm _tmp0_ = {0}; @@ -323,8 +338,11 @@ } +/** + * Same as get_overlap_local but the given time range is UTC time. + */ 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; + DVBOverlapType result = 0; time_t this_start; time_t this_end; struct tm _tmp0_ = {0}; @@ -344,7 +362,7 @@ static DVBOverlapType dvb_timer_get_overlap (time_t this_start, time_t this_end, time_t other_start, time_t other_end) { - DVBOverlapType result; + DVBOverlapType result = 0; if (this_start <= other_start) { if (this_end <= other_start) { result = DVB_OVERLAP_TYPE_NONE; @@ -375,6 +393,9 @@ } +/** + * Add the specified amount of minutes to the starting time + */ void dvb_timer_add_to_start_time (DVBTimer* self, gint minutes) { g_return_if_fail (self != NULL); self->priv->starttime.tm_min = self->priv->starttime.tm_min + minutes; @@ -383,15 +404,15 @@ guint* dvb_timer_get_start_time (DVBTimer* self, int* result_length1) { - guint* result; - guint* _tmp1_; - gint start_size; + guint* result = NULL; gint start_length1; + gint _start_size_; + guint* _tmp1_; guint* _tmp0_ = NULL; guint* start; guint* _tmp2_; g_return_val_if_fail (self != NULL, NULL); - start = (_tmp1_ = (_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, _tmp0_), start_length1 = 5, start_size = start_length1, _tmp1_); + start = (_tmp1_ = (_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, _tmp0_), start_length1 = 5, _start_size_ = start_length1, _tmp1_); result = (_tmp2_ = start, *result_length1 = start_length1, _tmp2_); return result; start = (g_free (start), NULL); @@ -414,7 +435,7 @@ guint* dvb_timer_get_end_time (DVBTimer* self, int* result_length1) { - guint* result; + guint* result = NULL; struct tm _tmp0_ = {0}; struct tm l; guint* _tmp1_ = NULL; @@ -426,8 +447,12 @@ } +/** + * Whether the start time of the timer is after the current local time + * and the timer hasn't expired, yet. + */ gboolean dvb_timer_is_start_due (DVBTimer* self) { - gboolean result; + gboolean result = FALSE; time_t localtime; gboolean _tmp0_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); @@ -442,8 +467,11 @@ } +/** + * Whether the end time of the timer equals the current local time + */ gboolean dvb_timer_is_end_due (DVBTimer* self) { - gboolean result; + gboolean result = FALSE; struct tm _tmp0_ = {0}; struct tm localtime; struct tm _tmp1_ = {0}; @@ -480,8 +508,11 @@ } +/** + * Whether the timer ends in the past + */ gboolean dvb_timer_has_expired (DVBTimer* self) { - gboolean result; + gboolean result = FALSE; time_t current_time; time_t end_time; g_return_val_if_fail (self != NULL, FALSE); @@ -493,24 +524,27 @@ char* dvb_timer_to_string (DVBTimer* self) { - char* result; - guint* _tmp1_; - gint start_size; + char* result = NULL; gint start_length1; + gint _start_size_; + guint* _tmp1_; gint _tmp0_; guint* start; g_return_val_if_fail (self != NULL, NULL); - start = (_tmp1_ = dvb_timer_get_start_time (self, &_tmp0_), start_length1 = _tmp0_, start_size = start_length1, _tmp1_); + start = (_tmp1_ = dvb_timer_get_start_time (self, &_tmp0_), start_length1 = _tmp0_, _start_size_ = start_length1, _tmp1_); result = g_strdup_printf ("channel: %u, start: %04u-%02u-%02u %02u:%02u, duration: %u", dvb_channel_get_Sid (self->priv->_Channel), start[0], start[1], start[2], start[3], start[4], self->priv->_Duration); start = (g_free (start), NULL); return result; } +/** + * Check if we can find an EPG event belonging to this recording + */ static void dvb_timer_update_epg_event (DVBTimer* self) { DVBSchedule* schedule; - struct tm _tmp1_; struct tm _tmp0_ = {0}; + struct tm _tmp1_; DVBEvent* event; g_return_if_fail (self != NULL); schedule = _g_object_ref0 (dvb_channel_get_Schedule (self->priv->_Channel)); @@ -520,8 +554,8 @@ } else { dvb_timer_set_EventID (self, event->id); } - _g_object_unref0 (schedule); _dvb_event_unref0 (event); + _g_object_unref0 (schedule); } @@ -656,13 +690,18 @@ } +/** + * This class represents an event that should be recorded + */ GType dvb_timer_get_type (void) { - static GType dvb_timer_type_id = 0; - if (dvb_timer_type_id == 0) { + static volatile gsize dvb_timer_type_id__volatile = 0; + if (g_once_init_enter (&dvb_timer_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (DVBTimerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dvb_timer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DVBTimer), 0, (GInstanceInitFunc) dvb_timer_instance_init, NULL }; + GType dvb_timer_type_id; dvb_timer_type_id = g_type_register_static (G_TYPE_OBJECT, "DVBTimer", &g_define_type_info, 0); + g_once_init_leave (&dvb_timer_type_id__volatile, dvb_timer_type_id); } - return dvb_timer_type_id; + return dvb_timer_type_id__volatile; } diff -Nru gnome-dvb-daemon-0.1.16/src/Utils.c gnome-dvb-daemon-0.1.21/src/Utils.c --- gnome-dvb-daemon-0.1.16/src/Utils.c 2010-02-23 13:10:58.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Utils.c 2010-08-21 20:42:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Utils.c generated by valac, the Vala compiler +/* Utils.c generated by valac 0.9.7, the Vala compiler * generated from Utils.vala, do not modify */ /* @@ -35,35 +35,35 @@ #define __g_slist_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_slist_free_g_object_unref (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 _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) #define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL))) -#define DVB_UTILS_BUFFER_SIZE 4096 +#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 char* dvb_utils_get_nick_from_enum (GType enumtype, gint val); gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const char* name, gint* evalue); const char* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val); -static void _g_slist_free_g_object_unref (GSList* self); void dvb_utils_mkdirs (GFile* directory, GError** error); +static void _g_slist_free_g_object_unref (GSList* self); char* dvb_utils_remove_nonalphanums (const char* text); time_t dvb_utils_difftime (struct tm* t1, struct tm* t2); void dvb_utils_create_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); void dvb_utils_create_utc_time (gint year, gint month, gint day, gint hour, gint minute, gint second, struct tm* result); -char* dvb_utils_read_file_contents (GFile* file, GError** error); +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); inline const char* dvb_utils_get_nick_from_enum (GType enumtype, gint val) { - const char* result; + const char* result = NULL; GEnumClass* eclass; GEnumValue* eval; eclass = (GEnumClass*) g_type_class_ref (enumtype); eval = g_enum_get_value (eclass, val); if (eval == NULL) { - g_critical ("Utils.vala:31: Enum has no value %d", val); + g_critical ("Utils.vala:32: Enum has no value %d", val); result = NULL; _g_type_class_unref0 (eclass); return result; @@ -77,14 +77,14 @@ inline gboolean dvb_utils_get_value_by_name_from_enum (GType enumtype, const char* name, gint* evalue) { - gboolean result; + gboolean result = FALSE; GEnumClass* enumclass; GEnumValue* eval; g_return_val_if_fail (name != NULL, FALSE); enumclass = (GEnumClass*) g_type_class_ref (enumtype); eval = g_enum_get_value_by_name (enumclass, name); if (eval == NULL) { - g_critical ("Utils.vala:43: Enum has no member named %s", name); + g_critical ("Utils.vala:44: Enum has no member named %s", name); result = FALSE; _g_type_class_unref0 (enumclass); return result; @@ -99,13 +99,13 @@ inline const char* dvb_utils_get_name_by_value_from_enum (GType enumtype, gint val) { - const char* result; + const char* result = NULL; GEnumClass* enumclass; GEnumValue* eval; enumclass = (GEnumClass*) g_type_class_ref (enumtype); eval = g_enum_get_value (enumclass, val); if (eval == NULL) { - g_critical ("Utils.vala:56: Enum has no value %d", val); + g_critical ("Utils.vala:57: Enum has no value %d", val); result = NULL; _g_type_class_unref0 (enumclass); return result; @@ -130,11 +130,10 @@ void dvb_utils_mkdirs (GFile* directory, GError** error) { - GError * _inner_error_; GSList* create_dirs; GFile* current_dir; + GError * _inner_error_ = NULL; g_return_if_fail (directory != NULL); - _inner_error_ = NULL; create_dirs = NULL; current_dir = _g_object_ref0 (directory); while (TRUE) { @@ -157,40 +156,39 @@ dir = _g_object_ref0 ((GFile*) dir_it->data); { char* _tmp1_; - g_debug ("Utils.vala:74: Creating %s", _tmp1_ = g_file_get_path (dir)); + g_debug ("Utils.vala:75: Creating %s", _tmp1_ = g_file_get_path (dir)); _g_free0 (_tmp1_); g_file_make_directory (dir, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (dir); - __g_slist_free_g_object_unref0 (create_dirs); _g_object_unref0 (current_dir); + __g_slist_free_g_object_unref0 (create_dirs); return; } _g_object_unref0 (dir); } } } - __g_slist_free_g_object_unref0 (create_dirs); _g_object_unref0 (current_dir); + __g_slist_free_g_object_unref0 (create_dirs); } char* dvb_utils_remove_nonalphanums (const char* text) { - char* result; - GError * _inner_error_; + char* result = NULL; GRegex* regex; char* new_text; + GError * _inner_error_ = NULL; g_return_val_if_fail (text != NULL, NULL); - _inner_error_ = NULL; regex = NULL; { GRegex* _tmp0_; GRegex* _tmp1_; - _tmp0_ = g_regex_new ("\\W", 0, 0, &_inner_error_); + _tmp0_ = g_regex_new ("[^-_\\.a-zA-Z0-9]", 0, 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch63_g_regex_error; + goto __catch185_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); @@ -199,21 +197,21 @@ } regex = (_tmp1_ = _tmp0_, _g_regex_unref0 (regex), _tmp1_); } - goto __finally63; - __catch63_g_regex_error: + goto __finally185; + __catch185_g_regex_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Utils.vala:84: RegexError: %s", e->message); + g_critical ("Utils.vala:85: RegexError: %s", e->message); result = g_strdup (text); _g_error_free0 (e); _g_regex_unref0 (regex); return result; } } - __finally63: + __finally185: 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); @@ -227,35 +225,35 @@ _tmp2_ = g_regex_replace_literal (regex, text, (gssize) (-1), 0, "_", 0, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch64_g_regex_error; + goto __catch186_g_regex_error; } - _g_regex_unref0 (regex); _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 = (_tmp3_ = _tmp2_, _g_free0 (new_text), _tmp3_); } - goto __finally64; - __catch64_g_regex_error: + goto __finally186; + __catch186_g_regex_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Utils.vala:92: RegexError: %s", e->message); + g_critical ("Utils.vala:93: RegexError: %s", e->message); result = g_strdup (text); _g_error_free0 (e); - _g_regex_unref0 (regex); _g_free0 (new_text); + _g_regex_unref0 (regex); return result; } } - __finally64: + __finally186: if (_inner_error_ != NULL) { - _g_regex_unref0 (regex); _g_free0 (new_text); + _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; @@ -266,6 +264,9 @@ } +/** + * @returns: Difference in seconds + */ inline time_t dvb_utils_difftime (struct tm* t1, struct tm* t2) { time_t result; time_t ts1; @@ -284,6 +285,9 @@ } +/** + * Creates Time of local time + */ static void g_time_local (time_t time, struct tm* result) { struct tm _result_ = {0}; localtime_r (&time, &_result_); @@ -308,6 +312,9 @@ } +/** + * Creates Time of UTC time + */ static void g_time_gm (time_t time, struct tm* result) { struct tm _result_ = {0}; gmtime_r (&time, &_result_); @@ -333,183 +340,81 @@ } -char* dvb_utils_read_file_contents (GFile* file, GError** error) { - char* result; - GError * _inner_error_; - char* attrs; +gboolean dvb_utils_is_readable_file (GFile* file) { + gboolean result = FALSE; GFileInfo* info; - GFileInputStream* stream; - GString* sb; - gchar* _tmp6_; - gint buffer_size; - gint buffer_length1; - gchar* buffer; - glong bytes_read = 0L; - g_return_val_if_fail (file != NULL, NULL); - _inner_error_ = NULL; - attrs = g_strdup_printf ("%s,%s", G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); + GError * _inner_error_ = NULL; + g_return_val_if_fail (file != NULL, FALSE); info = NULL; { GFileInfo* _tmp0_; GFileInfo* _tmp1_; - _tmp0_ = g_file_query_info (file, attrs, 0, NULL, &_inner_error_); + _tmp0_ = g_file_query_info (file, DVB_UTILS_READ_ATTRS, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch65_g_error; + goto __catch187_g_error; } info = (_tmp1_ = _tmp0_, _g_object_unref0 (info), _tmp1_); } - goto __finally65; - __catch65_g_error: + goto __finally187; + __catch187_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_critical ("Utils.vala:166: Could not retrieve attributes: %s", e->message); - result = NULL; + g_critical ("Utils.vala:162: Could not retrieve attributes: %s", e->message); + result = FALSE; _g_error_free0 (e); - _g_free0 (attrs); _g_object_unref0 (info); return result; } } - __finally65: + __finally187: if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (attrs); _g_object_unref0 (info); - return 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; } if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR) { char* _tmp2_; - g_critical ("Utils.vala:171: %s is not a regular file", _tmp2_ = g_file_get_path (file)); + g_critical ("Utils.vala:167: %s is not a regular file", _tmp2_ = g_file_get_path (file)); _g_free0 (_tmp2_); - result = NULL; - _g_free0 (attrs); + result = FALSE; _g_object_unref0 (info); return result; } if (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) { char* _tmp3_; - g_critical ("Utils.vala:176: Cannot read %s", _tmp3_ = g_file_get_path (file)); + g_critical ("Utils.vala:172: Cannot read %s", _tmp3_ = g_file_get_path (file)); _g_free0 (_tmp3_); - result = NULL; - _g_free0 (attrs); + result = FALSE; _g_object_unref0 (info); return result; } - stream = NULL; - { - GFileInputStream* _tmp4_; - GFileInputStream* _tmp5_; - _tmp4_ = g_file_read (file, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - goto __catch66_g_error; - } - stream = (_tmp5_ = _tmp4_, _g_object_unref0 (stream), _tmp5_); - } - goto __finally66; - __catch66_g_error: - { - GError * e; - e = _inner_error_; - _inner_error_ = NULL; - { - g_critical ("Utils.vala:184: Could not read file: %s", e->message); - result = NULL; - _g_error_free0 (e); - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (stream); - return result; - } - } - __finally66: - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (stream); - return NULL; - } - sb = g_string_new (""); - buffer = (_tmp6_ = g_new0 (gchar, DVB_UTILS_BUFFER_SIZE), buffer_length1 = DVB_UTILS_BUFFER_SIZE, buffer_size = buffer_length1, _tmp6_); - while (TRUE) { - gssize _tmp7_; - _tmp7_ = g_input_stream_read ((GInputStream*) stream, buffer, (gsize) DVB_UTILS_BUFFER_SIZE, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (stream); - _g_string_free0 (sb); - buffer = (g_free (buffer), NULL); - return NULL; - } - if (!((bytes_read = (glong) _tmp7_) > 0)) { - break; - } - { - gint i; - i = 0; - { - gboolean _tmp8_; - _tmp8_ = TRUE; - while (TRUE) { - if (!_tmp8_) { - i++; - } - _tmp8_ = FALSE; - if (!(i < bytes_read)) { - break; - } - g_string_append_c (sb, buffer[i]); - } - } - } - } - g_input_stream_close ((GInputStream*) stream, NULL, &_inner_error_); - if (_inner_error_ != NULL) { - g_propagate_error (error, _inner_error_); - _g_free0 (attrs); - _g_object_unref0 (info); - _g_object_unref0 (stream); - _g_string_free0 (sb); - buffer = (g_free (buffer), NULL); - return NULL; - } - result = g_strdup (sb->str); - _g_free0 (attrs); + result = TRUE; _g_object_unref0 (info); - _g_object_unref0 (stream); - _g_string_free0 (sb); - buffer = (g_free (buffer), NULL); return result; } void dvb_utils_delete_dir_recursively (GFile* dir, GError** error) { - GError * _inner_error_; - char* attrs; GFileEnumerator* files; GFileEnumerator* _tmp0_; GFileEnumerator* _tmp1_; GFileInfo* childinfo; char* _tmp5_; + GError * _inner_error_ = NULL; g_return_if_fail (dir != NULL); - _inner_error_ = NULL; - attrs = g_strdup_printf ("%s,%s", G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_ATTRIBUTE_STANDARD_NAME); files = NULL; - _tmp0_ = g_file_enumerate_children (dir, attrs, 0, NULL, &_inner_error_); + _tmp0_ = g_file_enumerate_children (dir, DVB_UTILS_NAME_ATTRS, 0, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); - _g_free0 (attrs); _g_object_unref0 (files); return; } files = (_tmp1_ = _tmp0_, _g_object_unref0 (files), _tmp1_); if (files == NULL) { - _g_free0 (attrs); _g_object_unref0 (files); return; } @@ -522,9 +427,8 @@ _tmp2_ = g_file_enumerator_next_file (files, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); - _g_free0 (attrs); - _g_object_unref0 (files); _g_object_unref0 (childinfo); + _g_object_unref0 (files); return; } if (!((childinfo = (_tmp3_ = _tmp2_, _g_object_unref0 (childinfo), _tmp3_)) != NULL)) { @@ -539,9 +443,8 @@ if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (child); - _g_free0 (attrs); - _g_object_unref0 (files); _g_object_unref0 (childinfo); + _g_object_unref0 (files); return; } break; @@ -549,15 +452,14 @@ case G_FILE_TYPE_REGULAR: { char* _tmp4_; - g_debug ("Utils.vala:223: Deleting file %s", _tmp4_ = g_file_get_path (child)); + g_debug ("Utils.vala:197: Deleting file %s", _tmp4_ = g_file_get_path (child)); _g_free0 (_tmp4_); g_file_delete (child, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); _g_object_unref0 (child); - _g_free0 (attrs); - _g_object_unref0 (files); _g_object_unref0 (childinfo); + _g_object_unref0 (files); return; } break; @@ -565,52 +467,49 @@ } _g_object_unref0 (child); } - g_debug ("Utils.vala:229: Deleting directory %s", _tmp5_ = g_file_get_path (dir)); + g_debug ("Utils.vala:203: Deleting directory %s", _tmp5_ = g_file_get_path (dir)); _g_free0 (_tmp5_); g_file_delete (dir, NULL, &_inner_error_); if (_inner_error_ != NULL) { g_propagate_error (error, _inner_error_); - _g_free0 (attrs); - _g_object_unref0 (files); _g_object_unref0 (childinfo); + _g_object_unref0 (files); return; } - _g_free0 (attrs); - _g_object_unref0 (files); _g_object_unref0 (childinfo); + _g_object_unref0 (files); } inline DBusGConnection* dvb_utils_get_dbus_connection (void) { - DBusGConnection* result; - GError * _inner_error_; + DBusGConnection* result = NULL; DBusGConnection* conn; - _inner_error_ = NULL; + GError * _inner_error_ = NULL; conn = NULL; { DBusGConnection* _tmp0_; DBusGConnection* _tmp1_; _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_); if (_inner_error_ != NULL) { - goto __catch67_g_error; + goto __catch188_g_error; } conn = (_tmp1_ = _tmp0_, _dbus_g_connection_unref0 (conn), _tmp1_); } - goto __finally67; - __catch67_g_error: + goto __finally188; + __catch188_g_error: { GError * e; e = _inner_error_; _inner_error_ = NULL; { - g_error ("Utils.vala:238: Could not get D-Bus session bus: %s", e->message); + 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; } } - __finally67: + __finally188: 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); diff -Nru gnome-dvb-daemon-0.1.16/src/Utils.vala gnome-dvb-daemon-0.1.21/src/Utils.vala --- gnome-dvb-daemon-0.1.16/src/Utils.vala 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/src/Utils.vala 2010-08-17 13:24:33.000000000 +0000 @@ -21,8 +21,9 @@ namespace DVB.Utils { - private const int BUFFER_SIZE = 4096; - + private const string NAME_ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_STANDARD_NAME; + private const string READ_ATTRS = FILE_ATTRIBUTE_STANDARD_TYPE + "," + FILE_ATTRIBUTE_ACCESS_CAN_READ; + public static inline unowned string? get_nick_from_enum (GLib.Type enumtype, int val) { EnumClass eclass = (EnumClass)enumtype.class_ref (); unowned EnumValue eval = eclass.get_value (val); @@ -79,9 +80,9 @@ public static string remove_nonalphanums (string text) { Regex regex; try { - regex = new Regex ("\\W", 0, 0); + regex = new Regex ("[^-_\\.a-zA-Z0-9]", 0, 0); } catch (RegexError e) { - error ("RegexError: %s", e.message); + critical ("RegexError: %s", e.message); return text; } @@ -89,7 +90,7 @@ try { new_text = regex.replace_literal (text, -1, 0, "_", 0); } catch (RegexError e) { - error ("RegexError: %s", e.message); + critical ("RegexError: %s", e.message); return text; } @@ -152,59 +153,32 @@ return t; } - - // TODO throw error - public static string? read_file_contents (File file) throws Error { - string attrs = "%s,%s".printf ( - FILE_ATTRIBUTE_STANDARD_TYPE, - FILE_ATTRIBUTE_ACCESS_CAN_READ); - + + public static bool is_readable_file (File file) { FileInfo info; try { - info = file.query_info (attrs, 0, null); + info = file.query_info (READ_ATTRS, 0, null); } catch (Error e) { critical ("Could not retrieve attributes: %s", e.message); - return null; + return false; } if (info.get_file_type () != FileType.REGULAR) { critical ("%s is not a regular file", file.get_path ()); - return null; + return false; } if (!info.get_attribute_boolean (FILE_ATTRIBUTE_ACCESS_CAN_READ)) { critical ("Cannot read %s", file.get_path ()); - return null; - } - - FileInputStream stream; - try { - stream = file.read (null); - } catch (Error e) { - critical ("Could not read file: %s", e.message); - return null; - } - - StringBuilder sb = new StringBuilder (); - char[] buffer = new char[BUFFER_SIZE]; - - long bytes_read; - while ((bytes_read = stream.read (buffer, BUFFER_SIZE, null)) > 0) { - for (int i=0; i. */ #include "cstuff.h" +#include guint gst_bus_add_watch_context (GstBus * bus, GstBusFunc func, @@ -34,3 +35,20 @@ return id; } + +void +program_log (const char *format, ...) +{ + va_list args; + char *formatted, *str; + + va_start (args, format); + formatted = g_strdup_vprintf (format, args); + va_end (args); + + str = g_strdup_printf ("MARK: %s: %s", g_get_prgname(), formatted); + g_free (formatted); + + access (str, F_OK); + g_free (str); +} diff -Nru gnome-dvb-daemon-0.1.16/vapi/cstuff.h gnome-dvb-daemon-0.1.21/vapi/cstuff.h --- gnome-dvb-daemon-0.1.16/vapi/cstuff.h 2009-09-13 17:25:21.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/vapi/cstuff.h 2010-04-11 09:46:37.000000000 +0000 @@ -27,4 +27,6 @@ gpointer user_data, GMainContext * context); +void program_log (const char *format, ...); + #endif /* __CSTUFF_H__ */ diff -Nru gnome-dvb-daemon-0.1.16/vapi/cutils.vapi gnome-dvb-daemon-0.1.21/vapi/cutils.vapi --- gnome-dvb-daemon-0.1.16/vapi/cutils.vapi 2010-02-07 16:11:57.000000000 +0000 +++ gnome-dvb-daemon-0.1.21/vapi/cutils.vapi 2010-04-11 09:47:45.000000000 +0000 @@ -32,4 +32,7 @@ [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); + [CCode (cname = "program_log"), PrintfFormat] + public static void log (...); + }