Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
usb-moded
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
usb-moded
Commits
5c0ed22c
Commit
5c0ed22c
authored
May 13, 2014
by
Thomas Perl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[gconf] Remove GConf support, as it's abandoned upstream
parent
accac6c2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
3 additions
and
174 deletions
+3
-174
configure.ac
configure.ac
+0
-10
debian/control
debian/control
+1
-1
debian/rules
debian/rules
+1
-3
debian/usb-moded.schemas
debian/usb-moded.schemas
+0
-17
docs/usb_moded-doc.txt
docs/usb_moded-doc.txt
+1
-12
rpm/usb-moded.spec
rpm/usb-moded.spec
+0
-2
src/Makefile.am
src/Makefile.am
+0
-6
src/usb_moded-gconf.c
src/usb_moded-gconf.c
+0
-95
src/usb_moded-gconf.h
src/usb_moded-gconf.h
+0
-27
src/usb_moded.c
src/usb_moded.c
+0
-1
No files found.
configure.ac
View file @
5c0ed22c
...
...
@@ -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
...
...
debian/control
View file @
5c0ed22c
...
...
@@ -2,7 +2,7 @@ Source: usb-moded
Section: misc
Priority: optional
Maintainer: Philippe De Swert <philippe.de-swert@nokia.com>
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
...
...
debian/rules
View file @
5c0ed22c
...
...
@@ -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
...
...
debian/usb-moded.schemas
deleted
100644 → 0
View file @
accac6c2
<?xml version="1.0"?>
<gconfschemafile>
<schemalist>
<schema>
<key>
/schemas/Meego/System/UsbMode
</key>
<applyto>
/Meego/System/UsbMode
</applyto>
<owner>
usb_moded
</owner>
<type>
string
</type>
<default>
ask
</default>
<locale
name=
"C"
>
<short>
Default mode to set for usb_moded
</short>
<long>
This key contains the default mode usb_moded will set if usb is connected.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
docs/usb_moded-doc.txt
View file @
5c0ed22c
...
...
@@ -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:'<mode_name>'
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:'<mode_name>'
...
...
@@ -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 <mode_name>
=== 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
...
...
rpm/usb-moded.spec
View file @
5c0ed22c
...
...
@@ -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
...
...
src/Makefile.am
View file @
5c0ed22c
...
...
@@ -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
\
...
...
src/usb_moded-gconf.c
deleted
100644 → 0
View file @
accac6c2
/**
@file usb_moded-gconf.c
Copyright (C) 2010 Nokia Corporation. All rights reserved.
@author: Philippe De Swert <philippe.de-swert@nokia.com>
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 <string.h>
#include <stdio.h>
#include <glib.h>
#include <glib-object.h>
#include <gconf/gconf-client.h>
#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
);
}
src/usb_moded-gconf.h
deleted
100644 → 0
View file @
accac6c2
/*
Copyright (C) 2010 Nokia Corporation. All rights reserved.
Author: Philippe De Swert <philippe.de-swert@nokia.com>
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"
src/usb_moded.c
View file @
5c0ed22c
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment