diff --git a/configure.ac b/configure.ac index 872c505..fc21f4b 100644 --- a/configure.ac +++ b/configure.ac @@ -54,14 +54,6 @@ AC_ARG_ENABLE([n900], AS_HELP_STRING([--enable-n900], [Enable N900 extra's @<:@d esac],[n900=false]) AM_CONDITIONAL([N900], [test x$n900 = xtrue]) -AC_ARG_ENABLE([gconf], AS_HELP_STRING([--enable-gconf], [Use GConf for configuration storage @<:@default=false@:>@]), - [case "${enableval}" in - yes) gconf=true ; CFLAGS="-DGCONF -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -lgconf-2 $CFLAGS" ;; - no) conf=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-gconf]) ;; - esac],[gconf=false]) -AM_CONDITIONAL([GCONF], [test x$gconf = xtrue]) - AC_ARG_ENABLE([app_sync], AS_HELP_STRING([--enable-app-sync], [Enable application syncing @<:@default=true@:>@]), [case "${enableval}" in yes) app_sync=true ; CFLAGS="-DAPP_SYNC $CFLAGS" ;; @@ -118,8 +110,6 @@ AC_ARG_ENABLE([ofono], AS_HELP_STRING([--enable-ofono], [Enable ofono DBUS inter esac],[ofono=false]) AM_CONDITIONAL([SYSTEMD], [test x$ofono = xtrue]) -#TODO: Figure out how to check for this depending on the gconf flag -# gconf-2.0 >= 2.16.0 PKG_CHECK_MODULES([USB_MODED], [ glib-2.0 >= 2.24.0 dbus-1 >= 1.2.1 diff --git a/debian/control b/debian/control index ccafb12..6840710 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: usb-moded Section: misc Priority: optional Maintainer: Philippe De Swert -Build-Depends: debhelper (>= 5), autoconf, automake, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libgconf2-dev, doxygen, libudev-dev +Build-Depends: debhelper (>= 5), autoconf, automake, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, doxygen, libudev-dev Standards-Version: 3.9.1 Package: usb-moded diff --git a/debian/rules b/debian/rules index a52af96..9964955 100755 --- a/debian/rules +++ b/debian/rules @@ -74,8 +74,6 @@ ifneq (0,$(MAKE_DOCS)) endif mkdir -p $(CURDIR)/debian/usb-moded/etc/usb-moded install -m 644 $(CURDIR)/usb-moded.ini $(CURDIR)/debian/usb-moded/etc/usb-moded/usb-moded.ini - mkdir -p $(CURDIR)/debian/usb-moded/etc/gconf/schemas - install -m 644 $(CURDIR)/debian/usb-moded.schemas $(CURDIR)/debian/usb-moded/etc/gconf/schemas/usb-moded.schemas @@ -101,7 +99,7 @@ binary-arch: build install # dh_installinit # dh_installcron # dh_installinfo - dh_gconf +# dh_gconf dh_installman dh_link dh_strip --dbg-package=usb-moded-dbg diff --git a/debian/usb-moded.schemas b/debian/usb-moded.schemas deleted file mode 100644 index 7d45606..0000000 --- a/debian/usb-moded.schemas +++ /dev/null @@ -1,17 +0,0 @@ - - - - - /schemas/Meego/System/UsbMode - /Meego/System/UsbMode - usb_moded - string - ask - - Default mode to set for usb_moded - This key contains the default mode usb_moded will set if usb is connected. - - - - - diff --git a/docs/usb_moded-doc.txt b/docs/usb_moded-doc.txt index b9a79d1..c9169e0 100644 --- a/docs/usb_moded-doc.txt +++ b/docs/usb_moded-doc.txt @@ -36,7 +36,7 @@ Similary a mode can be set. dbus-send --system --type=method_call --print-reply --dest=com.meego.usb_moded /com/meego/usb_moded com.meego.usb_moded.set_mode string:'' -Even the configuration can be set over DBus (this will set either the gconf key or use the settings file) +Even the configuration can be set over DBus dbus-send --system --type=method_call --print-reply --dest=com.meego.usb_moded /com/meego/usb_moded com.meego.usb_moded.set_config string:'' @@ -48,17 +48,6 @@ The supported modes can be queried over dbus as follows: dbus-send --system --type=method_call --print-reply --dest=com.meego.usb_moded /com/meego/usb_moded com.meego.usb_moded.get_modes -=== WITH GCONF ONLY === - -However this can also be optionally handled by setting the following GConf key (gconf has to be compiled in). - -/Meego/System/UsbMode (querying and setting can be done as follows: - -gconftool-2 -g /Meego/System/UsbMode -gconftool-2 -s /Meego/System/UsbMode --type=string - -=== END WITH GCONF ONLY === - Usb_moded will also broadcast changes and errors over the system bus. This will happen on the com.meego.usb_moded interface diff --git a/rpm/usb-moded.spec b/rpm/usb-moded.spec index 084aee0..4e28f6b 100644 --- a/rpm/usb-moded.spec +++ b/rpm/usb-moded.spec @@ -265,7 +265,6 @@ install -m 644 -D src/usb_moded-appsync-dbus.h %{buildroot}/%{_includedir}/%{nam install -m 644 -D usb_moded.pc %{buildroot}/%{_libdir}/pkgconfig/usb_moded.pc install -d %{buildroot}/%{_docdir}/%{name}/html/ install -m 644 docs/html/* %{buildroot}/%{_docdir}/%{name}/html/ -install -m 644 -D debian/%{name}.schemas %{buildroot}/%{_sysconfdir}/gconf/schemas/%{name}.schemas install -m 644 -D debian/manpage.1 %{buildroot}/%{_mandir}/man1/usb-moded.1 install -m 644 -D debian/usb_moded.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/usb_moded.conf install -m 644 -D %{SOURCE2} %{buildroot}/%{_sysconfdir}/modprobe.d/usb_moded.conf @@ -296,7 +295,6 @@ systemctl daemon-reload || : %defattr(-,root,root,-) %doc debian/copyright %config(noreplace) %{_sysconfdir}/dbus-1/system.d/usb_moded.conf -%config(noreplace) %{_sysconfdir}/gconf/schemas/%{name}.schemas %config(noreplace) %{_sysconfdir}/modprobe.d/usb_moded.conf %ghost %config(noreplace) %{_sysconfdir}/modprobe.d/g_ether.conf %{_sbindir}/usb_moded diff --git a/src/Makefile.am b/src/Makefile.am index d280d66..54bf228 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -36,12 +36,6 @@ usb_moded_SOURCES = \ usb_moded-android.h \ usb_moded-android.c -if GCONF -usb_moded_SOURCES += \ - usb_moded-gconf.c \ - usb_moded-gconf.h -endif - if UDEV usb_moded_SOURCES += \ usb_moded-udev.c \ diff --git a/src/usb_moded-gconf.c b/src/usb_moded-gconf.c deleted file mode 100644 index 8a91219..0000000 --- a/src/usb_moded-gconf.c +++ /dev/null @@ -1,95 +0,0 @@ -/** - @file usb_moded-gconf.c - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - @author: Philippe De Swert - - This program is free software; you can redistribute it and/or - modify it under the terms of the Lesser GNU General Public License - version 2 as published by the Free Software Foundation. - - This program 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 Lesser GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ -/* - * Gets information from Gconf for the usb modes -*/ - -/*============================================================================= */ - -#include -#include - -#include -#include - -#include - -#include "usb_moded-gconf.h" -#include "usb_moded-config-private.h" -#include "usb_moded-modes.h" -#include "usb_moded-log.h" -#include "usb_moded.h" - -/** Get the config option set in gconf for the default action - * - * @return The mode to set by default, or NULL on failure - * - */ -const char * get_mode_setting(void) -{ - GConfClient *gclient = NULL; - gchar *mode_value; - - gclient = gconf_client_get_default(); - - if (gclient == NULL) - { - log_err("Unable to get GConfClient"); - return(0); - } - mode_value = gconf_client_get_string(gclient, USB_MODE_GCONF, NULL); - - g_object_unref(gclient); - return(mode_value); -} - -/** Set the config option for the default action - * - * @param mode The default action to store in gconf - * @return 0 on on success, 1 on failure - * - */ -int set_mode_setting(const char *mode) -{ - GConfClient *gclient = NULL; - - if(!valid_mode(mode) || !strcmp(mode, MODE_ASK)) - { - gclient = gconf_client_get_default(); - if (gclient == NULL) - { - log_err("Unable to get GConfClient"); - return(1); - } - if (!gconf_client_set_string(gclient, USB_MODE_GCONF, mode, NULL)) - { - log_err("Unable to set GConf key"); - g_object_unref(gclient); - return(1); - } - } - else - return(1); - - g_object_unref(gclient); - return(0); -} diff --git a/src/usb_moded-gconf.h b/src/usb_moded-gconf.h deleted file mode 100644 index d279449..0000000 --- a/src/usb_moded-gconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Author: Philippe De Swert - - This program is free software; you can redistribute it and/or - modify it under the terms of the Lesser GNU General Public License - version 2 as published by the Free Software Foundation. - - This program 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 Lesser GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ -/* - * Gets information from Gconf for the usb modes -*/ - -/*============================================================================= */ - -#define USB_MODE_GCONF "/Meego/System/UsbMode" - diff --git a/src/usb_moded.c b/src/usb_moded.c index 92bfeab..7c899a1 100644 --- a/src/usb_moded.c +++ b/src/usb_moded.c @@ -43,7 +43,6 @@ #include "usb_moded-dbus.h" #include "usb_moded-dbus-private.h" #include "usb_moded-hw-ab.h" -#include "usb_moded-gconf.h" #include "usb_moded-modules.h" #include "usb_moded-log.h" #include "usb_moded-lock.h"