diff -Nru geoclue-2.0-2.1.7/aclocal.m4 geoclue-2.0-2.1.8/aclocal.m4 --- geoclue-2.0-2.1.7/aclocal.m4 2014-03-25 02:19:43.000000000 +0000 +++ geoclue-2.0-2.1.8/aclocal.m4 2014-04-15 21:16:02.000000000 +0000 @@ -20,6 +20,221 @@ 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'.])]) + +dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) +# serial 42 IT_PROG_INTLTOOL +AC_DEFUN([IT_PROG_INTLTOOL], [ +AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_NLS])dnl + +case "$am__api_version" in + 1.[01234]) + AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) + ;; + *) + ;; +esac + +INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` +INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +if test -n "$1"; then + AC_MSG_CHECKING([for intltool >= $1]) + AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) +fi + +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) +fi + +if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 +fi +AC_SUBST([AM_DEFAULT_VERBOSITY]) + +INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' +INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' +INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' +AC_SUBST(INTLTOOL_V_MERGE) +AC_SUBST(INTLTOOL__v_MERGE_) +AC_SUBST(INTLTOOL__v_MERGE_0) + +INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' +intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' +intltool__v_merge_options_0='-q' +AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) +AC_SUBST(intltool__v_merge_options_) +AC_SUBST(intltool__v_merge_options_0) + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' +else + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' +fi + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + +_IT_SUBST(INTLTOOL_DESKTOP_RULE) +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) +_IT_SUBST(INTLTOOL_KEYS_RULE) +_IT_SUBST(INTLTOOL_PROP_RULE) +_IT_SUBST(INTLTOOL_OAF_RULE) +_IT_SUBST(INTLTOOL_PONG_RULE) +_IT_SUBST(INTLTOOL_SERVER_RULE) +_IT_SUBST(INTLTOOL_SHEET_RULE) +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) +_IT_SUBST(INTLTOOL_UI_RULE) +_IT_SUBST(INTLTOOL_XAM_RULE) +_IT_SUBST(INTLTOOL_KBD_RULE) +_IT_SUBST(INTLTOOL_XML_RULE) +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) +_IT_SUBST(INTLTOOL_CAVES_RULE) +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) +_IT_SUBST(INTLTOOL_THEME_RULE) +_IT_SUBST(INTLTOOL_SERVICE_RULE) +_IT_SUBST(INTLTOOL_POLICY_RULE) + +# Check the gettext tools to make sure they are GNU +AC_PATH_PROG(XGETTEXT, xgettext) +AC_PATH_PROG(MSGMERGE, msgmerge) +AC_PATH_PROG(MSGFMT, msgfmt) +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi + +AC_PATH_PROG(INTLTOOL_PERL, perl) +if test -z "$INTLTOOL_PERL"; then + AC_MSG_ERROR([perl not found]) +fi +AC_MSG_CHECKING([for perl >= 5.8.1]) +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) +else + IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` + AC_MSG_RESULT([$IT_PERL_VERSION]) +fi +if test "x$2" != "xno-xml"; then + AC_MSG_CHECKING([for XML::Parser]) + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + AC_MSG_RESULT([ok]) + else + AC_MSG_ERROR([XML::Parser perl module is required for intltool]) + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile +AC_SUBST(ALL_LINGUAS) + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], + [[extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr]])], + [DATADIRNAME=share], + [case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share + dnl in this case. + AC_CHECK_FUNC(bind_textdomain_codeset, + [DATADIRNAME=share], [DATADIRNAME=lib]) + ;; + *) + [DATADIRNAME=lib] + ;; + esac]) +fi +AC_SUBST(DATADIRNAME) + +IT_PO_SUBDIR([po]) + +]) + + +# IT_PO_SUBDIR(DIRNAME) +# --------------------- +# All po subdirs have to be declared with this macro; the subdir "po" is +# declared by IT_PROG_INTLTOOL. +# +AC_DEFUN([IT_PO_SUBDIR], +[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. +dnl +dnl The following CONFIG_COMMANDS should be executed at the very end +dnl of config.status. +AC_CONFIG_COMMANDS_PRE([ + AC_CONFIG_COMMANDS([$1/stamp-it], [ + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) + fi + rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" + >"$1/stamp-it.tmp" + [sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" + ] + [sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r $1/POTFILES + } + ' "$1/Makefile.in" >"$1/Makefile"] + rm -f "$1/Makefile.tmp" + mv "$1/stamp-it.tmp" "$1/stamp-it" + ]) +])dnl +]) + +# _IT_SUBST(VARIABLE) +# ------------------- +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST +# +AC_DEFUN([_IT_SUBST], +[ +AC_SUBST([$1]) +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) +] +) + +# deprecated macros +AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) +# A hint is needed for aclocal from Automake <= 1.9.4: +# AC_DEFUN([AC_PROG_INTLTOOL], ...) + + # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, dnl Inc. @@ -1431,7 +1646,6 @@ m4_include([m4/gnome-compiler-flags.m4]) m4_include([m4/gtk-doc.m4]) -m4_include([m4/intltool.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff -Nru geoclue-2.0-2.1.7/build-aux/Makefile.in geoclue-2.0-2.1.8/build-aux/Makefile.in --- geoclue-2.0-2.1.7/build-aux/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/build-aux/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -79,14 +79,13 @@ host_triplet = @host@ subdir = build-aux DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ar-lib \ - compile config.guess config.sub depcomp install-sh missing \ - ltmain.sh + compile config.guess config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -149,16 +148,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ diff -Nru geoclue-2.0-2.1.7/config.h.in geoclue-2.0-2.1.8/config.h.in --- geoclue-2.0-2.1.7/config.h.in 2014-03-25 02:19:48.000000000 +0000 +++ geoclue-2.0-2.1.8/config.h.in 2014-04-15 21:16:04.000000000 +0000 @@ -3,17 +3,14 @@ /* Build demo agent? */ #undef BUILD_DEMO_AGENT -/* Build geoip server? */ -#undef BUILD_GEOIP_SERVER - /* Build 3G source? */ #undef GCLUE_USE_3G_SOURCE /* Build modem GPS source? */ #undef GCLUE_USE_MODEM_GPS_SOURCE -/* Build Wifi source? */ -#undef GCLUE_USE_WIFI_SOURCE +/* Use NetowrkManager? */ +#undef GCLUE_USE_NETWORK_MANAGER /* The name of the gettext domain */ #undef GETTEXT_PACKAGE diff -Nru geoclue-2.0-2.1.7/configure geoclue-2.0-2.1.8/configure --- geoclue-2.0-2.1.7/configure 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/configure 2014-04-15 21:16:03.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for geoclue 2.1.7. +# Generated by GNU Autoconf 2.69 for geoclue 2.1.8. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='geoclue' PACKAGE_TARNAME='geoclue' -PACKAGE_VERSION='2.1.7' -PACKAGE_STRING='geoclue 2.1.7' +PACKAGE_VERSION='2.1.8' +PACKAGE_STRING='geoclue 2.1.8' PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue' PACKAGE_URL='http://www.freedesktop.org/wiki/Software/GeoClue' @@ -648,25 +648,16 @@ BUILD_DEMO_AGENT_TRUE DEMO_AGENT_LIBS DEMO_AGENT_CFLAGS -NetworkManager_LIBS -NetworkManager_CFLAGS ModemManager_LIBS ModemManager_CFLAGS BUILD_MODEM_SOURCE_FALSE BUILD_MODEM_SOURCE_TRUE -BUILD_WIFI_SOURCE_FALSE -BUILD_WIFI_SOURCE_TRUE +NetworkManager_LIBS +NetworkManager_CFLAGS BUILD_MODEM_GPS_SOURCE_FALSE BUILD_MODEM_GPS_SOURCE_TRUE BUILD_3G_SOURCE_FALSE BUILD_3G_SOURCE_TRUE -BUILD_GEOIP_SERVER_FALSE -BUILD_GEOIP_SERVER_TRUE -GEOIP_DATABASE_PATH -GEOIP_DBUPDATE_LIBS -GEOIP_DBUPDATE_CFLAGS -GEOIP_SERVER_LIBS -GEOIP_SERVER_CFLAGS GEOCLUE_LIBS GEOCLUE_CFLAGS GTK_DOC_USE_REBASE_FALSE @@ -679,11 +670,14 @@ GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +HAVE_GTK_DOC_FALSE +HAVE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE +GTKDOC_CHECK_PATH GTKDOC_CHECK GETTEXT_PACKAGE DATADIRNAME @@ -860,10 +854,9 @@ enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf -enable_geoip_server enable_3g_source enable_modem_gps_source -enable_wifi_source +enable_network_manager enable_demo_agent enable_compile_warnings enable_iso_c @@ -888,14 +881,10 @@ GTKDOC_DEPS_LIBS GEOCLUE_CFLAGS GEOCLUE_LIBS -GEOIP_SERVER_CFLAGS -GEOIP_SERVER_LIBS -GEOIP_DBUPDATE_CFLAGS -GEOIP_DBUPDATE_LIBS -ModemManager_CFLAGS -ModemManager_LIBS NetworkManager_CFLAGS NetworkManager_LIBS +ModemManager_CFLAGS +ModemManager_LIBS DEMO_AGENT_CFLAGS DEMO_AGENT_LIBS' @@ -1438,7 +1427,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 geoclue 2.1.7 to adapt to many kinds of systems. +\`configure' configures geoclue 2.1.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1508,7 +1497,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of geoclue 2.1.7:";; + short | recursive ) echo "Configuration of geoclue 2.1.8:";; esac cat <<\_ACEOF @@ -1534,12 +1523,11 @@ --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] - --enable-geoip-server=yes|no|auto - Build geoip server --disable-3g-source Disable 3G backend (requires ModemManager) --disable-modem-gps-source Disable modem GPS backend (requires ModemManager) - --disable-wifi-source Disable Wifi backend (requires ModemManager) + --disable-network-manager + Disable use of NetworkManager) --enable-demo-agent=yes|no Build demo agent (default=no) --enable-compile-warnings=[no/minimum/yes/maximum/error] @@ -1585,22 +1573,14 @@ C compiler flags for GEOCLUE, overriding pkg-config GEOCLUE_LIBS linker flags for GEOCLUE, overriding pkg-config - GEOIP_SERVER_CFLAGS - C compiler flags for GEOIP_SERVER, overriding pkg-config - GEOIP_SERVER_LIBS - linker flags for GEOIP_SERVER, overriding pkg-config - GEOIP_DBUPDATE_CFLAGS - C compiler flags for GEOIP_DBUPDATE, overriding pkg-config - GEOIP_DBUPDATE_LIBS - linker flags for GEOIP_DBUPDATE, overriding pkg-config - ModemManager_CFLAGS - C compiler flags for ModemManager, overriding pkg-config - ModemManager_LIBS - linker flags for ModemManager, overriding pkg-config NetworkManager_CFLAGS C compiler flags for NetworkManager, overriding pkg-config NetworkManager_LIBS linker flags for NetworkManager, overriding pkg-config + ModemManager_CFLAGS + C compiler flags for ModemManager, overriding pkg-config + ModemManager_LIBS + linker flags for ModemManager, overriding pkg-config DEMO_AGENT_CFLAGS C compiler flags for DEMO_AGENT, overriding pkg-config DEMO_AGENT_LIBS @@ -1673,7 +1653,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -geoclue configure 2.1.7 +geoclue configure 2.1.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1951,7 +1931,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by geoclue $as_me 2.1.7, which was +It was created by geoclue $as_me 2.1.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2819,7 +2799,7 @@ # Define the identity of the package. PACKAGE='geoclue' - VERSION='2.1.7' + VERSION='2.1.8' cat >>confdefs.h <<_ACEOF @@ -12774,16 +12754,78 @@ - # Extract the first word of "gtkdoc-check", so it can be a program name with args. + gtk_doc_requires="gtk-doc >= 1.0" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 +$as_echo_n "checking for gtk-doc... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_gtk_doc=yes +else + have_gtk_doc=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 +$as_echo "$have_gtk_doc" >&6; } + + if test "$have_gtk_doc" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&5 +$as_echo "$as_me: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&2;} + fi + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GTKDOC_CHECK"; then + ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK+:} false; then : +if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : $as_echo_n "(cached) " >&6 else - case $GTKDOC_CHECK in + case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. + ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12793,7 +12835,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12804,10 +12846,10 @@ ;; esac fi -GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK -if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } +GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH +if test -n "$GTKDOC_CHECK_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 +$as_echo "$GTKDOC_CHECK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -12920,18 +12962,19 @@ fi - if test x$enable_gtk_doc = xyes; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - : -else - as_fn_error $? "You need to have gtk-doc >= 1.0 installed to build $PACKAGE_NAME" "$LINENO" 5 -fi - if test "x$PACKAGE_NAME" != "xglib"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + as_fn_error $? " + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 + fi + + if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 @@ -13003,14 +13046,8 @@ $as_echo "yes" >&6; } fi - fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } - # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; @@ -13035,6 +13072,14 @@ fi + if test x$have_gtk_doc = xyes; then + HAVE_GTK_DOC_TRUE= + HAVE_GTK_DOC_FALSE='#' +else + HAVE_GTK_DOC_TRUE='#' + HAVE_GTK_DOC_FALSE= +fi + if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' @@ -13232,260 +13277,84 @@ fi -# Geoip server -# Check whether --enable-geoip-server was given. -if test "${enable_geoip_server+set}" = set; then : - enableval=$enable_geoip_server; enable_geoip_server=$enableval +# 3G source +# Check whether --enable-3g-source was given. +if test "${enable_3g_source+set}" = set; then : + enableval=$enable_3g_source; build_3g_source=$enableval else - enable_geoip_server=auto + build_3g_source=yes fi -case "x$enable_geoip_server" in - xyes) +if test "$build_3g_source" = "yes"; then + build_modem_source=yes -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOIP_SERVER" >&5 -$as_echo_n "checking for GEOIP_SERVER... " >&6; } +$as_echo "#define GCLUE_USE_3G_SOURCE 1" >>confdefs.h -if test -n "$GEOIP_SERVER_CFLAGS"; then - pkg_cv_GEOIP_SERVER_CFLAGS="$GEOIP_SERVER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - json-glib-1.0 >= \$JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEOIP_SERVER_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes else - pkg_failed=yes -fi - else - pkg_failed=untried + +$as_echo "#define GCLUE_USE_3G_SOURCE 0" >>confdefs.h + fi -if test -n "$GEOIP_SERVER_LIBS"; then - pkg_cv_GEOIP_SERVER_LIBS="$GEOIP_SERVER_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - json-glib-1.0 >= \$JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEOIP_SERVER_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes + if test "$build_3g_source" = "yes"; then + BUILD_3G_SOURCE_TRUE= + BUILD_3G_SOURCE_FALSE='#' else - pkg_failed=yes -fi - else - pkg_failed=untried + BUILD_3G_SOURCE_TRUE='#' + BUILD_3G_SOURCE_FALSE= fi - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# GPS source +# Check whether --enable-modem-gps-source was given. +if test "${enable_modem_gps_source+set}" = set; then : + enableval=$enable_modem_gps_source; build_modem_gps_source=$enableval else - _pkg_short_errors_supported=no + build_modem_gps_source=yes fi - if test $_pkg_short_errors_supported = yes; then - GEOIP_SERVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>&1` - else - GEOIP_SERVER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GEOIP_SERVER_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION) were not met: - -$GEOIP_SERVER_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 GEOIP_SERVER_CFLAGS -and GEOIP_SERVER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +if test "$build_modem_gps_source" = "yes"; then + build_modem_source=yes -Alternatively, you may set the environment variables GEOIP_SERVER_CFLAGS -and GEOIP_SERVER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +$as_echo "#define GCLUE_USE_MODEM_GPS_SOURCE 1" >>confdefs.h -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } else - GEOIP_SERVER_CFLAGS=$pkg_cv_GEOIP_SERVER_CFLAGS - GEOIP_SERVER_LIBS=$pkg_cv_GEOIP_SERVER_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - build_geoip_server="yes" - ;; - xauto) -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOIP_SERVER" >&5 -$as_echo_n "checking for GEOIP_SERVER... " >&6; } +$as_echo "#define GCLUE_USE_MODEM_GPS_SOURCE 0" >>confdefs.h -if test -n "$GEOIP_SERVER_CFLAGS"; then - pkg_cv_GEOIP_SERVER_CFLAGS="$GEOIP_SERVER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - json-glib-1.0 >= \$JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEOIP_SERVER_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried fi -if test -n "$GEOIP_SERVER_LIBS"; then - pkg_cv_GEOIP_SERVER_LIBS="$GEOIP_SERVER_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - json-glib-1.0 >= \$JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEOIP_SERVER_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes + if test "$build_modem_gps_source" = "yes"; then + BUILD_MODEM_GPS_SOURCE_TRUE= + BUILD_MODEM_GPS_SOURCE_FALSE='#' else - pkg_failed=yes -fi - else - pkg_failed=untried + BUILD_MODEM_GPS_SOURCE_TRUE='#' + BUILD_MODEM_GPS_SOURCE_FALSE= fi - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# NetworkManager +# Check whether --enable-network-manager was given. +if test "${enable_network_manager+set}" = set; then : + enableval=$enable_network_manager; use_nm=$enableval else - _pkg_short_errors_supported=no + use_nm=yes fi - if test $_pkg_short_errors_supported = yes; then - GEOIP_SERVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>&1` - else - GEOIP_SERVER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GEOIP_SERVER_PKG_ERRORS" >&5 - build_geoip_server=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - build_geoip_server=no -else - GEOIP_SERVER_CFLAGS=$pkg_cv_GEOIP_SERVER_CFLAGS - GEOIP_SERVER_LIBS=$pkg_cv_GEOIP_SERVER_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - build_geoip_server=yes -fi - ;; - xno) - build_geoip_server="xno" - ;; - x*) - as_fn_error $? "Unknown --enable-geoip-server argument: $enable_geoip_server" "$LINENO" 5 - ;; -esac -if test "x$build_geoip_server" = "xyes"; then - # Requires for the database update +if test "$use_nm" = "yes"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOIP_DBUPDATE" >&5 -$as_echo_n "checking for GEOIP_DBUPDATE... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetworkManager" >&5 +$as_echo_n "checking for NetworkManager... " >&6; } -if test -n "$GEOIP_DBUPDATE_CFLAGS"; then - pkg_cv_GEOIP_DBUPDATE_CFLAGS="$GEOIP_DBUPDATE_CFLAGS" +if test -n "$NetworkManager_CFLAGS"; then + pkg_cv_NetworkManager_CFLAGS="$NetworkManager_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - libsoup-2.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnm-glib >= \$LIBNM_GLIB_MIN_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnm-glib >= $LIBNM_GLIB_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GEOIP_DBUPDATE_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4" 2>/dev/null` + pkg_cv_NetworkManager_CFLAGS=`$PKG_CONFIG --cflags "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13493,19 +13362,16 @@ else pkg_failed=untried fi -if test -n "$GEOIP_DBUPDATE_LIBS"; then - pkg_cv_GEOIP_DBUPDATE_LIBS="$GEOIP_DBUPDATE_LIBS" +if test -n "$NetworkManager_LIBS"; then + pkg_cv_NetworkManager_LIBS="$NetworkManager_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_MIN_VERSION - libsoup-2.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnm-glib >= \$LIBNM_GLIB_MIN_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnm-glib >= $LIBNM_GLIB_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GEOIP_DBUPDATE_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4" 2>/dev/null` + pkg_cv_NetworkManager_LIBS=`$PKG_CONFIG --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13526,25 +13392,22 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GEOIP_DBUPDATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4" 2>&1` + NetworkManager_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>&1` else - GEOIP_DBUPDATE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4" 2>&1` + NetworkManager_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GEOIP_DBUPDATE_PKG_ERRORS" >&5 + echo "$NetworkManager_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4) were not met: + as_fn_error $? "Package requirements (libnm-glib >= $LIBNM_GLIB_MIN_VERSION) were not met: -$GEOIP_DBUPDATE_PKG_ERRORS +$NetworkManager_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 GEOIP_DBUPDATE_CFLAGS -and GEOIP_DBUPDATE_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables NetworkManager_CFLAGS +and NetworkManager_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13555,119 +13418,28 @@ 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 GEOIP_DBUPDATE_CFLAGS -and GEOIP_DBUPDATE_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables NetworkManager_CFLAGS +and NetworkManager_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 - GEOIP_DBUPDATE_CFLAGS=$pkg_cv_GEOIP_DBUPDATE_CFLAGS - GEOIP_DBUPDATE_LIBS=$pkg_cv_GEOIP_DBUPDATE_LIBS + NetworkManager_CFLAGS=$pkg_cv_NetworkManager_CFLAGS + NetworkManager_LIBS=$pkg_cv_NetworkManager_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi - GEOIP_DATABASE_PATH=`$PKG_CONFIG --variable=databasedir geoip` - -$as_echo "#define BUILD_GEOIP_SERVER 1" >>confdefs.h +$as_echo "#define GCLUE_USE_NETWORK_MANAGER 1" >>confdefs.h else -$as_echo "#define BUILD_GEOIP_SERVER 0" >>confdefs.h - -fi - if test "x$build_geoip_server" = "xyes"; then - BUILD_GEOIP_SERVER_TRUE= - BUILD_GEOIP_SERVER_FALSE='#' -else - BUILD_GEOIP_SERVER_TRUE='#' - BUILD_GEOIP_SERVER_FALSE= -fi - - -# 3G source -# Check whether --enable-3g-source was given. -if test "${enable_3g_source+set}" = set; then : - enableval=$enable_3g_source; build_3g_source=$enableval -else - build_3g_source=yes -fi - -if test "$build_3g_source" = "yes"; then - build_modem_source=yes - -$as_echo "#define GCLUE_USE_3G_SOURCE 1" >>confdefs.h +$as_echo "#define GCLUE_USE_NETWORK_MANAGER 0" >>confdefs.h -else - -$as_echo "#define GCLUE_USE_3G_SOURCE 0" >>confdefs.h - -fi - if test "$build_3g_source" = "yes"; then - BUILD_3G_SOURCE_TRUE= - BUILD_3G_SOURCE_FALSE='#' -else - BUILD_3G_SOURCE_TRUE='#' - BUILD_3G_SOURCE_FALSE= -fi - - -# GPS source -# Check whether --enable-modem-gps-source was given. -if test "${enable_modem_gps_source+set}" = set; then : - enableval=$enable_modem_gps_source; build_modem_gps_source=$enableval -else - build_modem_gps_source=yes -fi - -if test "$build_modem_gps_source" = "yes"; then - build_modem_source=yes - -$as_echo "#define GCLUE_USE_MODEM_GPS_SOURCE 1" >>confdefs.h - -else - -$as_echo "#define GCLUE_USE_MODEM_GPS_SOURCE 0" >>confdefs.h - -fi - if test "$build_modem_gps_source" = "yes"; then - BUILD_MODEM_GPS_SOURCE_TRUE= - BUILD_MODEM_GPS_SOURCE_FALSE='#' -else - BUILD_MODEM_GPS_SOURCE_TRUE='#' - BUILD_MODEM_GPS_SOURCE_FALSE= -fi - - -# Wifi source -# Check whether --enable-wifi-source was given. -if test "${enable_wifi_source+set}" = set; then : - enableval=$enable_wifi_source; build_wifi_source=$enableval -else - build_wifi_source=yes -fi - -if test "$build_wifi_source" = "yes"; then - require_networkmanager=yes - -$as_echo "#define GCLUE_USE_WIFI_SOURCE 1" >>confdefs.h - -else - -$as_echo "#define GCLUE_USE_WIFI_SOURCE 0" >>confdefs.h - -fi - if test "$build_wifi_source" = "yes"; then - BUILD_WIFI_SOURCE_TRUE= - BUILD_WIFI_SOURCE_FALSE='#' -else - BUILD_WIFI_SOURCE_TRUE='#' - BUILD_WIFI_SOURCE_FALSE= fi - # Modem source is used in common by GPS and 3G sources if test "$build_modem_source" = "yes"; then require_modemmanager=yes @@ -13776,101 +13548,6 @@ fi fi -# Check for NetworkManager if one of the sources requires it -if test "$require_networkmanager" = "yes"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetworkManager" >&5 -$as_echo_n "checking for NetworkManager... " >&6; } - -if test -n "$NetworkManager_CFLAGS"; then - pkg_cv_NetworkManager_CFLAGS="$NetworkManager_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnm-glib >= \$LIBNM_GLIB_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnm-glib >= $LIBNM_GLIB_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_NetworkManager_CFLAGS=`$PKG_CONFIG --cflags "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$NetworkManager_LIBS"; then - pkg_cv_NetworkManager_LIBS="$NetworkManager_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnm-glib >= \$LIBNM_GLIB_MIN_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnm-glib >= $LIBNM_GLIB_MIN_VERSION") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_NetworkManager_LIBS=`$PKG_CONFIG --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - NetworkManager_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>&1` - else - NetworkManager_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnm-glib >= $LIBNM_GLIB_MIN_VERSION" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$NetworkManager_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libnm-glib >= $LIBNM_GLIB_MIN_VERSION) were not met: - -$NetworkManager_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 NetworkManager_CFLAGS -and NetworkManager_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables NetworkManager_CFLAGS -and NetworkManager_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 - NetworkManager_CFLAGS=$pkg_cv_NetworkManager_CFLAGS - NetworkManager_LIBS=$pkg_cv_NetworkManager_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi -fi - # Demo agent # Check whether --enable-demo-agent was given. if test "${enable_demo_agent+set}" = set; then : @@ -14257,7 +13934,7 @@ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` -ac_config_files="$ac_config_files Makefile build-aux/Makefile src/Makefile src/geoclue-$GEOCLUE_API_VERSION.pc:src/geoclue.pc.in src/agent/Makefile src/geocode-glib/Makefile src/public-api/Makefile src/geoip-server/Makefile po/Makefile.in data/org.freedesktop.GeoClue2.conf data/Makefile demo/Makefile docs/Makefile docs/version.xml" +ac_config_files="$ac_config_files Makefile build-aux/Makefile src/Makefile src/geoclue-$GEOCLUE_API_VERSION.pc:src/geoclue.pc.in src/agent/Makefile src/geocode-glib/Makefile src/public-api/Makefile po/Makefile.in data/org.freedesktop.GeoClue2.conf data/Makefile demo/Makefile docs/Makefile docs/version.xml" cat >confcache <<\_ACEOF @@ -14401,6 +14078,10 @@ ac_config_commands="$ac_config_commands po/stamp-it" +if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14421,10 +14102,6 @@ as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_GEOIP_SERVER_TRUE}" && test -z "${BUILD_GEOIP_SERVER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_GEOIP_SERVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${BUILD_3G_SOURCE_TRUE}" && test -z "${BUILD_3G_SOURCE_FALSE}"; then as_fn_error $? "conditional \"BUILD_3G_SOURCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14433,10 +14110,6 @@ as_fn_error $? "conditional \"BUILD_MODEM_GPS_SOURCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_WIFI_SOURCE_TRUE}" && test -z "${BUILD_WIFI_SOURCE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_WIFI_SOURCE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${BUILD_MODEM_SOURCE_TRUE}" && test -z "${BUILD_MODEM_SOURCE_FALSE}"; then as_fn_error $? "conditional \"BUILD_MODEM_SOURCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14846,7 +14519,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by geoclue $as_me 2.1.7, which was +This file was extended by geoclue $as_me 2.1.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14913,7 +14586,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -geoclue config.status 2.1.7 +geoclue config.status 2.1.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -15329,7 +15002,6 @@ "src/agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/agent/Makefile" ;; "src/geocode-glib/Makefile") CONFIG_FILES="$CONFIG_FILES src/geocode-glib/Makefile" ;; "src/public-api/Makefile") CONFIG_FILES="$CONFIG_FILES src/public-api/Makefile" ;; - "src/geoip-server/Makefile") CONFIG_FILES="$CONFIG_FILES src/geoip-server/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "data/org.freedesktop.GeoClue2.conf") CONFIG_FILES="$CONFIG_FILES data/org.freedesktop.GeoClue2.conf" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; @@ -16724,7 +16396,6 @@ systemdsystemunitdir: ${systemdsystemunitdir} 3G source: ${build_3g_source} - Wifi source: ${build_wifi_source} Modem GPS source: ${build_modem_gps_source} " >&5 $as_echo "$as_me: @@ -16737,6 +16408,5 @@ systemdsystemunitdir: ${systemdsystemunitdir} 3G source: ${build_3g_source} - Wifi source: ${build_wifi_source} Modem GPS source: ${build_modem_gps_source} " >&6;} diff -Nru geoclue-2.0-2.1.7/configure.ac geoclue-2.0-2.1.8/configure.ac --- geoclue-2.0-2.1.7/configure.ac 2014-03-25 02:17:35.000000000 +0000 +++ geoclue-2.0-2.1.8/configure.ac 2014-04-15 21:14:15.000000000 +0000 @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) AC_INIT([geoclue], - [2.1.7], + [2.1.8], [http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue], [geoclue], [http://www.freedesktop.org/wiki/Software/GeoClue]) @@ -60,49 +60,6 @@ libxml-2.0 >= $LIBXML_MIN_VERSION ]) -# Geoip server -AC_ARG_ENABLE(geoip-server, - AS_HELP_STRING([--enable-geoip-server=yes|no|auto], [Build geoip server]), - [enable_geoip_server=$enableval], - [enable_geoip_server=auto]) -case "x$enable_geoip_server" in - xyes) - PKG_CHECK_MODULES(GEOIP_SERVER, - gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION) - build_geoip_server="yes" - ;; - xauto) - PKG_CHECK_MODULES(GEOIP_SERVER, - gio-2.0 >= $GLIB_MIN_VERSION - json-glib-1.0 >= $JSON_GLIB_MIN_VERSION - libsoup-2.4 - geoip >= GEOIP_MIN_VERSION, - [build_geoip_server=yes], - [build_geoip_server=no]) - ;; - xno) - build_geoip_server="xno" - ;; - x*) - AC_MSG_ERROR([Unknown --enable-geoip-server argument: $enable_geoip_server]) - ;; -esac -if test "x$build_geoip_server" = "xyes"; then - # Requires for the database update - PKG_CHECK_MODULES(GEOIP_DBUPDATE, - gio-2.0 >= $GLIB_MIN_VERSION - libsoup-2.4) - GEOIP_DATABASE_PATH=`$PKG_CONFIG --variable=databasedir geoip` - AC_SUBST(GEOIP_DATABASE_PATH) - AC_DEFINE([BUILD_GEOIP_SERVER], [1], [Build geoip server?]) -else - AC_DEFINE([BUILD_GEOIP_SERVER], [0], [Build geoip server?]) -fi -AM_CONDITIONAL([BUILD_GEOIP_SERVER], [test "x$build_geoip_server" = "xyes"]) - # 3G source AC_ARG_ENABLE(3g-source, AS_HELP_STRING([--disable-3g-source], [Disable 3G backend (requires ModemManager)]), @@ -127,17 +84,16 @@ fi AM_CONDITIONAL([BUILD_MODEM_GPS_SOURCE], [test "$build_modem_gps_source" = "yes"]) -# Wifi source -AC_ARG_ENABLE(wifi-source, - AS_HELP_STRING([--disable-wifi-source], [Disable Wifi backend (requires ModemManager)]), - [build_wifi_source=$enableval], [build_wifi_source=yes]) -if test "$build_wifi_source" = "yes"; then - require_networkmanager=yes - AC_DEFINE([GCLUE_USE_WIFI_SOURCE], [1], [Build Wifi source?]) +# NetworkManager +AC_ARG_ENABLE(network-manager, + AS_HELP_STRING([--disable-network-manager], [Disable use of NetworkManager)]), + [use_nm=$enableval], [use_nm=yes]) +if test "$use_nm" = "yes"; then + PKG_CHECK_MODULES(NetworkManager, libnm-glib >= $LIBNM_GLIB_MIN_VERSION) + AC_DEFINE([GCLUE_USE_NETWORK_MANAGER], [1], [Use NetowrkManager?]) else - AC_DEFINE([GCLUE_USE_WIFI_SOURCE], [0], [Build Wifi source?]) + AC_DEFINE([GCLUE_USE_NETWORK_MANAGER], [0], [Use NetowrkManager?]) fi -AM_CONDITIONAL([BUILD_WIFI_SOURCE], [test "$build_wifi_source" = "yes"]) # Modem source is used in common by GPS and 3G sources if test "$build_modem_source" = "yes"; then @@ -150,11 +106,6 @@ PKG_CHECK_MODULES(ModemManager, mm-glib >= $LIBMM_GLIB_MIN_VERSION) fi -# Check for NetworkManager if one of the sources requires it -if test "$require_networkmanager" = "yes"; then - PKG_CHECK_MODULES(NetworkManager, libnm-glib >= $LIBNM_GLIB_MIN_VERSION) -fi - # Demo agent AC_ARG_ENABLE(demo-agent, AS_HELP_STRING([--enable-demo-agent=yes|no], @@ -233,7 +184,6 @@ src/agent/Makefile src/geocode-glib/Makefile src/public-api/Makefile - src/geoip-server/Makefile po/Makefile.in data/org.freedesktop.GeoClue2.conf data/Makefile @@ -255,6 +205,5 @@ systemdsystemunitdir: ${systemdsystemunitdir} 3G source: ${build_3g_source} - Wifi source: ${build_wifi_source} Modem GPS source: ${build_modem_gps_source} ]) diff -Nru geoclue-2.0-2.1.7/data/geoclue.conf.in geoclue-2.0-2.1.8/data/geoclue.conf.in --- geoclue-2.0-2.1.7/data/geoclue.conf.in 2014-01-29 20:49:33.000000000 +0000 +++ geoclue-2.0-2.1.8/data/geoclue.conf.in 2014-04-10 16:32:05.000000000 +0000 @@ -19,6 +19,11 @@ # each time it gets a GPS lock. #submission-url=https://location.services.mozilla.com/v1/submit?key=geoclue +# A nickname to submit network data with. This is currently used for leaderboard: +# https://location.services.mozilla.com/leaders +# A nickname must be 2-32 characters long. +#submission-nick=geoclue + # To use the Google geolocation service instead of mozilla's, simply uncomment # this url while changing API_KEY to your Google API key and comment out or # remove the url above. @@ -39,7 +44,7 @@ # # info access, separate by ';'. Keep it empty for allowing it for all users. # users= -[gnome-settings-daemon] +[gnome-datetime-panel] allowed=true users= diff -Nru geoclue-2.0-2.1.7/data/Makefile.in geoclue-2.0-2.1.8/data/Makefile.in --- geoclue-2.0-2.1.7/data/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/data/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -83,10 +83,10 @@ $(srcdir)/org.freedesktop.GeoClue2.conf.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -181,16 +181,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ diff -Nru geoclue-2.0-2.1.7/debian/changelog geoclue-2.0-2.1.8/debian/changelog --- geoclue-2.0-2.1.7/debian/changelog 2014-04-28 14:23:20.000000000 +0000 +++ geoclue-2.0-2.1.8/debian/changelog 2014-05-05 11:22:13.000000000 +0000 @@ -1,8 +1,15 @@ -geoclue-2.0 (2.1.7-1~trusty1) trusty; urgency=medium +geoclue-2.0 (2.1.8-1~trusty1) trusty; urgency=medium * Copied from utopic - -- Rico Tzschichholz Mon, 28 Apr 2014 16:23:20 +0200 + -- Rico Tzschichholz Mon, 05 May 2014 13:22:13 +0200 + +geoclue-2.0 (2.1.8-1) unstable; urgency=medium + + * [be92d2de] Imported Upstream version 2.1.8 + * [cd6b5b05] Rename --disable-wifi-source flag to --disable-network-manager + + -- Laurent Bigonville Sun, 04 May 2014 21:14:19 +0200 geoclue-2.0 (2.1.7-1) unstable; urgency=medium diff -Nru geoclue-2.0-2.1.7/debian/rules geoclue-2.0-2.1.8/debian/rules --- geoclue-2.0-2.1.7/debian/rules 2014-04-03 20:26:04.000000000 +0000 +++ geoclue-2.0-2.1.8/debian/rules 2014-05-04 19:14:25.000000000 +0000 @@ -4,7 +4,7 @@ ifneq ($(DEB_BUILD_ARCH_OS),linux) MM_NM_FLAGS := --disable-3g-source \ --disable-modem-gps-source \ - --disable-wifi-source + --disable-network-manager endif override_dh_auto_configure: diff -Nru geoclue-2.0-2.1.7/demo/geoclue-demo-agent.desktop.in geoclue-2.0-2.1.8/demo/geoclue-demo-agent.desktop.in --- geoclue-2.0-2.1.7/demo/geoclue-demo-agent.desktop.in 2014-03-01 19:55:21.000000000 +0000 +++ geoclue-2.0-2.1.8/demo/geoclue-demo-agent.desktop.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -[Desktop Entry] -_Name=Geoclue Demo agent -_GenericName=Demo geoclue agent -_Keywords=geolocation; -Exec=/usr/libexec/geoclue-2.0/demos/agent -Icon=mark-location-symbolic -NoDisplay=true -Terminal=false -Type=Application diff -Nru geoclue-2.0-2.1.7/demo/geoclue-where-am-i.desktop.in geoclue-2.0-2.1.8/demo/geoclue-where-am-i.desktop.in --- geoclue-2.0-2.1.7/demo/geoclue-where-am-i.desktop.in 2014-03-01 19:55:21.000000000 +0000 +++ geoclue-2.0-2.1.8/demo/geoclue-where-am-i.desktop.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -[Desktop Entry] -_Name=Where am I? -_GenericName=Demo geolocation application -_Comment=Find your current location -_Keywords=geolocation; -Exec=/usr/libexec/geoclue-2.0/demos/where-am-i -Icon=mark-location-symbolic -NoDisplay=true -Terminal=true -Type=Application diff -Nru geoclue-2.0-2.1.7/demo/Makefile.am geoclue-2.0-2.1.8/demo/Makefile.am --- geoclue-2.0-2.1.7/demo/Makefile.am 2014-03-01 19:55:01.000000000 +0000 +++ geoclue-2.0-2.1.8/demo/Makefile.am 2014-04-10 00:17:43.000000000 +0000 @@ -43,13 +43,13 @@ EXTRA_DIST = \ geoclue-demo-agent.desktop.in.in \ - geoclue-demo-agent.desktop.in \ geoclue-where-am-i.desktop.in.in \ - geoclue-where-am-i.desktop.in \ $(NULL) DISTCLEANFILES = \ geoclue-demo-agent.desktop \ + geoclue-demo-agent.desktop.in \ geoclue-where-am-i.desktop \ + geoclue-where-am-i.desktop.in \ $(NULL) diff -Nru geoclue-2.0-2.1.7/demo/Makefile.in geoclue-2.0-2.1.8/demo/Makefile.in --- geoclue-2.0-2.1.7/demo/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/demo/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -86,10 +86,10 @@ $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -242,16 +242,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -400,14 +396,14 @@ EXTRA_DIST = \ geoclue-demo-agent.desktop.in.in \ - geoclue-demo-agent.desktop.in \ geoclue-where-am-i.desktop.in.in \ - geoclue-where-am-i.desktop.in \ $(NULL) DISTCLEANFILES = \ geoclue-demo-agent.desktop \ + geoclue-demo-agent.desktop.in \ geoclue-where-am-i.desktop \ + geoclue-where-am-i.desktop.in \ $(NULL) all: all-am diff -Nru geoclue-2.0-2.1.7/demo/where-am-i.c geoclue-2.0-2.1.8/demo/where-am-i.c --- geoclue-2.0-2.1.7/demo/where-am-i.c 2014-01-24 15:44:32.000000000 +0000 +++ geoclue-2.0-2.1.8/demo/where-am-i.c 2014-04-11 14:30:54.000000000 +0000 @@ -52,7 +52,7 @@ { GDBusProxy *location = G_DBUS_PROXY (source_object); GVariant *value; - gdouble latitude, longitude, accuracy; + gdouble latitude, longitude, accuracy, altitude; const char *desc; gsize desc_len; GError *error = NULL; @@ -70,12 +70,16 @@ longitude = g_variant_get_double (value); value = g_dbus_proxy_get_cached_property (location, "Accuracy"); accuracy = g_variant_get_double (value); + value = g_dbus_proxy_get_cached_property (location, "Altitude"); + altitude = g_variant_get_double (value); g_print ("\nNew location:\n"); g_print ("Latitude: %f\nLongitude: %f\nAccuracy (in meters): %f\n", latitude, longitude, accuracy); + if (altitude != -G_MAXDOUBLE) + g_print ("Altitude (in meters): %f\n", altitude); value = g_dbus_proxy_get_cached_property (location, "Description"); desc = g_variant_get_string (value, &desc_len); diff -Nru geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Agent.xml geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Agent.xml --- geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Agent.xml 2014-02-16 15:13:09.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Agent.xml 2014-04-15 21:16:54.000000000 +0000 @@ -24,7 +24,7 @@ Description This is the interface all application-authorizing agents must implement. There must be a separate agent object for every logged-in user on path - "/org/freedesktop/GeoClue2/Agent/${UID}". + "/org/freedesktop/GeoClue2/Agent". diff -Nru geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Client.xml geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Client.xml --- geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Client.xml 2014-02-16 15:13:09.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Client.xml 2014-04-15 21:16:54.000000000 +0000 @@ -26,6 +26,7 @@ DistanceThreshold readwrite u DesktopId readwrite s RequestedAccuracyLevel readwrite u +Active readable b @@ -129,6 +130,19 @@ and/or how much accuracy user agrees to be confortable with. + + The "Active" property + org.freedesktop.GeoClue2.Client:Active + +Active readable b + + If client is active, i-e started successfully using + Start() and receiving location updates. + Please keep in mind that geoclue can at any time stop and start the + client on user (agent) request. Applications that are interested in + in these changes, should watch for changes in this property. + + diff -Nru geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Location.xml geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Location.xml --- geoclue-2.0-2.1.7/docs/docs-org.freedesktop.GeoClue2.Location.xml 2014-02-16 15:13:09.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/docs-org.freedesktop.GeoClue2.Location.xml 2014-04-15 21:16:54.000000000 +0000 @@ -11,6 +11,7 @@ Latitude readable d Longitude readable d Accuracy readable d +Altitude readable d Description readable s @@ -48,6 +49,16 @@ The accuracy of the location fix, in meters. + + The "Altitude" property + org.freedesktop.GeoClue2.Location:Altitude + +Altitude readable d + + The altitude of the location fix, in meters. When unknown, its set to + minimum double value, -1.7976931348623157e+308. + + The "Description" property org.freedesktop.GeoClue2.Location:Description diff -Nru geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Agent.html geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Agent.html --- geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Agent.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Agent.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,32 +2,27 @@ -org.freedesktop.GeoClue2.Agent +Geoclue Reference Manual: org.freedesktop.GeoClue2.Agent - + - - - - - - - - - - + + + + + + +
@@ -35,7 +30,7 @@

org.freedesktop.GeoClue2.Agent

org.freedesktop.GeoClue2.Agent — The GeoClue agent interface

- +

Methods

@@ -56,7 +51,7 @@

Description

This is the interface all application-authorizing agents must implement. There must be a separate agent object for every logged-in user on path - "/org/freedesktop/GeoClue2/Agent/${UID}". + "/org/freedesktop/GeoClue2/Agent".

@@ -84,7 +79,7 @@

IN u req_accuracy_level:

-

The level of location accuracy requested by client, as GClueAccuracyLevel.

+

The level of location accuracy requested by client, as GClueAccuracyLevel.

OUT b authorized:

@@ -92,7 +87,7 @@

OUT u allowed_accuracy_level:

-

The level of location accuracy allowed for client, as GClueAccuracyLevel.

+

The level of location accuracy allowed for client, as GClueAccuracyLevel.

@@ -107,7 +102,7 @@

The global maximum level of accuracy allowed for all clients. Since agents are per-user, this can be different for each user. See - GClueAccuracyLevel for + GClueAccuracyLevel for possible values.

@@ -115,6 +110,6 @@ + Generated by GTK-Doc V1.20 \ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Client.html geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Client.html --- geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Client.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Client.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,34 +2,28 @@ -org.freedesktop.GeoClue2.Client +Geoclue Reference Manual: org.freedesktop.GeoClue2.Client - + - - - - - - - - - - + + + + + + +
@@ -37,7 +31,7 @@

org.freedesktop.GeoClue2.Client

org.freedesktop.GeoClue2.Client — The Application-specific client API

- +

Methods

@@ -60,6 +54,7 @@ DistanceThreshold readwrite u DesktopId readwrite s RequestedAccuracyLevel readwrite u +Active readable b
@@ -160,17 +155,31 @@ RequestedAccuracyLevel readwrite u

The level of accuracy requested by client, as - GClueAccuracyLevel. + GClueAccuracyLevel.

Please keep in mind that the actual accuracy of location information is dependent on available hardware on your machine, external resources and/or how much accuracy user agrees to be confortable with.

+
+
+

The "Active" property

+
+Active  readable   b
+
+

If client is active, i-e started successfully using + Start() and receiving location updates. +

+

Please keep in mind that geoclue can at any time stop and start the + client on user (agent) request. Applications that are interested in + in these changes, should watch for changes in this property. +

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Location.html geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Location.html --- geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Location.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Location.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,31 +2,27 @@ -org.freedesktop.GeoClue2.Location +Geoclue Reference Manual: org.freedesktop.GeoClue2.Location - + - - - - - - - - - - + + + + + + +
@@ -34,7 +30,7 @@

org.freedesktop.GeoClue2.Location

org.freedesktop.GeoClue2.Location — The Location interface

- +

Properties

@@ -42,6 +38,7 @@ Latitude readable d Longitude readable d Accuracy readable d +Altitude readable d Description readable s
@@ -80,6 +77,16 @@

+

The "Altitude" property

+
+Altitude  readable   d
+
+

The altitude of the location fix, in meters. When unknown, its set to + minimum double value, -1.7976931348623157e+308. +

+
+
+

The "Description" property

 Description  readable   s
@@ -96,6 +103,6 @@
 
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Manager.html geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Manager.html --- geoclue-2.0-2.1.7/docs/html/gdbus-org.freedesktop.GeoClue2.Manager.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/gdbus-org.freedesktop.GeoClue2.Manager.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,32 +2,27 @@ -org.freedesktop.GeoClue2.Manager +Geoclue Reference Manual: org.freedesktop.GeoClue2.Manager - + - - - - - - - - - - + + + + + + +
@@ -35,7 +30,7 @@

org.freedesktop.GeoClue2.Manager

org.freedesktop.GeoClue2.Manager — The GeoClue service manager

- +

Methods

@@ -119,13 +114,13 @@ AvailableAccuracyLevel readable u

The level of available accuracy, as - GClueAccuracyLevel. + GClueAccuracyLevel.

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/geoclue.devhelp2 geoclue-2.0-2.1.8/docs/html/geoclue.devhelp2 --- geoclue-2.0-2.1.7/docs/html/geoclue.devhelp2 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/geoclue.devhelp2 2014-04-15 21:16:57.000000000 +0000 @@ -26,17 +26,14 @@ + + - + - - - - - diff -Nru geoclue-2.0-2.1.7/docs/html/geoclue-gclue-enums.html geoclue-2.0-2.1.8/docs/html/geoclue-gclue-enums.html --- geoclue-2.0-2.1.7/docs/html/geoclue-gclue-enums.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/geoclue-gclue-enums.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,32 +2,27 @@ -gclue-enums +Geoclue Reference Manual: gclue-enums - + - - - - - - - - - - + + + + + + +
@@ -35,18 +30,25 @@

gclue-enums

gclue-enums

- +
-
-

Synopsis

-
enum                GClueAccuracyLevel;
-
+
+

Types and Values

+
++++ + + + + +
enumGClueAccuracyLevel

Object Hierarchy

-
-  GEnum
-   +----GClueAccuracyLevel
+
    GEnum
+    ╰── GClueAccuracyLevel
 
@@ -55,59 +57,72 @@

-

Details

+

Functions

+
+
+

Types and Values

-

enum GClueAccuracyLevel

-
typedef enum {
-/*< underscore_name=gclue_accuracy_level>*/
-        GCLUE_ACCURACY_LEVEL_COUNTRY = 1,
-        GCLUE_ACCURACY_LEVEL_CITY = 4,
-        GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD = 5,
-        GCLUE_ACCURACY_LEVEL_STREET = 6,
-        GCLUE_ACCURACY_LEVEL_EXACT = 8,
-} GClueAccuracyLevel;
-
-

-Used to specify level of accuracy requested by, or allowed for a client. -

-
+

enum GClueAccuracyLevel

+

Used to specify level of accuracy requested by, or allowed for a client.

+
+

Members

+
--+++ - - + + - - + + - - + + - - + + - - + + + + + + +

GCLUE_ACCURACY_LEVEL_COUNTRY

Country-level accuracy. +

GCLUE_ACCURACY_LEVEL_NONE

+

Accuracy level unknown or unset.

 

GCLUE_ACCURACY_LEVEL_CITY

City-level accuracy. +

GCLUE_ACCURACY_LEVEL_COUNTRY

+

Country-level accuracy.

 

GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD

neighborhood-level accuracy. +

GCLUE_ACCURACY_LEVEL_CITY

+

City-level accuracy.

 

GCLUE_ACCURACY_LEVEL_STREET

Street-level accuracy. +

GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD

+

neighborhood-level accuracy.

 

GCLUE_ACCURACY_LEVEL_EXACT

Exact accuracy. Typically requires GPS receiver. +

GCLUE_ACCURACY_LEVEL_STREET

+

Street-level accuracy.

 

GCLUE_ACCURACY_LEVEL_EXACT

+

Exact accuracy. Typically requires GPS receiver.

+
 
+
+ Generated by GTK-Doc V1.20 \ No newline at end of file Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/home.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/home.png differ diff -Nru geoclue-2.0-2.1.7/docs/html/index.html geoclue-2.0-2.1.8/docs/html/index.html --- geoclue-2.0-2.1.7/docs/html/index.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/index.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,11 +2,11 @@ -Geoclue Reference Manual +Geoclue Reference Manual: Geoclue Reference Manual - + @@ -22,7 +22,7 @@     
  

-

Version 2.1.7 +

Version 2.1.8

@@ -83,6 +83,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/index.sgml geoclue-2.0-2.1.8/docs/html/index.sgml --- geoclue-2.0-2.1.7/docs/html/index.sgml 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/index.sgml 2014-04-15 21:16:57.000000000 +0000 @@ -18,25 +18,22 @@ + + - - + - - - - - - - + + + diff -Nru geoclue-2.0-2.1.7/docs/html/ix01.html geoclue-2.0-2.1.8/docs/html/ix01.html --- geoclue-2.0-2.1.7/docs/html/ix01.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/ix01.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,22 +2,22 @@ -Index +Geoclue Reference Manual: Index - + - - - - - - + + + + + +

@@ -45,6 +45,8 @@
org.freedesktop.GeoClue2.Client::LocationUpdated, The "LocationUpdated" signal
+
org.freedesktop.GeoClue2.Client:Active, The "Active" property +
org.freedesktop.GeoClue2.Client:DesktopId, The "DesktopId" property
org.freedesktop.GeoClue2.Client:DistanceThreshold, The "DistanceThreshold" property @@ -57,7 +59,7 @@

G

-
GClueAccuracyLevel, enum GClueAccuracyLevel +
GClueAccuracyLevel, enum GClueAccuracyLevel
@@ -67,6 +69,8 @@
org.freedesktop.GeoClue2.Location:Accuracy, The "Accuracy" property
+
org.freedesktop.GeoClue2.Location:Altitude, The "Altitude" property +
org.freedesktop.GeoClue2.Location:Description, The "Description" property
org.freedesktop.GeoClue2.Location:Latitude, The "Latitude" property @@ -94,6 +98,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/left-insensitive.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/left-insensitive.png differ Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/left.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/left.png differ diff -Nru geoclue-2.0-2.1.7/docs/html/license.html geoclue-2.0-2.1.8/docs/html/license.html --- geoclue-2.0-2.1.7/docs/html/license.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/license.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,21 +2,21 @@ -Appendix A. License +Geoclue Reference Manual: Appendix A. License - + - - - - - - + + + + + +

@@ -857,6 +857,6 @@

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/ref-agent-dbus.html geoclue-2.0-2.1.8/docs/html/ref-agent-dbus.html --- geoclue-2.0-2.1.7/docs/html/ref-agent-dbus.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/ref-agent-dbus.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,22 +2,22 @@ -Agent D-Bus API Reference +Geoclue Reference Manual: Agent D-Bus API Reference - + - - - - - - + + + + + +
@@ -41,6 +41,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff -Nru geoclue-2.0-2.1.7/docs/html/ref-dbus.html geoclue-2.0-2.1.8/docs/html/ref-dbus.html --- geoclue-2.0-2.1.7/docs/html/ref-dbus.html 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/ref-dbus.html 2014-04-15 21:16:57.000000000 +0000 @@ -2,22 +2,22 @@ -D-Bus API Reference +Geoclue Reference Manual: D-Bus API Reference - + - - - - - - + + + + + +
@@ -52,6 +52,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/right-insensitive.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/right-insensitive.png differ Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/right.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/right.png differ diff -Nru geoclue-2.0-2.1.7/docs/html/style.css geoclue-2.0-2.1.8/docs/html/style.css --- geoclue-2.0-2.1.7/docs/html/style.css 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/html/style.css 2014-04-15 21:16:57.000000000 +0000 @@ -1,15 +1,23 @@ +body +{ + font-family: cantarell, sans-serif; +} .synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; - border: solid 1px #d3d7cf; + background: rgba(238, 238, 236, 0.5); + border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ + /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; + background: rgba(114, 159, 207, 0.1); + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist @@ -27,7 +35,6 @@ { position: relative; top: 0em ! important; - } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] @@ -46,16 +53,20 @@ */ body { - padding-top: 3.2em; - padding-bottom: 20em; + padding-top: 5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; @@ -65,21 +76,57 @@ } .navigation a, .navigation a:visited { - /* tango:scarlet red 3 */ - color: #a40000; + /* tango:sky blue 3 */ + color: #204a87; } .navigation a:hover { - /* tango:scarlet red 1 */ - color: #ef2929; + /* tango:sky blue 2 */ + color: #3465a4; } td.shortcuts { - /* tango:scarlet red 1 */ - color: #ef2929; + /* tango:sky blue 2 */ + color: #3465a4; font-size: 80%; white-space: nowrap; } + td.shortcuts .dim + { + color: #babdb6; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } } @media print { table.navigation { @@ -89,9 +136,8 @@ div.titlepage table.navigation { visibility: visible; display: table; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; + background: #e2e2e2; + border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; @@ -102,7 +148,7 @@ .navigation .title { - font-size: 200%; + font-size: 120%; } div.gallery-float @@ -132,6 +178,67 @@ color: #729fcf; } +div.informaltable table +{ + border-collapse: separate; + border-spacing: 20px 3px; + border: none; +} + +div.informaltable table td, div.informaltable table th +{ + vertical-align: top; +} + +.function_type, +.variable_type, +.property_type, +.signal_type, +.parameter_name, +.struct_member_name, +.union_member_name, +.define_keyword, +.datatype_keyword, +.typedef_keyword +{ + text-align: right; +} + +/* dim non-primary columns */ +.c_punctuation, +.function_type, +.variable_type, +.property_type, +.signal_type, +.define_keyword, +.datatype_keyword, +.typedef_keyword, +.property_flags, +.signal_flags, +.parameter_annotations, +.enum_member_annotations, +.struct_member_annotations, +.union_member_annotations +{ + color: #888a85; +} + +.function_type a, +.function_type a:visited, +.function_type a:hover, +.property_type a, +.property_type a:visited, +.property_type a:hover, +.signal_type a, +.signal_type a:visited, +.signal_type a:hover, +.signal_flags a, +.signal_flags a:visited, +.signal_flags a:hover +{ + color: #729fcf; +} + div.table table { border-collapse: collapse; @@ -154,14 +261,43 @@ background-color: #d3d7cf; } +h4 +{ + color: #555753; +} + hr { - /* tango:aluminium 3 */ - color: #babdb6; - background: #babdb6; + /* tango:aluminium 1 */ + color: #d3d7cf; + background: #d3d7cf; border: none 0px; height: 1px; clear: both; + margin: 2.0em 0em 2.0em 0em; +} + +dl.toc dt +{ + padding-bottom: 0.25em; +} + +dl.toc > dd > dl > dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; +} + +dl.toc > dt +{ + padding-top: 1em; + padding-bottom: 0.5em; + font-weight: bold; +} + +.parameter +{ + font-style: normal; } .footer @@ -173,31 +309,70 @@ font-size: 80%; } +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + .warning { /* tango:orange 0/1 */ background: #ffeed9; + background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; } -.note, .warning +.note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; + margin: 2em; } -.note h3, .warning h3 +.note p, .warning p { - margin-top: 0.0em + margin: 0; } -.note p, .warning p + +div.warning h3.title, +div.note h3.title { - margin-bottom: 0.0em + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; } /* blob links */ @@ -210,11 +385,22 @@ font-weight: normal; } +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + .annotation { /* tango:aluminium 5 */ color: #555753; - font-size: 80%; + font-weight: normal; +} + +.structfield +{ + font-style: normal; font-weight: normal; } @@ -237,6 +423,7 @@ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } @@ -246,19 +433,27 @@ padding: 0.5em; } .listing_lines { + /* this just adds visual clutter and + takes precious room from small screens */ + display: none; +} +.listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; + background: none; } .listing_lines pre, .listing_code pre { margin: 0px; Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/up-insensitive.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/up-insensitive.png differ Binary files /tmp/YHEYCKyyiM/geoclue-2.0-2.1.7/docs/html/up.png and /tmp/lrknE8R3m_/geoclue-2.0-2.1.8/docs/html/up.png differ diff -Nru geoclue-2.0-2.1.7/docs/Makefile.in geoclue-2.0-2.1.8/docs/Makefile.in --- geoclue-2.0-2.1.7/docs/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -88,10 +88,10 @@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -154,16 +154,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -379,7 +375,7 @@ @ENABLE_GTK_DOC_FALSE@ docs-org.freedesktop.GeoClue2.Agent.xml \ @ENABLE_GTK_DOC_FALSE@ $(NULL) @ENABLE_GTK_DOC_TRUE@CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) \ -@ENABLE_GTK_DOC_TRUE@ $(DOC_STAMPS) \ +@ENABLE_GTK_DOC_TRUE@ $(DOC_STAMPS) gtkdoc-check.test \ @ENABLE_GTK_DOC_TRUE@ docs-org.freedesktop.GeoClue2.Manager.xml \ @ENABLE_GTK_DOC_TRUE@ docs-org.freedesktop.GeoClue2.Client.xml \ @ENABLE_GTK_DOC_TRUE@ docs-org.freedesktop.GeoClue2.Location.xml \ @@ -545,11 +541,11 @@ @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -@ENABLE_GTK_DOC_FALSE@maintainer-clean-local: -@ENABLE_GTK_DOC_FALSE@install-data-local: -@ENABLE_GTK_DOC_FALSE@uninstall-local: @ENABLE_GTK_DOC_FALSE@clean-local: +@ENABLE_GTK_DOC_FALSE@install-data-local: @ENABLE_GTK_DOC_FALSE@distclean-local: +@ENABLE_GTK_DOC_FALSE@uninstall-local: +@ENABLE_GTK_DOC_FALSE@maintainer-clean-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -643,8 +639,15 @@ docs-org.freedesktop.GeoClue2.Agent.xml: cp $(top_srcdir)/src/agent/docs-org.freedesktop.GeoClue2.Agent.xml . -@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -#all-local: +@ENABLE_GTK_DOC_TRUE@gtkdoc-check.test: Makefile +@ENABLE_GTK_DOC_TRUE@ $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ +@ENABLE_GTK_DOC_TRUE@ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ +@ENABLE_GTK_DOC_TRUE@ chmod +x $@ + +@ENABLE_GTK_DOC_TRUE@all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +@ENABLE_GTK_DOC_TRUE@.PHONY: all-gtk-doc + +@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc @ENABLE_GTK_DOC_TRUE@docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @@ -655,17 +658,19 @@ @ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ @ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ @ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ +@ENABLE_GTK_DOC_TRUE@ destdir=`dirname $(abs_builddir)/$$file` ;\ +@ENABLE_GTK_DOC_TRUE@ test -d "$$destdir" || mkdir -p "$$destdir"; \ @ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ -@ENABLE_GTK_DOC_TRUE@ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ +@ENABLE_GTK_DOC_TRUE@ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ test -d $(abs_srcdir)/tmpl && \ -@ENABLE_GTK_DOC_TRUE@ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ +@ENABLE_GTK_DOC_TRUE@ { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ @ENABLE_GTK_DOC_TRUE@ chmod -R u+w $(abs_builddir)/tmpl; } \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch setup-build.stamp -@ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) +@ENABLE_GTK_DOC_TRUE@scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_SCAN)_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ @ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @@ -695,7 +700,7 @@ @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ @ENABLE_GTK_DOC_TRUE@ if test -w $(abs_srcdir) ; then \ -@ENABLE_GTK_DOC_TRUE@ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ +@ENABLE_GTK_DOC_TRUE@ cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ @ENABLE_GTK_DOC_TRUE@ fi \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch tmpl-build.stamp @@ -707,7 +712,7 @@ @ENABLE_GTK_DOC_TRUE@ @true @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) -@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)-chmod -R u+w $(srcdir) && _source_dir='' ; \ +@ENABLE_GTK_DOC_TRUE@ -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ @ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @@ -769,6 +774,9 @@ @ENABLE_GTK_DOC_TRUE@clean-local: @ENABLE_GTK_DOC_TRUE@ @rm -f *~ *.bak @ENABLE_GTK_DOC_TRUE@ @rm -rf .libs +@ENABLE_GTK_DOC_TRUE@ @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ +@ENABLE_GTK_DOC_TRUE@ rm -f $(DOC_MODULE).types; \ +@ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@distclean-local: @ENABLE_GTK_DOC_TRUE@ @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ @@ -814,12 +822,14 @@ # # Require gtk-doc when making dist # -@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -#dist-check-gtkdoc: -# @echo "*** gtk-doc must be installed and enabled in order to make dist" -# @false +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" +@ENABLE_GTK_DOC_TRUE@@HAVE_GTK_DOC_FALSE@ @false -@ENABLE_GTK_DOC_TRUE@dist-hook: dist-check-gtkdoc dist-hook-local +@ENABLE_GTK_DOC_TRUE@dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @ENABLE_GTK_DOC_TRUE@ @mkdir $(distdir)/tmpl @ENABLE_GTK_DOC_TRUE@ @mkdir $(distdir)/html @ENABLE_GTK_DOC_TRUE@ @-cp ./tmpl/*.sgml $(distdir)/tmpl diff -Nru geoclue-2.0-2.1.7/docs/tmpl/gclue-enums.sgml geoclue-2.0-2.1.8/docs/tmpl/gclue-enums.sgml --- geoclue-2.0-2.1.7/docs/tmpl/gclue-enums.sgml 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/tmpl/gclue-enums.sgml 2014-04-15 21:16:57.000000000 +0000 @@ -9,11 +9,13 @@ + + @@ -25,6 +27,7 @@ +@GCLUE_ACCURACY_LEVEL_NONE: @GCLUE_ACCURACY_LEVEL_COUNTRY: @GCLUE_ACCURACY_LEVEL_CITY: @GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD: diff -Nru geoclue-2.0-2.1.7/docs/tmpl/gclue-enum-types.sgml geoclue-2.0-2.1.8/docs/tmpl/gclue-enum-types.sgml --- geoclue-2.0-2.1.7/docs/tmpl/gclue-enum-types.sgml 2014-03-25 02:19:56.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/tmpl/gclue-enum-types.sgml 2014-04-15 21:16:57.000000000 +0000 @@ -9,11 +9,13 @@ + + diff -Nru geoclue-2.0-2.1.7/docs/version.xml geoclue-2.0-2.1.8/docs/version.xml --- geoclue-2.0-2.1.7/docs/version.xml 2014-03-25 02:19:47.000000000 +0000 +++ geoclue-2.0-2.1.8/docs/version.xml 2014-04-15 21:16:09.000000000 +0000 @@ -1 +1 @@ -2.1.7 +2.1.8 diff -Nru geoclue-2.0-2.1.7/gtk-doc.make geoclue-2.0-2.1.8/gtk-doc.make --- geoclue-2.0-2.1.7/gtk-doc.make 2013-05-26 12:37:34.000000000 +0000 +++ geoclue-2.0-2.1.8/gtk-doc.make 2014-02-14 08:29:12.000000000 +0000 @@ -49,9 +49,13 @@ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test -if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else @@ -63,9 +67,11 @@ PDF_BUILD_STAMP= endif -all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -else -all-local: +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +if ENABLE_GTK_DOC +all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @@ -83,12 +89,14 @@ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file` ;\ + test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ - { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ + { cp -pR $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp @@ -103,7 +111,7 @@ GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @@ -139,7 +147,7 @@ $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ - cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ + cp -pR $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi $(AM_V_at)touch tmpl-build.stamp @@ -157,7 +165,7 @@ GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - $(GTK_DOC_V_XML)-chmod -R u+w $(srcdir) && _source_dir='' ; \ + -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ @@ -235,6 +243,9 @@ clean-local: @rm -f *~ *.bak @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ @@ -280,15 +291,17 @@ # # Require gtk-doc when making dist # -if ENABLE_GTK_DOC +if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" + @echo "*** gtk-doc is needed to run 'make dist'. ***" + @echo "*** gtk-doc was not found when 'configure' ran. ***" + @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif -dist-hook: dist-check-gtkdoc dist-hook-local +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl diff -Nru geoclue-2.0-2.1.7/m4/gtk-doc.m4 geoclue-2.0-2.1.8/m4/gtk-doc.m4 --- geoclue-2.0-2.1.7/m4/gtk-doc.m4 2012-12-14 16:23:01.000000000 +0000 +++ geoclue-2.0-2.1.8/m4/gtk-doc.m4 2014-02-09 16:44:01.000000000 +0000 @@ -1,6 +1,6 @@ dnl -*- mode: autoconf -*- -# serial 1 +# serial 2 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) @@ -10,8 +10,24 @@ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) @@ -28,22 +44,22 @@ [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - dnl don't check for glib if we build glib - if test "x$PACKAGE_NAME" != "xglib"; then - dnl don't fail if someone does not have glib - PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) - fi - fi - AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], @@ -63,6 +79,7 @@ fi AC_SUBST([AM_DEFAULT_VERBOSITY]) + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) diff -Nru geoclue-2.0-2.1.7/m4/intltool.m4 geoclue-2.0-2.1.8/m4/intltool.m4 --- geoclue-2.0-2.1.7/m4/intltool.m4 2013-08-03 23:09:55.000000000 +0000 +++ geoclue-2.0-2.1.8/m4/intltool.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ -## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- -## Copyright (C) 2001 Eazel, Inc. -## Author: Maciej Stachowiak -## Kenneth Christiansen -## -## This program 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 2 of the License, or -## (at your option) any later version. -## -## 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 GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 42 IT_PROG_INTLTOOL -AC_DEFUN([IT_PROG_INTLTOOL], [ -AC_PREREQ([2.50])dnl -AC_REQUIRE([AM_NLS])dnl - -case "$am__api_version" in - 1.[01234]) - AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) - ;; - *) - ;; -esac - -INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` -INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -if test -n "$1"; then - AC_MSG_CHECKING([for intltool >= $1]) - AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) - test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) -fi - -AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) -AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) -AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) -if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then - AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) -fi - -if test -z "$AM_DEFAULT_VERBOSITY"; then - AM_DEFAULT_VERBOSITY=1 -fi -AC_SUBST([AM_DEFAULT_VERBOSITY]) - -INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' -INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' -INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' -AC_SUBST(INTLTOOL_V_MERGE) -AC_SUBST(INTLTOOL__v_MERGE_) -AC_SUBST(INTLTOOL__v_MERGE_0) - -INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' -intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' -intltool__v_merge_options_0='-q' -AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) -AC_SUBST(intltool__v_merge_options_) -AC_SUBST(intltool__v_merge_options_0) - - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' -else - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' -fi - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - -_IT_SUBST(INTLTOOL_DESKTOP_RULE) -_IT_SUBST(INTLTOOL_DIRECTORY_RULE) -_IT_SUBST(INTLTOOL_KEYS_RULE) -_IT_SUBST(INTLTOOL_PROP_RULE) -_IT_SUBST(INTLTOOL_OAF_RULE) -_IT_SUBST(INTLTOOL_PONG_RULE) -_IT_SUBST(INTLTOOL_SERVER_RULE) -_IT_SUBST(INTLTOOL_SHEET_RULE) -_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) -_IT_SUBST(INTLTOOL_UI_RULE) -_IT_SUBST(INTLTOOL_XAM_RULE) -_IT_SUBST(INTLTOOL_KBD_RULE) -_IT_SUBST(INTLTOOL_XML_RULE) -_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) -_IT_SUBST(INTLTOOL_CAVES_RULE) -_IT_SUBST(INTLTOOL_SCHEMAS_RULE) -_IT_SUBST(INTLTOOL_THEME_RULE) -_IT_SUBST(INTLTOOL_SERVICE_RULE) -_IT_SUBST(INTLTOOL_POLICY_RULE) - -# Check the gettext tools to make sure they are GNU -AC_PATH_PROG(XGETTEXT, xgettext) -AC_PATH_PROG(MSGMERGE, msgmerge) -AC_PATH_PROG(MSGFMT, msgfmt) -AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi -xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" -mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" -mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" -if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi - -AC_PATH_PROG(INTLTOOL_PERL, perl) -if test -z "$INTLTOOL_PERL"; then - AC_MSG_ERROR([perl not found]) -fi -AC_MSG_CHECKING([for perl >= 5.8.1]) -$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 -if test $? -ne 0; then - AC_MSG_ERROR([perl 5.8.1 is required for intltool]) -else - IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` - AC_MSG_RESULT([$IT_PERL_VERSION]) -fi -if test "x$2" != "xno-xml"; then - AC_MSG_CHECKING([for XML::Parser]) - if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then - AC_MSG_RESULT([ok]) - else - AC_MSG_ERROR([XML::Parser perl module is required for intltool]) - fi -fi - -# Substitute ALL_LINGUAS so we can use it in po/Makefile -AC_SUBST(ALL_LINGUAS) - -# Set DATADIRNAME correctly if it is not set yet -# (copied from glib-gettext.m4) -if test -z "$DATADIRNAME"; then - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]], - [[extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr]])], - [DATADIRNAME=share], - [case $host in - *-*-solaris*) - dnl On Solaris, if bind_textdomain_codeset is in libc, - dnl GNU format message catalog is always supported, - dnl since both are added to the libc all together. - dnl Hence, we'd like to go with DATADIRNAME=share - dnl in this case. - AC_CHECK_FUNC(bind_textdomain_codeset, - [DATADIRNAME=share], [DATADIRNAME=lib]) - ;; - *) - [DATADIRNAME=lib] - ;; - esac]) -fi -AC_SUBST(DATADIRNAME) - -IT_PO_SUBDIR([po]) - -]) - - -# IT_PO_SUBDIR(DIRNAME) -# --------------------- -# All po subdirs have to be declared with this macro; the subdir "po" is -# declared by IT_PROG_INTLTOOL. -# -AC_DEFUN([IT_PO_SUBDIR], -[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. -dnl -dnl The following CONFIG_COMMANDS should be executed at the very end -dnl of config.status. -AC_CONFIG_COMMANDS_PRE([ - AC_CONFIG_COMMANDS([$1/stamp-it], [ - if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then - AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) - fi - rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" - >"$1/stamp-it.tmp" - [sed '/^#/d - s/^[[].*] *// - /^[ ]*$/d - '"s|^| $ac_top_srcdir/|" \ - "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" - ] - [sed '/^POTFILES =/,/[^\\]$/ { - /^POTFILES =/!d - r $1/POTFILES - } - ' "$1/Makefile.in" >"$1/Makefile"] - rm -f "$1/Makefile.tmp" - mv "$1/stamp-it.tmp" "$1/stamp-it" - ]) -])dnl -]) - -# _IT_SUBST(VARIABLE) -# ------------------- -# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST -# -AC_DEFUN([_IT_SUBST], -[ -AC_SUBST([$1]) -m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) -] -) - -# deprecated macros -AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) -# A hint is needed for aclocal from Automake <= 1.9.4: -# AC_DEFUN([AC_PROG_INTLTOOL], ...) - diff -Nru geoclue-2.0-2.1.7/Makefile.in geoclue-2.0-2.1.8/Makefile.in --- geoclue-2.0-2.1.7/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -89,10 +89,10 @@ $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -235,16 +235,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ diff -Nru geoclue-2.0-2.1.7/NEWS geoclue-2.0-2.1.8/NEWS --- geoclue-2.0-2.1.7/NEWS 2014-03-25 02:13:41.000000000 +0000 +++ geoclue-2.0-2.1.8/NEWS 2014-04-15 21:13:44.000000000 +0000 @@ -1,3 +1,38 @@ +2.1.8 +===== + +- Switch to Mozilla Location Service for geoip as well. +- Allow specifying nickname to submit network data with. +- Report actual available accuracy level and keep it up2date. +- Add 'Active' property to indicate client state. +- Expose altitude info (if known). +- Timeout on inactivity, rather than no clients. +- Automatically: + - stop the client if max accuracy level is set to 0. + - start the client if max accuracy level is set to non-0 and it was + automatically stopped. +- Don't disable modem after using it. Disabling the modem, disables it for + everyone so if there was an active connection going on through the modem, + geoclue will cause it to disconnect. While we need to have some centralized + means to enable/disable modem and ideally geoclue shouldn't do any + enabling/disabling of modems at all, for now lets just only enable the + modem. +- Fix issue of missed location updates. +- Whitelist correct ID for gnome-settings-daemon in default config. +- Replace '--disable-wifi-source' configure option with + '--disable-network-manager'. i-e now you disable usage of NetworkManger + explicitly rather than wifi source, which is now always built and enabled. +- Drop now redundant geoip server. +- Don't distribute .desktop.in files for demos. +- Plug some leaks. +- More debug log. +- Other minor fixes. + +All contributors to this release: + +Kalev Lember +Zeeshan Ali (Khattak) + 2.1.7 ===== diff -Nru geoclue-2.0-2.1.7/src/agent/geoclue-agent-interface.c geoclue-2.0-2.1.8/src/agent/geoclue-agent-interface.c --- geoclue-2.0-2.1.7/src/agent/geoclue-agent-interface.c 2014-03-11 12:25:10.000000000 +0000 +++ geoclue-2.0-2.1.8/src/agent/geoclue-agent-interface.c 2014-04-15 21:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.38.2. DO NOT EDIT. + * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -556,10 +556,16 @@ static void gclue_agent_proxy_iface_init (GClueAgentIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueAgentProxy, gclue_agent_proxy, G_TYPE_DBUS_PROXY, G_ADD_PRIVATE (GClueAgentProxy) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_AGENT, gclue_agent_proxy_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueAgentProxy, gclue_agent_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_AGENT, gclue_agent_proxy_iface_init)); + +#endif static void gclue_agent_proxy_finalize (GObject *object) { @@ -599,14 +605,20 @@ { const _ExtendedGDBusPropertyInfo *info = user_data; GError *error; + GVariant *_ret; error = NULL; - if (!g_dbus_proxy_call_finish (proxy, res, &error)) + _ret = g_dbus_proxy_call_finish (proxy, res, &error); + if (!_ret) { g_warning ("Error setting property '%s' on interface org.freedesktop.GeoClue2.Agent: %s (%s, %d)", info->parent_struct.name, error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } + else + { + g_variant_unref (_ret); + } } static void @@ -717,7 +729,12 @@ static void gclue_agent_proxy_init (GClueAgentProxy *proxy) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 proxy->priv = gclue_agent_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GCLUE_TYPE_AGENT_PROXY, GClueAgentProxyPrivate); +#endif + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gclue_agent_interface_info ()); } @@ -736,8 +753,11 @@ proxy_class->g_signal = gclue_agent_proxy_g_signal; proxy_class->g_properties_changed = gclue_agent_proxy_g_properties_changed; - gclue_agent_override_properties (gobject_class, 1); + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueAgentProxyPrivate)); +#endif } static void @@ -1155,10 +1175,16 @@ } static void gclue_agent_skeleton_iface_init (GClueAgentIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueAgentSkeleton, gclue_agent_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_ADD_PRIVATE (GClueAgentSkeleton) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_AGENT, gclue_agent_skeleton_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueAgentSkeleton, gclue_agent_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_AGENT, gclue_agent_skeleton_iface_init)); + +#endif static void gclue_agent_skeleton_finalize (GObject *object) { @@ -1316,7 +1342,12 @@ static void gclue_agent_skeleton_init (GClueAgentSkeleton *skeleton) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 skeleton->priv = gclue_agent_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GCLUE_TYPE_AGENT_SKELETON, GClueAgentSkeletonPrivate); +#endif + g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); skeleton->priv->properties = g_new0 (GValue, 1); @@ -1354,6 +1385,10 @@ skeleton_class->get_properties = gclue_agent_skeleton_dbus_interface_get_properties; skeleton_class->flush = gclue_agent_skeleton_dbus_interface_flush; skeleton_class->get_vtable = gclue_agent_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueAgentSkeletonPrivate)); +#endif } static void diff -Nru geoclue-2.0-2.1.7/src/agent/geoclue-agent-interface.h geoclue-2.0-2.1.8/src/agent/geoclue-agent-interface.h --- geoclue-2.0-2.1.7/src/agent/geoclue-agent-interface.h 2014-03-11 12:25:10.000000000 +0000 +++ geoclue-2.0-2.1.8/src/agent/geoclue-agent-interface.h 2014-04-15 21:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.38.2. DO NOT EDIT. + * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff -Nru geoclue-2.0-2.1.7/src/agent/Makefile.in geoclue-2.0-2.1.8/src/agent/Makefile.in --- geoclue-2.0-2.1.7/src/agent/Makefile.in 2014-03-25 02:19:45.000000000 +0000 +++ geoclue-2.0-2.1.8/src/agent/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -84,10 +84,10 @@ subdir = src/agent ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -229,16 +229,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ diff -Nru geoclue-2.0-2.1.7/src/gclue-3g.c geoclue-2.0-2.1.8/src/gclue-3g.c --- geoclue-2.0-2.1.7/src/gclue-3g.c 2014-01-30 11:09:55.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-3g.c 2014-04-11 17:20:21.000000000 +0000 @@ -85,14 +85,14 @@ GClue3G *source = (GClue3G *) g3g; GClue3GPrivate *priv = source->priv; + G_OBJECT_CLASS (gclue_3g_parent_class)->finalize (g3g); + cancel_pending_query (source); g_clear_object (&priv->soup_session); g_cancellable_cancel (priv->cancellable); g_clear_object (&priv->cancellable); g_clear_object (&priv->location_3gpp); - - G_OBJECT_CLASS (gclue_3g_parent_class)->finalize (g3g); } static void @@ -346,6 +346,9 @@ return; } + if (!gclue_location_source_get_active (GCLUE_LOCATION_SOURCE (source))) + return; + if (location_3gpp == NULL) { g_debug ("No 3GPP"); return; diff -Nru geoclue-2.0-2.1.7/src/gclue-3g.h geoclue-2.0-2.1.8/src/gclue-3g.h --- geoclue-2.0-2.1.7/src/gclue-3g.h 2014-01-25 22:27:37.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-3g.h 2014-04-06 23:34:16.000000000 +0000 @@ -28,8 +28,6 @@ G_BEGIN_DECLS -#define GCLUE_3G_ACCURACY_LEVEL GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD - GType gclue_3g_get_type (void) G_GNUC_CONST; #define GCLUE_TYPE_3G (gclue_3g_get_type ()) diff -Nru geoclue-2.0-2.1.7/src/gclue-config.c geoclue-2.0-2.1.8/src/gclue-config.c --- geoclue-2.0-2.1.7/src/gclue-config.c 2014-02-15 17:38:17.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-config.c 2014-04-10 16:32:05.000000000 +0000 @@ -216,3 +216,21 @@ return url; } + +char * +gclue_config_get_wifi_submit_nick (GClueConfig *config) +{ + char *nick; + GError *error = NULL; + + nick = g_key_file_get_string (config->priv->key_file, + "wifi", + "submission-nick", + &error); + if (error != NULL) { + g_debug ("No wifi submission nick: %s", error->message); + g_error_free (error); + } + + return nick; +} diff -Nru geoclue-2.0-2.1.7/src/gclue-config.h geoclue-2.0-2.1.8/src/gclue-config.h --- geoclue-2.0-2.1.7/src/gclue-config.h 2014-01-29 20:49:33.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-config.h 2014-04-10 16:32:05.000000000 +0000 @@ -57,15 +57,16 @@ GType gclue_config_get_type (void) G_GNUC_CONST; -GClueConfig * gclue_config_get_singleton (void); -gboolean gclue_config_is_agent_allowed (GClueConfig *config, - const char *desktop_id, - GClueClientInfo *agent_info); -gboolean gclue_config_is_app_allowed (GClueConfig *config, - const char *desktop_id, - GClueClientInfo *app_info); -char * gclue_config_get_wifi_url (GClueConfig *config); -char * gclue_config_get_wifi_submit_url (GClueConfig *config); +GClueConfig * gclue_config_get_singleton (void); +gboolean gclue_config_is_agent_allowed (GClueConfig *config, + const char *desktop_id, + GClueClientInfo *agent_info); +gboolean gclue_config_is_app_allowed (GClueConfig *config, + const char *desktop_id, + GClueClientInfo *app_info); +char * gclue_config_get_wifi_url (GClueConfig *config); +char * gclue_config_get_wifi_submit_url (GClueConfig *config); +char * gclue_config_get_wifi_submit_nick (GClueConfig *config); G_END_DECLS diff -Nru geoclue-2.0-2.1.7/src/gclue-ipclient.c geoclue-2.0-2.1.8/src/gclue-ipclient.c --- geoclue-2.0-2.1.7/src/gclue-ipclient.c 2014-01-24 15:32:16.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-ipclient.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,280 +0,0 @@ -/* vim: set et ts=8 sw=8: */ -/* - * Copyright (C) 2013 Red Hat, Inc. - * Copyright (C) 2013 Satabdi Das - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Satabdi Das - * Zeeshan Ali (Khattak) - */ - -#include -#include -#include -#include -#include -#include "gclue-ipclient.h" -#include "gclue-error.h" -#include "geoip-server/geoip-server.h" - -#define GEOIP_SERVER "https://geoip.fedoraproject.org/city" - -/** - * SECTION:gclue-ipclient - * @short_description: GeoIP client - * @include: gclue-glib/gclue-ipclient.h - * - * Contains functions to get the geolocation corresponding to IP addresses from a server. - **/ - -struct _GClueIpclientPrivate { - char *ip; -}; - -static SoupMessage * -gclue_ipclient_create_query (GClueWebSource *source, - GError **error); -static GeocodeLocation * -gclue_ipclient_parse_response (GClueWebSource *source, - const char *json, - GError **error); - -G_DEFINE_TYPE (GClueIpclient, gclue_ipclient, GCLUE_TYPE_WEB_SOURCE) - -static void -gclue_ipclient_finalize (GObject *gipclient) -{ - GClueIpclient *ipclient = (GClueIpclient *) gipclient; - - g_free (ipclient->priv->ip); - - G_OBJECT_CLASS (gclue_ipclient_parent_class)->finalize (gipclient); -} - -static void -gclue_ipclient_class_init (GClueIpclientClass *klass) -{ - GClueWebSourceClass *source_class = GCLUE_WEB_SOURCE_CLASS (klass); - GObjectClass *gipclient_class = G_OBJECT_CLASS (klass); - - source_class->create_query = gclue_ipclient_create_query; - source_class->parse_response = gclue_ipclient_parse_response; - gipclient_class->finalize = gclue_ipclient_finalize; - - g_type_class_add_private (klass, sizeof (GClueIpclientPrivate)); -} - -static void -gclue_ipclient_init (GClueIpclient *ipclient) -{ - ipclient->priv = G_TYPE_INSTANCE_GET_PRIVATE ((ipclient), GCLUE_TYPE_IPCLIENT, GClueIpclientPrivate); -} - -static void -on_ipclient_destroyed (gpointer data, - GObject *where_the_object_was) -{ - GClueIpclient **ipclient = (GClueIpclient **) data; - - *ipclient = NULL; -} - -/** - * gclue_ipclient_get_singleton: - * - * Get the #GClueIpclient singleton. - * - * Returns: (transfer full): a new ref to #GClueIpclient. Use g_object_unref() - * when done. - **/ -GClueIpclient * -gclue_ipclient_get_singleton (void) -{ - static GClueIpclient *ipclient = NULL; - - if (ipclient == NULL) { - ipclient = g_object_new (GCLUE_TYPE_IPCLIENT, NULL); - g_object_weak_ref (G_OBJECT (ipclient), - on_ipclient_destroyed, - &ipclient); - } else - g_object_ref (ipclient); - - return ipclient; -} - -static SoupMessage * -gclue_ipclient_create_query (GClueWebSource *source, - GError **error) -{ - GClueIpclientPrivate *priv; - SoupMessage *ret; - char *uri; - - g_return_val_if_fail (GCLUE_IS_IPCLIENT (source), NULL); - priv = GCLUE_IPCLIENT (source)->priv; - - if (priv->ip) { - GHashTable *ht; - char *query_string; - - ht = g_hash_table_new (g_str_hash, g_str_equal); - g_hash_table_insert (ht, "ip", g_strdup (priv->ip)); - query_string = soup_form_encode_hash (ht); - g_hash_table_destroy (ht); - - uri = g_strdup_printf ("%s?%s", GEOIP_SERVER, query_string); - g_free (query_string); - } else - uri = g_strdup (GEOIP_SERVER); - - ret = soup_message_new ("GET", uri); - g_free (uri); - - return ret; -} - -static gboolean -parse_server_error (JsonObject *object, GError **error) -{ - GeoipServerError server_error_code; - int error_code; - const char *error_message; - - if (!json_object_has_member (object, "error_code")) - return FALSE; - - server_error_code = json_object_get_int_member (object, "error_code"); - switch (server_error_code) { - case INVALID_IP_ADDRESS_ERR: - error_code = GCLUE_ERROR_INVALID_ARGUMENTS; - break; - case INVALID_ENTRY_ERR: - error_code = GCLUE_ERROR_NO_MATCHES; - break; - case DATABASE_ERR: - error_code = GCLUE_ERROR_INTERNAL_SERVER; - break; - default: - g_assert_not_reached (); - } - - error_message = json_object_get_string_member (object, "error_message"); - - g_set_error_literal (error, - GCLUE_ERROR, - error_code, - error_message); - - return TRUE; -} - -static gdouble -get_accuracy_from_string (const char *str) -{ - if (strcmp (str, "street") == 0) - return GEOCODE_LOCATION_ACCURACY_STREET; - else if (strcmp (str, "city") == 0) - return GEOCODE_LOCATION_ACCURACY_CITY; - else if (strcmp (str, "region") == 0) - return GEOCODE_LOCATION_ACCURACY_REGION; - else if (strcmp (str, "country") == 0) - return GEOCODE_LOCATION_ACCURACY_COUNTRY; - else if (strcmp (str, "continent") == 0) - return GEOCODE_LOCATION_ACCURACY_CONTINENT; - else - return GEOCODE_LOCATION_ACCURACY_UNKNOWN; -} - -static gdouble -get_accuracy_from_json_location (JsonObject *object) -{ - if (json_object_has_member (object, "accuracy")) { - const char *str; - - str = json_object_get_string_member (object, "accuracy"); - return get_accuracy_from_string (str); - } else if (json_object_has_member (object, "street")) { - return GEOCODE_LOCATION_ACCURACY_STREET; - } else if (json_object_has_member (object, "city")) { - return GEOCODE_LOCATION_ACCURACY_CITY; - } else if (json_object_has_member (object, "region_name")) { - return GEOCODE_LOCATION_ACCURACY_REGION; - } else if (json_object_has_member (object, "country_name")) { - return GEOCODE_LOCATION_ACCURACY_COUNTRY; - } else if (json_object_has_member (object, "continent")) { - return GEOCODE_LOCATION_ACCURACY_CONTINENT; - } else { - return GEOCODE_LOCATION_ACCURACY_UNKNOWN; - } -} - -static GeocodeLocation * -gclue_ipclient_parse_response (GClueWebSource *source, - const char *json, - GError **error) -{ - JsonParser *parser; - JsonNode *node; - JsonObject *object; - GeocodeLocation *location; - gdouble latitude, longitude, accuracy; - char *desc = NULL; - - parser = json_parser_new (); - - if (!json_parser_load_from_data (parser, json, -1, error)) - return NULL; - - node = json_parser_get_root (parser); - object = json_node_get_object (node); - - if (parse_server_error (object, error)) - return NULL; - - latitude = json_object_get_double_member (object, "latitude"); - longitude = json_object_get_double_member (object, "longitude"); - accuracy = get_accuracy_from_json_location (object); - - location = geocode_location_new (latitude, longitude, accuracy); - - if (json_object_has_member (object, "country_name")) { - if (json_object_has_member (object, "region_name")) { - if (json_object_has_member (object, "city")) { - desc = g_strdup_printf ("%s, %s, %s", - json_object_get_string_member (object, "city"), - json_object_get_string_member (object, "region_name"), - json_object_get_string_member (object, "country_name")); - } else { - desc = g_strdup_printf ("%s, %s", - json_object_get_string_member (object, "region_name"), - json_object_get_string_member (object, "country_name")); - } - } else { - desc = g_strdup_printf ("%s", - json_object_get_string_member (object, "country_name")); - } - } - - if (desc != NULL) { - geocode_location_set_description (location, desc); - g_free (desc); - } - - g_object_unref (parser); - - return location; -} diff -Nru geoclue-2.0-2.1.7/src/gclue-ipclient.h geoclue-2.0-2.1.8/src/gclue-ipclient.h --- geoclue-2.0-2.1.7/src/gclue-ipclient.h 2014-01-24 15:44:45.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-ipclient.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* vim: set et ts=8 sw=8: */ -/* - * Copyright (C) 2013 Red Hat, Inc. - * Copyright (C) 2013 Satabdi Das - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Satabdi Das - * Zeeshan Ali (Khattak) - */ - -#ifndef GCLUE_IPCLIENT_H -#define GCLUE_IPCLIENT_H - -#include -#include -#include "gclue-web-source.h" - -G_BEGIN_DECLS - -#define GCLUE_IPCLIENT_ACCURACY_LEVEL GCLUE_ACCURACY_LEVEL_CITY - -GType gclue_ipclient_get_type (void) G_GNUC_CONST; - -#define GCLUE_TYPE_IPCLIENT (gclue_ipclient_get_type ()) -#define GCLUE_IPCLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCLUE_TYPE_IPCLIENT, GClueIpclient)) -#define GCLUE_IS_IPCLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCLUE_TYPE_IPCLIENT)) -#define GCLUE_IPCLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCLUE_TYPE_IPCLIENT, GClueIpclientClass)) -#define GCLUE_IS_IPCLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCLUE_TYPE_IPCLIENT)) -#define GCLUE_IPCLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCLUE_TYPE_IPCLIENT, GClueIpclientClass)) - -/** - * GClueIpclient: - * - * All the fields in the #GClueIpclient structure are private and should never be accessed directly. -**/ -typedef struct _GClueIpclient GClueIpclient; -typedef struct _GClueIpclientClass GClueIpclientClass; -typedef struct _GClueIpclientPrivate GClueIpclientPrivate; - -struct _GClueIpclient { - /* */ - GClueWebSource parent_instance; - GClueIpclientPrivate *priv; -}; - -/** - * GClueIpclientClass: - * - * All the fields in the #GClueIpclientClass structure are private and should never be accessed directly. -**/ -struct _GClueIpclientClass { - /* */ - GClueWebSourceClass parent_class; -}; - -GClueIpclient *gclue_ipclient_get_singleton (void); - -G_END_DECLS - -#endif /* GCLUE_IPCLIENT_H */ diff -Nru geoclue-2.0-2.1.7/src/gclue-location-source.c geoclue-2.0-2.1.8/src/gclue-location-source.c --- geoclue-2.0-2.1.7/src/gclue-location-source.c 2014-01-24 01:40:23.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-location-source.c 2014-04-06 23:34:16.000000000 +0000 @@ -30,17 +30,28 @@ * The interface all geolocation sources must implement. **/ +static gboolean +start_source (GClueLocationSource *source); +static gboolean +stop_source (GClueLocationSource *source); + G_DEFINE_ABSTRACT_TYPE (GClueLocationSource, gclue_location_source, G_TYPE_OBJECT) struct _GClueLocationSourcePrivate { GeocodeLocation *location; + + guint active_counter; + + GClueAccuracyLevel avail_accuracy_level; }; enum { PROP_0, PROP_LOCATION, + PROP_ACTIVE, + PROP_AVAILABLE_ACCURACY_LEVEL, LAST_PROP }; @@ -59,6 +70,15 @@ g_value_set_object (value, source->priv->location); break; + case PROP_ACTIVE: + g_value_set_boolean (value, + gclue_location_source_get_active (source)); + break; + + case PROP_AVAILABLE_ACCURACY_LEVEL: + g_value_set_enum (value, source->priv->avail_accuracy_level); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -81,19 +101,38 @@ break; } + case PROP_AVAILABLE_ACCURACY_LEVEL: + source->priv->avail_accuracy_level = g_value_get_enum (value); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } } static void +gclue_location_source_finalize (GObject *object) +{ + GClueLocationSourcePrivate *priv = GCLUE_LOCATION_SOURCE (object)->priv; + + gclue_location_source_stop (GCLUE_LOCATION_SOURCE (object)); + g_clear_object (&priv->location); + + G_OBJECT_CLASS (gclue_location_source_parent_class)->finalize (object); +} + +static void gclue_location_source_class_init (GClueLocationSourceClass *klass) { GObjectClass *object_class; + klass->start = start_source; + klass->stop = stop_source; + object_class = G_OBJECT_CLASS (klass); object_class->get_property = gclue_location_source_get_property; object_class->set_property = gclue_location_source_set_property; + object_class->finalize = gclue_location_source_finalize; g_type_class_add_private (object_class, sizeof (GClueLocationSourcePrivate)); gParamSpecs[PROP_LOCATION] = g_param_spec_object ("location", @@ -104,6 +143,26 @@ g_object_class_install_property (object_class, PROP_LOCATION, gParamSpecs[PROP_LOCATION]); + + gParamSpecs[PROP_ACTIVE] = g_param_spec_boolean ("active", + "Active", + "Active", + FALSE, + G_PARAM_READABLE); + g_object_class_install_property (object_class, + PROP_ACTIVE, + gParamSpecs[PROP_ACTIVE]); + + gParamSpecs[PROP_AVAILABLE_ACCURACY_LEVEL] = + g_param_spec_enum ("available-accuracy-level", + "AvailableAccuracyLevel", + "Available accuracy level", + GCLUE_TYPE_ACCURACY_LEVEL, + 0, + G_PARAM_READWRITE); + g_object_class_install_property (object_class, + PROP_AVAILABLE_ACCURACY_LEVEL, + gParamSpecs[PROP_AVAILABLE_ACCURACY_LEVEL]); } static void @@ -115,6 +174,72 @@ GClueLocationSourcePrivate); } +static gboolean +start_source (GClueLocationSource *source) +{ + source->priv->active_counter++; + if (source->priv->active_counter > 1) { + g_debug ("%s already active, not starting.", + G_OBJECT_TYPE_NAME (source)); + return FALSE; + } + + g_object_notify (G_OBJECT (source), "active"); + g_debug ("%s now active", G_OBJECT_TYPE_NAME (source)); + return TRUE; +} + +static gboolean +stop_source (GClueLocationSource *source) +{ + if (source->priv->active_counter == 0) { + g_debug ("%s already inactive, not stopping.", + G_OBJECT_TYPE_NAME (source)); + return FALSE; + } + + source->priv->active_counter--; + if (source->priv->active_counter > 0) { + g_debug ("%s still in use, not stopping.", + G_OBJECT_TYPE_NAME (source)); + return FALSE; + } + + g_object_notify (G_OBJECT (source), "active"); + g_debug ("%s now inactive", G_OBJECT_TYPE_NAME (source)); + + return TRUE; +} + +/** + * gclue_location_source_start: + * @source: a #GClueLocationSource + * + * Start searching for location and keep an eye on location changes. + **/ +void +gclue_location_source_start (GClueLocationSource *source) +{ + g_return_if_fail (GCLUE_IS_LOCATION_SOURCE (source)); + + GCLUE_LOCATION_SOURCE_GET_CLASS (source)->start (source); +} + +/** + * gclue_location_source_stop: + * @source: a #GClueLocationSource + * + * Stop searching for location and no need to keep an eye on location changes + * anymore. + **/ +void +gclue_location_source_stop (GClueLocationSource *source) +{ + g_return_if_fail (GCLUE_IS_LOCATION_SOURCE (source)); + + GCLUE_LOCATION_SOURCE_GET_CLASS (source)->stop (source); +} + /** * gclue_location_source_get_location: * @source: a #GClueLocationSource @@ -154,3 +279,31 @@ g_object_notify (G_OBJECT (source), "location"); } + +/** + * gclue_location_source_get_active: + * @source: a #GClueLocationSource + * + * Returns: TRUE if source is active, FALSE otherwise. + **/ +gboolean +gclue_location_source_get_active (GClueLocationSource *source) +{ + g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), FALSE); + + return (source->priv->active_counter > 0); +} + +/** + * gclue_location_source_get_available_accuracy_level: + * @source: a #GClueLocationSource + * + * Returns: The currently available accuracy level. + **/ +GClueAccuracyLevel +gclue_location_source_get_available_accuracy_level (GClueLocationSource *source) +{ + g_return_val_if_fail (GCLUE_IS_LOCATION_SOURCE (source), 0); + + return source->priv->avail_accuracy_level; +} diff -Nru geoclue-2.0-2.1.7/src/gclue-location-source.h geoclue-2.0-2.1.8/src/gclue-location-source.h --- geoclue-2.0-2.1.7/src/gclue-location-source.h 2014-01-24 01:07:46.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-location-source.h 2014-04-06 23:34:16.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include "public-api/gclue-enum-types.h" #include "geocode-glib/geocode-location.h" G_BEGIN_DECLS @@ -51,15 +52,25 @@ struct _GClueLocationSourceClass { GObjectClass parent_class; + + gboolean (*start) (GClueLocationSource *source); + gboolean (*stop) (GClueLocationSource *source); }; GType gclue_location_source_get_type (void) G_GNUC_CONST; +void gclue_location_source_start (GClueLocationSource *source); +void gclue_location_source_stop (GClueLocationSource *source); GeocodeLocation * gclue_location_source_get_location (GClueLocationSource *source); void gclue_location_source_set_location (GClueLocationSource *source, GeocodeLocation *location); +gboolean gclue_location_source_get_active + (GClueLocationSource *source); +GClueAccuracyLevel + gclue_location_source_get_available_accuracy_level + (GClueLocationSource *source); G_END_DECLS diff -Nru geoclue-2.0-2.1.7/src/gclue-locator.c geoclue-2.0-2.1.8/src/gclue-locator.c --- geoclue-2.0-2.1.7/src/gclue-locator.c 2014-02-13 15:17:05.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-locator.c 2014-04-12 19:56:43.000000000 +0000 @@ -25,12 +25,9 @@ #include #include "gclue-locator.h" -#include "gclue-ipclient.h" #include "public-api/gclue-enum-types.h" -#if GCLUE_USE_WIFI_SOURCE #include "gclue-wifi.h" -#endif #if GCLUE_USE_3G_SOURCE #include "gclue-3g.h" @@ -44,11 +41,17 @@ * location sources from rest of the code */ +static gboolean +gclue_locator_start (GClueLocationSource *source); +static gboolean +gclue_locator_stop (GClueLocationSource *source); + G_DEFINE_TYPE (GClueLocator, gclue_locator, GCLUE_TYPE_LOCATION_SOURCE) struct _GClueLocatorPrivate { GList *sources; + GList *active_sources; GClueAccuracyLevel accuracy_level; }; @@ -63,16 +66,13 @@ static GParamSpec *gParamSpecs[LAST_PROP]; static void -on_location_changed (GObject *gobject, - GParamSpec *pspec, - gpointer user_data) +set_location (GClueLocator *locator, + GeocodeLocation *location) { - GClueLocationSource *locator = GCLUE_LOCATION_SOURCE (user_data); - GClueLocationSource *source = GCLUE_LOCATION_SOURCE (gobject); - GeocodeLocation *location, *cur_location; + GeocodeLocation *cur_location; - cur_location = gclue_location_source_get_location (locator); - location = gclue_location_source_get_location (source); + cur_location = gclue_location_source_get_location + (GCLUE_LOCATION_SOURCE (locator)); g_debug ("New location available"); @@ -89,7 +89,106 @@ return; } - gclue_location_source_set_location (locator, location); + gclue_location_source_set_location (GCLUE_LOCATION_SOURCE (locator), + location); +} + +static void +refresh_available_accuracy_level (GClueLocator *locator) +{ + GList *node; + GClueAccuracyLevel new, existing; + + new = GCLUE_ACCURACY_LEVEL_NONE; + for (node = locator->priv->sources; node != NULL; node = node->next) { + GClueLocationSource *src; + GClueAccuracyLevel level; + + src = GCLUE_LOCATION_SOURCE (node->data); + level = gclue_location_source_get_available_accuracy_level (src); + if (level > new) + new = level; + } + existing = gclue_location_source_get_available_accuracy_level + (GCLUE_LOCATION_SOURCE (locator)); + + if (new != existing) + g_object_set (G_OBJECT (locator), + "available-accuracy-level", new, + NULL); +} + +static void +on_location_changed (GObject *gobject, + GParamSpec *pspec, + gpointer user_data) +{ + GClueLocator *locator = GCLUE_LOCATOR (user_data); + GClueLocationSource *source = GCLUE_LOCATION_SOURCE (gobject); + GeocodeLocation *location; + + location = gclue_location_source_get_location (source); + set_location (locator, location); +} + +static gboolean +is_source_active (GClueLocator *locator, + GClueLocationSource *src) +{ + return (g_list_find (locator->priv->active_sources, src) != NULL); +} + +static void +start_source (GClueLocator *locator, + GClueLocationSource *src) +{ + GeocodeLocation *location; + + g_signal_connect (G_OBJECT (src), + "notify::location", + G_CALLBACK (on_location_changed), + locator); + + location = gclue_location_source_get_location (src); + if (gclue_location_source_get_active (src) && location != NULL) + set_location (locator, location); + + gclue_location_source_start (src); +} + +static void +on_avail_accuracy_level_changed (GObject *gobject, + GParamSpec *pspec, + gpointer user_data) +{ + GClueLocationSource *src = GCLUE_LOCATION_SOURCE (gobject); + GClueLocator *locator = GCLUE_LOCATOR (user_data); + GClueLocatorPrivate *priv = locator->priv; + GClueAccuracyLevel level; + gboolean active; + + refresh_available_accuracy_level (locator); + + active = gclue_location_source_get_active + (GCLUE_LOCATION_SOURCE (locator)); + if (!active) + return; + + level = gclue_location_source_get_available_accuracy_level (src); + if (level != GCLUE_ACCURACY_LEVEL_NONE && + priv->accuracy_level >= level && + !is_source_active (locator, src)) { + start_source (locator, src); + } else if ((level == GCLUE_ACCURACY_LEVEL_NONE || + priv->accuracy_level > level) && + is_source_active (locator, src)) { + g_signal_handlers_disconnect_by_func (G_OBJECT (src), + G_CALLBACK (on_location_changed), + locator); + gclue_location_source_stop (src); + priv->active_sources = g_list_remove (priv->active_sources, + src); + } } static void @@ -133,11 +232,25 @@ { GClueLocator *locator = GCLUE_LOCATOR (gsource); GClueLocatorPrivate *priv = locator->priv; + GList *node; + G_OBJECT_CLASS (gclue_locator_parent_class)->finalize (gsource); + + for (node = locator->priv->sources; node != NULL; node = node->next) + g_signal_handlers_disconnect_by_func + (G_OBJECT (node->data), + G_CALLBACK (on_avail_accuracy_level_changed), + locator); + for (node = locator->priv->active_sources; node != NULL; node = node->next) { + g_signal_handlers_disconnect_by_func + (G_OBJECT (node->data), + G_CALLBACK (on_location_changed), + locator); + gclue_location_source_stop (GCLUE_LOCATION_SOURCE (node->data)); + } g_list_free_full (priv->sources, g_object_unref); priv->sources = NULL; - - G_OBJECT_CLASS (gclue_locator_parent_class)->finalize (gsource); + priv->active_sources = NULL; } static void @@ -147,60 +260,46 @@ GClueLocationSource *submit_source = NULL; GList *node; - if (locator->priv->accuracy_level >= GCLUE_IPCLIENT_ACCURACY_LEVEL) { - GClueIpclient *ipclient = gclue_ipclient_get_singleton (); - locator->priv->sources = g_list_append (locator->priv->sources, - ipclient); - } + G_OBJECT_CLASS (gclue_locator_parent_class)->constructed (object); + #if GCLUE_USE_3G_SOURCE - if (locator->priv->accuracy_level >= GCLUE_3G_ACCURACY_LEVEL) { - GClue3G *source = gclue_3g_get_singleton (); - locator->priv->sources = g_list_append (locator->priv->sources, - source); - } + GClue3G *source = gclue_3g_get_singleton (); + locator->priv->sources = g_list_append (locator->priv->sources, source); #endif -#if GCLUE_USE_WIFI_SOURCE - if (locator->priv->accuracy_level >= GCLUE_WIFI_ACCURACY_LEVEL) { - GClueWifi *wifi = gclue_wifi_get_singleton (); + if (locator->priv->accuracy_level >= GCLUE_ACCURACY_LEVEL_CITY) { + GClueWifi *wifi = gclue_wifi_get_singleton + (locator->priv->accuracy_level); locator->priv->sources = g_list_append (locator->priv->sources, wifi); } -#endif #if GCLUE_USE_MODEM_GPS_SOURCE - if (locator->priv->accuracy_level >= GCLUE_MODEM_GPS_ACCURACY_LEVEL) { - GClueModemGPS *gps = gclue_modem_gps_get_singleton (); - locator->priv->sources = g_list_append (locator->priv->sources, - gps); - submit_source = GCLUE_LOCATION_SOURCE (gps); - } + GClueModemGPS *gps = gclue_modem_gps_get_singleton (); + locator->priv->sources = g_list_append (locator->priv->sources, gps); + submit_source = GCLUE_LOCATION_SOURCE (gps); #endif for (node = locator->priv->sources; node != NULL; node = node->next) { - GClueLocationSource *src = GCLUE_LOCATION_SOURCE (node->data); - GeocodeLocation *location; - - location = gclue_location_source_get_location (src); - if (location != NULL) - gclue_location_source_set_location - (GCLUE_LOCATION_SOURCE (locator), location); - - g_signal_connect (G_OBJECT (src), - "notify::location", - G_CALLBACK (on_location_changed), + g_signal_connect (G_OBJECT (node->data), + "notify::available-accuracy-level", + G_CALLBACK (on_avail_accuracy_level_changed), locator); - if (submit_source != NULL && GCLUE_IS_WEB_SOURCE (src)) + if (submit_source != NULL && GCLUE_IS_WEB_SOURCE (node->data)) gclue_web_source_set_submit_source - (GCLUE_WEB_SOURCE (src), - submit_source); + (GCLUE_WEB_SOURCE (node->data), submit_source); } + refresh_available_accuracy_level (locator); } static void gclue_locator_class_init (GClueLocatorClass *klass) { + GClueLocationSourceClass *source_class = GCLUE_LOCATION_SOURCE_CLASS (klass); GObjectClass *object_class; + source_class->start = gclue_locator_start; + source_class->stop = gclue_locator_stop; + object_class = G_OBJECT_CLASS (klass); object_class->get_property = gclue_locator_get_property; object_class->set_property = gclue_locator_set_property; @@ -229,6 +328,67 @@ GClueLocatorPrivate); } +static gboolean +gclue_locator_start (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + GClueLocator *locator; + GList *node; + + g_return_val_if_fail (GCLUE_IS_LOCATOR (source), FALSE); + locator = GCLUE_LOCATOR (source); + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_locator_parent_class); + if (!base_class->start (source)) + return FALSE; + + for (node = locator->priv->sources; node != NULL; node = node->next) { + GClueLocationSource *src = GCLUE_LOCATION_SOURCE (node->data); + GClueAccuracyLevel level; + + level = gclue_location_source_get_available_accuracy_level (src); + if (level > locator->priv->accuracy_level || + level == GCLUE_ACCURACY_LEVEL_NONE) + continue; + + locator->priv->active_sources = g_list_append (locator->priv->active_sources, + src); + + start_source (locator, src); + } + + return TRUE; +} + +static gboolean +gclue_locator_stop (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + GClueLocator *locator; + GList *node; + + g_return_val_if_fail (GCLUE_IS_LOCATOR (source), FALSE); + locator = GCLUE_LOCATOR (source); + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_locator_parent_class); + if (!base_class->stop (source)) + return FALSE; + + for (node = locator->priv->active_sources; node != NULL; node = node->next) { + GClueLocationSource *src = GCLUE_LOCATION_SOURCE (node->data); + + g_signal_handlers_disconnect_by_func (G_OBJECT (src), + G_CALLBACK (on_location_changed), + locator); + gclue_location_source_stop (src); + g_debug ("Requested %s to stop", G_OBJECT_TYPE_NAME (src)); + } + + g_list_free (locator->priv->active_sources); + locator->priv->active_sources = NULL; + return TRUE; +} + GClueLocator * gclue_locator_new (GClueAccuracyLevel level) { @@ -241,7 +401,7 @@ gclue_locator_get_accuracy_level (GClueLocator *locator) { g_return_val_if_fail (GCLUE_IS_LOCATOR (locator), - GCLUE_ACCURACY_LEVEL_COUNTRY); + GCLUE_ACCURACY_LEVEL_NONE); return locator->priv->accuracy_level; } diff -Nru geoclue-2.0-2.1.7/src/gclue-main.c geoclue-2.0-2.1.8/src/gclue-main.c --- geoclue-2.0-2.1.7/src/gclue-main.c 2014-01-23 18:01:47.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-main.c 2014-04-07 19:25:37.000000000 +0000 @@ -55,10 +55,10 @@ GMainLoop *main_loop; GClueServiceManager *manager = NULL; -guint no_client_timeout_id = 0; +guint inactivity_timeout_id = 0; static gboolean -no_client_timeout (gpointer user_data) +on_inactivity_timeout (gpointer user_data) { g_main_loop_quit (main_loop); @@ -66,27 +66,27 @@ } static void -on_connected_clients_notify (GObject *gobject, - GParamSpec *pspec, - gpointer user_data) +on_in_use_notify (GObject *gobject, + GParamSpec *pspec, + gpointer user_data) { - guint connected; + gboolean in_use; - connected = gclue_service_manager_get_connected_clients - (GCLUE_SERVICE_MANAGER (gobject)); - g_debug ("Number of connected clients: %u", connected); + in_use = gclue_manager_get_in_use (GCLUE_MANAGER (gobject)); if (inactivity_timeout <= 0) return; - if (connected == 0) - no_client_timeout_id = + g_debug ("Service %s in use", in_use? "now" : "not"); + + if (!in_use) + inactivity_timeout_id = g_timeout_add_seconds (inactivity_timeout, - no_client_timeout, + on_inactivity_timeout, NULL); - else if (no_client_timeout_id != 0) { - g_source_remove (no_client_timeout_id); - no_client_timeout_id = 0; + else if (inactivity_timeout_id != 0) { + g_source_remove (inactivity_timeout_id); + inactivity_timeout_id = 0; } } @@ -106,14 +106,14 @@ } g_signal_connect (manager, - "notify::connected-clients", - G_CALLBACK (on_connected_clients_notify), + "notify::in-use", + G_CALLBACK (on_in_use_notify), NULL); if (inactivity_timeout > 0) - no_client_timeout_id = + inactivity_timeout_id = g_timeout_add_seconds (inactivity_timeout, - no_client_timeout, + on_inactivity_timeout, NULL); } @@ -147,6 +147,7 @@ g_critical ("option parsing failed: %s\n", error->message); exit (-1); } + g_option_context_free (context); if (version) { g_print ("%s\n", PACKAGE_VERSION); diff -Nru geoclue-2.0-2.1.7/src/gclue-modem-gps.c geoclue-2.0-2.1.8/src/gclue-modem-gps.c --- geoclue-2.0-2.1.7/src/gclue-modem-gps.c 2014-01-26 16:33:20.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-modem-gps.c 2014-04-11 17:20:09.000000000 +0000 @@ -53,11 +53,11 @@ { GClueModemGPSPrivate *priv = GCLUE_MODEM_GPS (ggps)->priv; + G_OBJECT_CLASS (gclue_modem_gps_parent_class)->finalize (ggps); + g_cancellable_cancel (priv->cancellable); g_clear_object (&priv->cancellable); g_clear_object (&priv->gps_raw); - - G_OBJECT_CLASS (gclue_modem_gps_parent_class)->finalize (ggps); } static void @@ -167,7 +167,7 @@ MMModemLocation *modem_location = MM_MODEM_LOCATION (source_object); MMLocationGpsNmea *location_nmea; GeocodeLocation *location; - gdouble latitude, longitude, accuracy; + gdouble latitude, longitude, accuracy, altitude; GError *error = NULL; location_nmea = mm_modem_location_get_gps_nmea_finish (modem_location, @@ -187,12 +187,15 @@ latitude = mm_location_gps_raw_get_latitude (priv->gps_raw); longitude = mm_location_gps_raw_get_longitude (priv->gps_raw); + altitude = mm_location_gps_raw_get_altitude (priv->gps_raw); g_clear_object (&priv->gps_raw); accuracy = get_accuracy_from_nmea (source, location_nmea); g_object_unref (location_nmea); location = geocode_location_new (latitude, longitude, accuracy); + if (altitude != MM_LOCATION_ALTITUDE_UNKNOWN) + g_object_set (location, "altitude", altitude, NULL); gclue_location_source_set_location (GCLUE_LOCATION_SOURCE (source), location); } @@ -217,6 +220,9 @@ return; } + if (!gclue_location_source_get_active (GCLUE_LOCATION_SOURCE (source))) + return; + if (priv->gps_raw == NULL) { g_debug ("No GPS"); return; diff -Nru geoclue-2.0-2.1.7/src/gclue-modem-gps.h geoclue-2.0-2.1.8/src/gclue-modem-gps.h --- geoclue-2.0-2.1.7/src/gclue-modem-gps.h 2014-01-26 16:33:20.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-modem-gps.h 2014-04-06 23:34:16.000000000 +0000 @@ -28,8 +28,6 @@ G_BEGIN_DECLS -#define GCLUE_MODEM_GPS_ACCURACY_LEVEL GCLUE_ACCURACY_LEVEL_EXACT - GType gclue_modem_gps_get_type (void) G_GNUC_CONST; #define GCLUE_TYPE_MODEM_GPS (gclue_modem_gps_get_type ()) diff -Nru geoclue-2.0-2.1.7/src/gclue-modem-source.c geoclue-2.0-2.1.8/src/gclue-modem-source.c --- geoclue-2.0-2.1.7/src/gclue-modem-source.c 2014-01-26 16:33:20.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-modem-source.c 2014-04-15 19:37:16.000000000 +0000 @@ -32,6 +32,11 @@ * Baseclass for all sources that use a modem through ModemManager. **/ +static gboolean +gclue_modem_source_start (GClueLocationSource *source); +static gboolean +gclue_modem_source_stop (GClueLocationSource *source); + G_DEFINE_ABSTRACT_TYPE (GClueModemSource, gclue_modem_source, GCLUE_TYPE_LOCATION_SOURCE) struct _GClueModemSourcePrivate { @@ -41,6 +46,7 @@ MMModemLocation *modem_location; GCancellable *cancellable; + GCancellable *active_cancellable; }; static void @@ -70,7 +76,7 @@ GClueModemSource *source = GCLUE_MODEM_SOURCE (gsource); GClueModemSourcePrivate *priv = source->priv; - clear_caps (source); + G_OBJECT_CLASS (gclue_modem_source_parent_class)->finalize (gsource); g_cancellable_cancel (priv->cancellable); g_clear_object (&priv->cancellable); @@ -78,8 +84,6 @@ g_clear_object (&priv->mm_object); g_clear_object (&priv->modem); g_clear_object (&priv->modem_location); - - G_OBJECT_CLASS (gclue_modem_source_parent_class)->finalize (gsource); } static void @@ -88,8 +92,12 @@ static void gclue_modem_source_class_init (GClueModemSourceClass *klass) { + GClueLocationSourceClass *source_class = GCLUE_LOCATION_SOURCE_CLASS (klass); GObjectClass *gsource_class = G_OBJECT_CLASS (klass); + source_class->start = gclue_modem_source_start; + source_class->stop = gclue_modem_source_stop; + gsource_class->finalize = gclue_modem_source_finalize; gsource_class->constructed = gclue_modem_source_constructed; @@ -112,17 +120,21 @@ GAsyncResult *res, gpointer user_data) { - GClueModemSourcePrivate *priv = GCLUE_MODEM_SOURCE (user_data)->priv; + GClueModemSourcePrivate *priv; GError *error = NULL; - if (!mm_modem_location_setup_finish (priv->modem_location, res, &error)) { + if (!mm_modem_location_setup_finish (MM_MODEM_LOCATION (source_object), + res, + &error)) { g_warning ("Failed to setup modem: %s", error->message); g_error_free (error); return; } + priv = GCLUE_MODEM_SOURCE (user_data)->priv; + g_debug ("Modem '%s' setup.", mm_object_get_path (priv->mm_object)); - on_location_changed (G_OBJECT (priv->modem_location), NULL, user_data); + on_location_changed (source_object, NULL, user_data); } static void @@ -130,24 +142,26 @@ GAsyncResult *res, gpointer user_data) { - GClueModemSource *source= GCLUE_MODEM_SOURCE (user_data); - GClueModemSourcePrivate *priv = source->priv; + GClueModemSourcePrivate *priv; MMModemLocationSource caps; GError *error = NULL; - if (!mm_modem_enable_finish (priv->modem, res, &error)) { - if (error->code == MM_CORE_ERROR_IN_PROGRESS) + if (!mm_modem_enable_finish (MM_MODEM (source_object), res, &error)) { + if (error->code == MM_CORE_ERROR_IN_PROGRESS) { /* Seems another source instance is already on it */ + priv = GCLUE_MODEM_SOURCE (user_data)->priv; g_signal_connect (G_OBJECT (priv->modem_location), "notify::location", G_CALLBACK (on_location_changed), user_data); - else + } else g_warning ("Failed to enable modem: %s", error->message); g_error_free (error); return; } + priv = GCLUE_MODEM_SOURCE (user_data)->priv; + g_debug ("modem '%s' enabled.", mm_object_get_path (priv->mm_object)); g_signal_connect (G_OBJECT (priv->modem_location), "notify::location", @@ -159,11 +173,96 @@ mm_modem_location_setup (priv->modem_location, caps, TRUE, - priv->cancellable, + priv->active_cancellable, on_modem_location_setup, user_data); } +static gboolean +gclue_modem_source_start (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + GClueModemSourcePrivate *priv; + + g_return_val_if_fail (GCLUE_IS_MODEM_SOURCE (source), FALSE); + priv = GCLUE_MODEM_SOURCE (source)->priv; + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_modem_source_parent_class); + if (!base_class->start (source)) + return FALSE; + + if (priv->modem == NULL) + return TRUE; + + priv->active_cancellable = g_cancellable_new (); + mm_modem_enable (priv->modem, + priv->active_cancellable, + on_modem_enabled, + source); + return TRUE; +} + +static gboolean +gclue_modem_source_stop (GClueLocationSource *source) +{ + GClueModemSourcePrivate *priv = GCLUE_MODEM_SOURCE (source)->priv; + GClueLocationSourceClass *base_class; + + g_return_val_if_fail (GCLUE_IS_MODEM_SOURCE (source), FALSE); + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_modem_source_parent_class); + if (!base_class->stop (source)) + return FALSE; + + if (priv->modem == NULL) + return TRUE; + + g_signal_handlers_disconnect_by_func (G_OBJECT (priv->modem_location), + G_CALLBACK (on_location_changed), + source); + g_cancellable_cancel (priv->active_cancellable); + g_clear_object (&priv->active_cancellable); + clear_caps (GCLUE_MODEM_SOURCE (source)); + + return TRUE; +} + +static void +refresh_accuracy_level (GClueModemSource *source) +{ + GClueAccuracyLevel new, existing; + + existing = gclue_location_source_get_available_accuracy_level + (GCLUE_LOCATION_SOURCE (source)); + new = GCLUE_ACCURACY_LEVEL_NONE; + + if (source->priv->mm_object != NULL) { + MMModemLocationSource req_caps; + GClueModemSourceClass *klass; + + klass = GCLUE_MODEM_SOURCE_GET_CLASS (source); + req_caps = klass->get_req_modem_location_caps (source, NULL); + if (req_caps & (MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI | + MM_MODEM_LOCATION_SOURCE_CDMA_BS)) + /* FIXME: This is the case of 3G source and that depends + on network too so this level is only correct if + network is available. + */ + new = GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD; + if (req_caps & (MM_MODEM_LOCATION_SOURCE_GPS_RAW | + MM_MODEM_LOCATION_SOURCE_GPS_NMEA)) + new = GCLUE_ACCURACY_LEVEL_EXACT; + } + + if (new != existing) { + g_debug ("Available accuracy level from %s: %u", + G_OBJECT_TYPE_NAME (source), new); + g_object_set (G_OBJECT (source), + "available-accuracy-level", new, + NULL); + } +} + static void on_mm_object_added (GDBusObjectManager *manager, GDBusObject *object, @@ -198,10 +297,15 @@ source->priv->modem = mm_object_get_modem (mm_object); source->priv->modem_location = mm_object_get_modem_location (mm_object); - mm_modem_enable (source->priv->modem, - source->priv->cancellable, - on_modem_enabled, - user_data); + if (gclue_location_source_get_active (GCLUE_LOCATION_SOURCE (source))) { + source->priv->active_cancellable = g_cancellable_new (); + mm_modem_enable (source->priv->modem, + source->priv->active_cancellable, + on_modem_enabled, + user_data); + } + + refresh_accuracy_level (source); } static void @@ -214,10 +318,16 @@ if (priv->mm_object == NULL || priv->mm_object != mm_object) return; + g_debug ("Modem '%s' removed.", mm_object_get_path (priv->mm_object)); + g_signal_handlers_disconnect_by_func (G_OBJECT (priv->modem_location), + G_CALLBACK (on_location_changed), + user_data); g_clear_object (&priv->mm_object); g_clear_object (&priv->modem); g_clear_object (&priv->modem_location); + + refresh_accuracy_level (GCLUE_MODEM_SOURCE (user_data)); } static void @@ -292,6 +402,8 @@ { GClueModemSourcePrivate *priv = GCLUE_MODEM_SOURCE (object)->priv; + G_OBJECT_CLASS (gclue_modem_source_parent_class)->constructed (object); + priv->cancellable = g_cancellable_new (); g_bus_get (G_BUS_TYPE_SYSTEM, diff -Nru geoclue-2.0-2.1.7/src/gclue-service-client.c geoclue-2.0-2.1.8/src/gclue-service-client.c --- geoclue-2.0-2.1.7/src/gclue-service-client.c 2014-03-21 16:42:46.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-service-client.c 2014-04-06 23:34:16.000000000 +0000 @@ -59,7 +59,7 @@ /* Number of times location has been updated */ guint locations_updated; - gboolean active; + gboolean agent_stopped; /* Agent stopped client, not the app */ }; enum @@ -69,7 +69,6 @@ PROP_PATH, PROP_CONNECTION, PROP_AGENT_PROXY, - PROP_ACTIVE, LAST_PROP }; @@ -194,6 +193,77 @@ g_free (path); } +static void +start_client (GClueServiceClient *client, GClueAccuracyLevel accuracy_level) +{ + GClueServiceClientPrivate *priv = client->priv; + + gclue_client_set_active (GCLUE_CLIENT (client), TRUE); + priv->locator = gclue_locator_new (accuracy_level); + g_signal_connect (priv->locator, + "notify::location", + G_CALLBACK (on_locator_location_changed), + client); + + gclue_location_source_start (GCLUE_LOCATION_SOURCE (priv->locator)); +} + +static void +stop_client (GClueServiceClient *client) +{ + g_clear_object (&client->priv->locator); + gclue_client_set_active (GCLUE_CLIENT (client), FALSE); +} + +static void +on_agent_props_changed (GDBusProxy *agent_proxy, + GVariant *changed_properties, + GStrv invalidated_properties, + gpointer user_data) +{ + GClueServiceClient *client = GCLUE_SERVICE_CLIENT (user_data); + GVariantIter *iter; + GVariant *value; + gchar *key; + + if (g_variant_n_children (changed_properties) < 0) + return; + + g_variant_get (changed_properties, "a{sv}", &iter); + while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { + GClueAccuracyLevel max_accuracy; + const char *id; + + if (strcmp (key, "MaxAccuracyLevel") != 0) + continue; + + id = gclue_client_get_desktop_id (GCLUE_CLIENT (client)); + max_accuracy = g_variant_get_uint32 (value); + /* FIXME: We should be handling all values of max accuracy + * level here, not just 0 and non-0. + */ + if (max_accuracy != 0 && client->priv->agent_stopped) { + GClueAccuracyLevel accuracy; + + client->priv->agent_stopped = FALSE; + accuracy = gclue_client_get_requested_accuracy_level + (GCLUE_CLIENT (client)); + accuracy = CLAMP (accuracy, 0, max_accuracy); + + start_client (client, accuracy); + g_debug ("Re-started '%s'.", id); + } else if (max_accuracy == 0 && + gclue_client_get_active (GCLUE_CLIENT (client))) { + stop_client (client); + client->priv->agent_stopped = TRUE; + g_debug ("Stopped '%s'.", id); + } + + break; + } + g_variant_iter_free (iter); +} + typedef struct { GClueServiceClient *client; @@ -209,32 +279,14 @@ } static void -set_active (GClueServiceClient *client, - gboolean value) -{ - client->priv->active = value; - g_object_notify (G_OBJECT (client), "active"); -} - -static void complete_start (StartData *data, GClueAccuracyLevel accuracy_level) { - GClueServiceClientPrivate *priv = data->client->priv; - - set_active (data->client, TRUE); - priv->locator = gclue_locator_new (accuracy_level); - g_signal_connect (priv->locator, - "notify::location", - G_CALLBACK (on_locator_location_changed), - data->client); - - /* In case locator already has a location */ - on_locator_location_changed (G_OBJECT (priv->locator), - NULL, - data->client); + start_client (data->client, accuracy_level); gclue_client_complete_start (GCLUE_CLIENT (data->client), data->invocation); + g_debug ("'%s' started.", + gclue_client_get_desktop_id (GCLUE_CLIENT (data->client))); start_data_free (data); } @@ -343,11 +395,9 @@ gclue_service_client_handle_stop (GClueClient *client, GDBusMethodInvocation *invocation) { - GClueServiceClientPrivate *priv = GCLUE_SERVICE_CLIENT (client)->priv; - - g_clear_object (&priv->locator); + stop_client (GCLUE_SERVICE_CLIENT (client)); gclue_client_complete_stop (client, invocation); - set_active (GCLUE_SERVICE_CLIENT (client), FALSE); + g_debug ("'%s' stopped.", gclue_client_get_desktop_id (client)); return TRUE; } @@ -394,10 +444,6 @@ g_value_set_object (value, client->priv->agent_proxy); break; - case PROP_ACTIVE: - g_value_set_boolean (value, client->priv->active); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -426,6 +472,10 @@ case PROP_AGENT_PROXY: client->priv->agent_proxy = g_value_dup_object (value); + g_signal_connect (client->priv->agent_proxy, + "g-properties-changed", + G_CALLBACK (on_agent_props_changed), + object); break; default: @@ -610,15 +660,6 @@ g_object_class_install_property (object_class, PROP_AGENT_PROXY, gParamSpecs[PROP_AGENT_PROXY]); - - gParamSpecs[PROP_ACTIVE] = g_param_spec_boolean ("active", - "Active", - "Client has been started (successfully)", - FALSE, - G_PARAM_READABLE); - g_object_class_install_property (object_class, - PROP_ACTIVE, - gParamSpecs[PROP_ACTIVE]); } static void @@ -691,11 +732,3 @@ return client->priv->client_info; } - -gboolean -gclue_service_client_get_active (GClueServiceClient *client) -{ - g_return_val_if_fail (GCLUE_IS_SERVICE_CLIENT(client), FALSE); - - return client->priv->active; -} diff -Nru geoclue-2.0-2.1.7/src/gclue-service-client.h geoclue-2.0-2.1.8/src/gclue-service-client.h --- geoclue-2.0-2.1.7/src/gclue-service-client.h 2014-03-21 16:42:46.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-service-client.h 2014-04-01 00:02:21.000000000 +0000 @@ -64,7 +64,6 @@ GError **error); const char * gclue_service_client_get_path (GClueServiceClient *client); GClueClientInfo * gclue_service_client_get_client_info (GClueServiceClient *client); -gboolean gclue_service_client_get_active (GClueServiceClient *client); G_END_DECLS diff -Nru geoclue-2.0-2.1.7/src/gclue-service-location.c geoclue-2.0-2.1.8/src/gclue-service-location.c --- geoclue-2.0-2.1.7/src/gclue-service-location.c 2014-01-23 18:01:47.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-service-location.c 2014-04-11 00:46:17.000000000 +0000 @@ -90,12 +90,16 @@ case PROP_LOCATION: { GeocodeLocation *loc; + gdouble altitude; loc = geocode_location_new_with_description (gclue_location_get_latitude (location), gclue_location_get_longitude (location), gclue_location_get_accuracy (location), gclue_location_get_description (location)); + altitude = gclue_location_get_altitude (location); + if (altitude != GEOCODE_LOCATION_ALTITUDE_UNKNOWN) + g_object_set (loc, "altitude", altitude, NULL); g_value_take_object (value, loc); break; @@ -131,6 +135,7 @@ case PROP_LOCATION: { GeocodeLocation *loc; + gdouble altitude; loc = g_value_get_object (value); gclue_location_set_latitude @@ -141,6 +146,9 @@ (location, geocode_location_get_accuracy (loc)); gclue_location_set_description (location, geocode_location_get_description (loc)); + altitude = geocode_location_get_altitude (loc); + if (altitude != GEOCODE_LOCATION_ALTITUDE_UNKNOWN) + gclue_location_set_altitude (location, altitude); break; } @@ -325,6 +333,8 @@ location->priv = G_TYPE_INSTANCE_GET_PRIVATE (location, GCLUE_TYPE_SERVICE_LOCATION, GClueServiceLocationPrivate); + gclue_location_set_altitude (GCLUE_LOCATION (location), + GEOCODE_LOCATION_ALTITUDE_UNKNOWN); } static gboolean diff -Nru geoclue-2.0-2.1.7/src/gclue-service-manager.c geoclue-2.0-2.1.8/src/gclue-service-manager.c --- geoclue-2.0-2.1.7/src/gclue-service-manager.c 2014-03-21 16:42:46.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-service-manager.c 2014-04-10 00:05:23.000000000 +0000 @@ -28,6 +28,7 @@ #include "gclue-client-info.h" #include "geoclue-agent-interface.h" #include "gclue-enums.h" +#include "gclue-locator.h" #include "gclue-config.h" #define AGENT_WAIT_TIMEOUT 100 /* milliseconds */ @@ -54,13 +55,14 @@ guint num_clients; gint64 init_time; + + GClueLocator *locator; }; enum { PROP_0, PROP_CONNECTION, - PROP_CONNECTED_CLIENTS, LAST_PROP }; @@ -70,19 +72,19 @@ sync_in_use_property (GClueServiceManager *manager) { gboolean in_use = FALSE; - GList *l; + GList *clients, *l; - for (l = g_hash_table_get_values (manager->priv->clients); - l != NULL; - l = l->next) { - GClueServiceClient *client = GCLUE_SERVICE_CLIENT (l->data); + clients = g_hash_table_get_values (manager->priv->clients); + for (l = clients; l != NULL; l = l->next) { + GClueClient *client = GCLUE_CLIENT (l->data); - if (gclue_service_client_get_active (client)) { + if (gclue_client_get_active (client)) { in_use = TRUE; break; } } + g_list_free (clients); if (in_use != gclue_manager_get_in_use (GCLUE_MANAGER (manager))) gclue_manager_set_in_use (GCLUE_MANAGER (manager), in_use); @@ -96,7 +98,8 @@ g_hash_table_remove (manager->priv->clients, gclue_client_info_get_bus_name (info)); - g_object_notify (G_OBJECT (manager), "connected-clients"); + g_debug ("Number of connected clients: %u", + g_hash_table_size (manager->priv->clients)); sync_in_use_property (manager); } @@ -136,7 +139,8 @@ g_hash_table_insert (priv->clients, g_strdup (gclue_client_info_get_bus_name (info)), client); - g_object_notify (G_OBJECT (data->manager), "connected-clients"); + g_debug ("Number of connected clients: %u", + g_hash_table_size (priv->clients)); g_signal_connect (info, "peer-vanished", @@ -159,6 +163,7 @@ g_clear_error (&error); g_clear_object (&info); g_slice_free (OnClientInfoNewReadyData, data); + g_free (path); return FALSE; } @@ -382,6 +387,7 @@ { GClueServiceManagerPrivate *priv = GCLUE_SERVICE_MANAGER (object)->priv; + g_clear_object (&priv->locator); g_clear_object (&priv->connection); g_clear_pointer (&priv->clients, g_hash_table_unref); g_clear_pointer (&priv->agents, g_hash_table_unref); @@ -403,15 +409,6 @@ g_value_set_object (value, manager->priv->connection); break; - case PROP_CONNECTED_CLIENTS: - { - guint num; - - num = gclue_service_manager_get_connected_clients (manager); - g_value_set_uint (value, num); - break; - } - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -436,11 +433,34 @@ } static void +on_avail_accuracy_level_changed (GObject *object, + GParamSpec *pspec, + gpointer user_data) +{ + GClueServiceManagerPrivate *priv = GCLUE_SERVICE_MANAGER (user_data)->priv; + GClueAccuracyLevel level; + + level = gclue_location_source_get_available_accuracy_level + (GCLUE_LOCATION_SOURCE (priv->locator)); + gclue_manager_set_available_accuracy_level (GCLUE_MANAGER (user_data), + level); +} + +static void gclue_service_manager_constructed (GObject *object) { - /* FIXME: We need to probe the sources, somehow */ - gclue_manager_set_available_accuracy_level (GCLUE_MANAGER (object), - GCLUE_ACCURACY_LEVEL_EXACT); + GClueServiceManagerPrivate *priv = GCLUE_SERVICE_MANAGER (object)->priv; + + G_OBJECT_CLASS (gclue_service_manager_parent_class)->constructed (object); + + priv->locator = gclue_locator_new (GCLUE_ACCURACY_LEVEL_EXACT); + g_signal_connect (G_OBJECT (priv->locator), + "notify::available-accuracy-level", + G_CALLBACK (on_avail_accuracy_level_changed), + object); + on_avail_accuracy_level_changed (G_OBJECT (priv->locator), + NULL, + object); } static void @@ -465,18 +485,6 @@ g_object_class_install_property (object_class, PROP_CONNECTION, gParamSpecs[PROP_CONNECTION]); - - gParamSpecs[PROP_CONNECTED_CLIENTS] = - g_param_spec_uint ("connected-clients", - "ConnectedClients", - "Number of connected clients", - 0, - G_MAXUINT, - 0, - G_PARAM_READABLE); - g_object_class_install_property (object_class, - PROP_CONNECTED_CLIENTS, - gParamSpecs[PROP_CONNECTED_CLIENTS]); } static void @@ -532,9 +540,3 @@ "connection", connection, NULL); } - -guint -gclue_service_manager_get_connected_clients (GClueServiceManager *manager) -{ - return g_hash_table_size (manager->priv->clients); -} diff -Nru geoclue-2.0-2.1.7/src/gclue-service-manager.h geoclue-2.0-2.1.8/src/gclue-service-manager.h --- geoclue-2.0-2.1.7/src/gclue-service-manager.h 2014-01-23 18:01:47.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-service-manager.h 2014-04-07 19:39:32.000000000 +0000 @@ -57,7 +57,6 @@ GClueServiceManager * gclue_service_manager_new (GDBusConnection *connection, GError **error); -guint gclue_service_manager_get_connected_clients (GClueServiceManager *manager); G_END_DECLS diff -Nru geoclue-2.0-2.1.7/src/gclue-web-source.c geoclue-2.0-2.1.8/src/gclue-web-source.c --- geoclue-2.0-2.1.7/src/gclue-web-source.c 2014-02-02 16:13:36.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-web-source.c 2014-04-10 00:05:41.000000000 +0000 @@ -36,6 +36,9 @@ * Baseclass for all sources that solely use a web resource for geolocation. **/ +static gboolean +gclue_web_source_start (GClueLocationSource *source); + struct _GClueWebSourcePrivate { SoupSession *soup_session; @@ -58,6 +61,7 @@ GClueWebSource *web; GError *error = NULL; char *contents; + char *str; GeocodeLocation *location; SoupURI *uri; @@ -74,9 +78,11 @@ contents = g_strndup (query->response_body->data, query->response_body->length); uri = soup_message_get_uri (query); + str = soup_uri_to_string (uri, FALSE); g_debug ("Got following response from '%s':\n%s", - soup_uri_to_string (uri, FALSE), + str, contents); + g_free (str); location = GCLUE_WEB_SOURCE_GET_CLASS (web)->parse_response (web, contents, &error); @@ -88,6 +94,26 @@ gclue_location_source_set_location (GCLUE_LOCATION_SOURCE (web), location); + g_object_unref (location); +} + +static void +refresh_accuracy_level (GClueWebSource *web, + gboolean available) +{ + GClueAccuracyLevel new, existing; + + existing = gclue_location_source_get_available_accuracy_level + (GCLUE_LOCATION_SOURCE (web)); + new = GCLUE_WEB_SOURCE_GET_CLASS (web)->get_available_accuracy_level + (web, available); + if (new != existing) { + g_debug ("Available accuracy level from %s: %u", + G_OBJECT_TYPE_NAME (web), new); + g_object_set (G_OBJECT (web), + "available-accuracy-level", new, + NULL); + } } static void @@ -99,6 +125,11 @@ GError *error = NULL; gboolean last_available = web->priv->network_available; + refresh_accuracy_level (web, available); + + if (!gclue_location_source_get_active (GCLUE_LOCATION_SOURCE (user_data))) + return; + web->priv->network_available = available; if (last_available == available) return; /* We already reacted to netork change */ @@ -157,6 +188,8 @@ GNetworkMonitor *monitor; GClueWebSourcePrivate *priv = GCLUE_WEB_SOURCE (object)->priv; + G_OBJECT_CLASS (gclue_web_source_parent_class)->constructed (object); + priv->soup_session = soup_session_new_with_options (SOUP_SESSION_REMOVE_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_DEFAULT, @@ -168,16 +201,19 @@ "network-changed", G_CALLBACK (on_network_changed), object); - - if (g_network_monitor_get_network_available (monitor)) - on_network_changed (monitor, TRUE, object); + on_network_changed (monitor, + g_network_monitor_get_network_available (monitor), + object); } static void gclue_web_source_class_init (GClueWebSourceClass *klass) { + GClueLocationSourceClass *source_class = GCLUE_LOCATION_SOURCE_CLASS (klass); GObjectClass *gsource_class = G_OBJECT_CLASS (klass); + source_class->start = gclue_web_source_start; + gsource_class->finalize = gclue_web_source_finalize; gsource_class->constructed = gclue_web_source_constructed; @@ -194,24 +230,35 @@ * gclue_web_source_refresh: * @source: a #GClueWebSource * - * Causes @source to refresh location. Its meant to be used by subclasses if - * they have reason to suspect location might have changed. + * Causes @source to refresh location and available accuracy level. Its meant + * to be used by subclasses if they have reason to suspect location and/or + * available accuracy level might have changed. **/ void gclue_web_source_refresh (GClueWebSource *source) { GNetworkMonitor *monitor; - GClueWebSourcePrivate *priv; g_return_if_fail (GCLUE_IS_WEB_SOURCE (source)); - priv = source->priv; - if (priv->query != NULL) - return; - monitor = g_network_monitor_get_default (); - if (g_network_monitor_get_network_available (monitor)) + if (g_network_monitor_get_network_available (monitor)) { + source->priv->network_available = FALSE; on_network_changed (monitor, TRUE, source); + } +} + +static gboolean +gclue_web_source_start (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_web_source_parent_class); + if (!base_class->start (source)) + return FALSE; + + gclue_web_source_refresh (GCLUE_WEB_SOURCE (source)); + return TRUE; } static void diff -Nru geoclue-2.0-2.1.7/src/gclue-web-source.h geoclue-2.0-2.1.8/src/gclue-web-source.h --- geoclue-2.0-2.1.7/src/gclue-web-source.h 2014-01-29 20:49:33.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-web-source.h 2014-04-06 23:34:16.000000000 +0000 @@ -70,6 +70,9 @@ GeocodeLocation * (*parse_response) (GClueWebSource *source, const char *response, GError **error); + GClueAccuracyLevel (*get_available_accuracy_level) + (GClueWebSource *source, + gboolean network_available); }; void gclue_web_source_refresh (GClueWebSource *source); diff -Nru geoclue-2.0-2.1.7/src/gclue-wifi.c geoclue-2.0-2.1.8/src/gclue-wifi.c --- geoclue-2.0-2.1.7/src/gclue-wifi.c 2014-02-24 13:44:01.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-wifi.c 2014-04-11 17:20:33.000000000 +0000 @@ -24,8 +24,11 @@ #include #include #include +#include +#if GCLUE_USE_NETWORK_MANAGER #include #include +#endif #include "gclue-wifi.h" #include "gclue-config.h" #include "gclue-error.h" @@ -42,62 +45,150 @@ * configuration file so its easy to switch to Google's API. **/ +#if GCLUE_USE_NETWORK_MANAGER +static gboolean +gclue_wifi_start (GClueLocationSource *source); +static gboolean +gclue_wifi_stop (GClueLocationSource *source); +#endif + struct _GClueWifiPrivate { +#if GCLUE_USE_NETWORK_MANAGER NMClient *client; NMDeviceWifi *wifi_device; - +#endif gulong ap_added_id; guint refresh_timeout; + + GClueAccuracyLevel accuracy_level; +}; + +enum +{ + PROP_0, + PROP_ACCURACY_LEVEL, + LAST_PROP }; +static GParamSpec *gParamSpecs[LAST_PROP]; static SoupMessage * gclue_wifi_create_query (GClueWebSource *source, GError **error); +#if GCLUE_USE_NETWORK_MANAGER static SoupMessage * gclue_wifi_create_submit_query (GClueWebSource *source, GeocodeLocation *location, GError **error); +#endif static GeocodeLocation * gclue_wifi_parse_response (GClueWebSource *source, const char *json, GError **error); +static GClueAccuracyLevel +gclue_wifi_get_available_accuracy_level (GClueWebSource *source, + gboolean net_available); G_DEFINE_TYPE (GClueWifi, gclue_wifi, GCLUE_TYPE_WEB_SOURCE) +#if GCLUE_USE_NETWORK_MANAGER static void -on_device_removed (NMClient *client, - NMDevice *device, - gpointer user_data); +disconnect_ap_signals (GClueWifi *wifi); static void gclue_wifi_finalize (GObject *gwifi) { GClueWifi *wifi = (GClueWifi *) gwifi; - if (wifi->priv->wifi_device != NULL) - on_device_removed (wifi->priv->client, - NM_DEVICE (wifi->priv->wifi_device), - wifi); - g_object_unref (wifi->priv->client); - G_OBJECT_CLASS (gclue_wifi_parent_class)->finalize (gwifi); + + if (wifi->priv->wifi_device != NULL) { + disconnect_ap_signals (wifi); + wifi->priv->wifi_device = NULL; + } + g_clear_object (&wifi->priv->client); +} +#endif + +static void +gclue_wifi_constructed (GObject *object); + +static void +gclue_wifi_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + GClueWifi *wifi = GCLUE_WIFI (object); + + switch (prop_id) { + case PROP_ACCURACY_LEVEL: + g_value_set_enum (value, wifi->priv->accuracy_level); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +gclue_wifi_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + GClueWifi *wifi = GCLUE_WIFI (object); + + switch (prop_id) { + case PROP_ACCURACY_LEVEL: + wifi->priv->accuracy_level = g_value_get_enum (value); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } } static void gclue_wifi_class_init (GClueWifiClass *klass) { - GClueWebSourceClass *source_class = GCLUE_WEB_SOURCE_CLASS (klass); + GClueWebSourceClass *web_class = GCLUE_WEB_SOURCE_CLASS (klass); +#if GCLUE_USE_NETWORK_MANAGER + GClueLocationSourceClass *source_class = GCLUE_LOCATION_SOURCE_CLASS (klass); +#endif GObjectClass *gwifi_class = G_OBJECT_CLASS (klass); - source_class->create_query = gclue_wifi_create_query; - source_class->create_submit_query = gclue_wifi_create_submit_query; - source_class->parse_response = gclue_wifi_parse_response; +#if GCLUE_USE_NETWORK_MANAGER + source_class->start = gclue_wifi_start; + source_class->stop = gclue_wifi_stop; + web_class->create_submit_query = gclue_wifi_create_submit_query; +#endif + web_class->create_query = gclue_wifi_create_query; + web_class->parse_response = gclue_wifi_parse_response; + web_class->get_available_accuracy_level = + gclue_wifi_get_available_accuracy_level; + gwifi_class->get_property = gclue_wifi_get_property; + gwifi_class->set_property = gclue_wifi_set_property; +#if GCLUE_USE_NETWORK_MANAGER gwifi_class->finalize = gclue_wifi_finalize; +#endif + gwifi_class->constructed = gclue_wifi_constructed; g_type_class_add_private (klass, sizeof (GClueWifiPrivate)); + + gParamSpecs[PROP_ACCURACY_LEVEL] = g_param_spec_enum ("accuracy-level", + "AccuracyLevel", + "Max accuracy level", + GCLUE_TYPE_ACCURACY_LEVEL, + GCLUE_ACCURACY_LEVEL_CITY, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY); + g_object_class_install_property (gwifi_class, + PROP_ACCURACY_LEVEL, + gParamSpecs[PROP_ACCURACY_LEVEL]); } +#if GCLUE_USE_NETWORK_MANAGER static gboolean on_refresh_timeout (gpointer user_data) { @@ -193,24 +284,25 @@ } static void -connect_ap_signals (GClueWifi *wifi) +connect_ap_signals (GClueWifi *wifi) { - if (wifi->priv->ap_added_id != 0) + GClueWifiPrivate *priv = wifi->priv; + + if (priv->ap_added_id != 0 || priv->wifi_device == NULL) return; - wifi->priv->ap_added_id = - g_signal_connect (wifi->priv->wifi_device, - "access-point-added", - G_CALLBACK (on_ap_added), - wifi); + priv->ap_added_id = g_signal_connect (priv->wifi_device, + "access-point-added", + G_CALLBACK (on_ap_added), + wifi); } static void -disconnect_ap_signals (GClueWifi *wifi) +disconnect_ap_signals (GClueWifi *wifi) { GClueWifiPrivate *priv = wifi->priv; - if (priv->ap_added_id == 0) + if (priv->ap_added_id == 0 || priv->wifi_device == NULL) return; g_signal_handler_disconnect (priv->wifi_device, priv->ap_added_id); @@ -222,6 +314,54 @@ } } +static gboolean +gclue_wifi_start (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + + g_return_val_if_fail (GCLUE_IS_WIFI (source), FALSE); + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_wifi_parent_class); + if (!base_class->start (source)) + return FALSE; + + connect_ap_signals (GCLUE_WIFI (source)); + return TRUE; +} + +static gboolean +gclue_wifi_stop (GClueLocationSource *source) +{ + GClueLocationSourceClass *base_class; + + g_return_val_if_fail (GCLUE_IS_WIFI (source), FALSE); + + base_class = GCLUE_LOCATION_SOURCE_CLASS (gclue_wifi_parent_class); + if (!base_class->stop (source)) + return FALSE; + + disconnect_ap_signals (GCLUE_WIFI (source)); + return TRUE; +} +#endif + +static GClueAccuracyLevel +gclue_wifi_get_available_accuracy_level (GClueWebSource *source, + gboolean net_available) +{ + if (!net_available) + return GCLUE_ACCURACY_LEVEL_NONE; + +#if GCLUE_USE_NETWORK_MANAGER + return (GCLUE_WIFI (source)->priv->wifi_device != NULL)? + GCLUE_ACCURACY_LEVEL_STREET : + GCLUE_ACCURACY_LEVEL_CITY; +#else + return GCLUE_ACCURACY_LEVEL_CITY; +#endif +} + +#if GCLUE_USE_NETWORK_MANAGER static void on_device_added (NMClient *client, NMDevice *device, @@ -236,7 +376,10 @@ g_debug ("WiFi device '%s' added.", nm_device_wifi_get_hw_address (wifi->priv->wifi_device)); - connect_ap_signals (wifi); + if (gclue_location_source_get_active (GCLUE_LOCATION_SOURCE (wifi))) + connect_ap_signals (wifi); + + gclue_web_source_refresh (GCLUE_WEB_SOURCE (wifi)); } static void @@ -254,15 +397,29 @@ disconnect_ap_signals (wifi); wifi->priv->wifi_device = NULL; + + gclue_web_source_refresh (GCLUE_WEB_SOURCE (wifi)); } +#endif static void gclue_wifi_init (GClueWifi *wifi) { + wifi->priv = G_TYPE_INSTANCE_GET_PRIVATE ((wifi), GCLUE_TYPE_WIFI, GClueWifiPrivate); +} + +static void +gclue_wifi_constructed (GObject *object) +{ +#if GCLUE_USE_NETWORK_MANAGER + GClueWifi *wifi = GCLUE_WIFI (object); const GPtrArray *devices; guint i; - wifi->priv = G_TYPE_INSTANCE_GET_PRIVATE ((wifi), GCLUE_TYPE_WIFI, GClueWifiPrivate); + G_OBJECT_CLASS (gclue_wifi_parent_class)->constructed (object); + + if (wifi->priv->accuracy_level == GCLUE_ACCURACY_LEVEL_CITY) + goto refresh_n_exit; wifi->priv->client = nm_client_new (); /* FIXME: We should be using async variant */ g_signal_connect (wifi->priv->client, @@ -276,7 +433,7 @@ devices = nm_client_get_devices (wifi->priv->client); if (devices == NULL) - return; + goto refresh_n_exit; for (i = 0; i < devices->len; i++) { NMDevice *device = g_ptr_array_index (devices, i); @@ -286,6 +443,12 @@ break; } } + +refresh_n_exit: +#else + G_OBJECT_CLASS (gclue_wifi_parent_class)->constructed (object); +#endif + gclue_web_source_refresh (GCLUE_WEB_SOURCE (object)); } static void @@ -300,25 +463,40 @@ /** * gclue_wifi_new: * - * Get the #GClueWifi singleton. + * Get the #GClueWifi singleton, for the specified max accuracy level @level. * * Returns: (transfer full): a new ref to #GClueWifi. Use g_object_unref() * when done. **/ GClueWifi * -gclue_wifi_get_singleton (void) +gclue_wifi_get_singleton (GClueAccuracyLevel level) { - static GClueWifi *wifi = NULL; + static GClueWifi *wifi[] = { NULL, NULL }; + guint i; + + g_return_val_if_fail (level >= GCLUE_ACCURACY_LEVEL_CITY, NULL); - if (wifi == NULL) { - wifi = g_object_new (GCLUE_TYPE_WIFI, NULL); - g_object_weak_ref (G_OBJECT (wifi), + i = (level == GCLUE_ACCURACY_LEVEL_CITY)? 0 : 1; + if (wifi[i] == NULL) { + wifi[i] = g_object_new (GCLUE_TYPE_WIFI, + "accuracy-level", level, + NULL); + g_object_weak_ref (G_OBJECT (wifi[i]), on_wifi_destroyed, - &wifi); + &wifi[i]); } else - g_object_ref (wifi); + g_object_ref (wifi[i]); - return wifi; + return wifi[i]; +} + +GClueAccuracyLevel +gclue_wifi_get_accuracy_level (GClueWifi *wifi) +{ + g_return_val_if_fail (GCLUE_IS_WIFI (wifi), + GCLUE_ACCURACY_LEVEL_NONE); + + return wifi->priv->accuracy_level; } static char * @@ -331,6 +509,7 @@ return gclue_config_get_wifi_url (config); } +#if GCLUE_USE_NETWORK_MANAGER static const GPtrArray * get_ap_list (GClueWifi *wifi, GError **error) @@ -356,51 +535,70 @@ return aps; } +#endif static SoupMessage * gclue_wifi_create_query (GClueWebSource *source, GError **error) { +#if GCLUE_USE_NETWORK_MANAGER GClueWifi *wifi = GCLUE_WIFI (source); + const GPtrArray *aps; /* As in Access Points */ + guint i; +#endif SoupMessage *ret = NULL; JsonBuilder *builder; JsonGenerator *generator; JsonNode *root_node; char *data; gsize data_len; - const GPtrArray *aps; /* As in Access Points */ - guint i; char *uri; - aps = get_ap_list (wifi, error); - if (aps == NULL) - goto out; - builder = json_builder_new (); json_builder_begin_object (builder); json_builder_set_member_name (builder, "wifiAccessPoints"); json_builder_begin_array (builder); - for (i = 0; i < aps->len; i++) { - NMAccessPoint *ap = g_ptr_array_index (aps, i); - const char *mac; - gint8 strength_dbm; - - if (should_ignore_ap (ap)) - continue; - +#if GCLUE_USE_NETWORK_MANAGER + aps = get_ap_list (wifi, NULL); + if (aps != NULL) { + for (i = 0; i < aps->len; i++) { + NMAccessPoint *ap = g_ptr_array_index (aps, i); + const char *mac; + gint8 strength_dbm; + + if (should_ignore_ap (ap)) + continue; + + json_builder_begin_object (builder); + json_builder_set_member_name (builder, "macAddress"); + mac = nm_access_point_get_bssid (ap); + json_builder_add_string_value (builder, mac); + + json_builder_set_member_name (builder, "signalStrength"); + strength_dbm = nm_access_point_get_strength (ap) / + 2 - 100; + json_builder_add_int_value (builder, strength_dbm); + json_builder_end_object (builder); + } + } else { +#endif + /* Pure geoip query */ + + /* FIXME: Currently we need a dummy AP entry to work around: + * https://github.com/mozilla/ichnaea/issues/165 + */ json_builder_begin_object (builder); json_builder_set_member_name (builder, "macAddress"); - mac = nm_access_point_get_bssid (ap); - json_builder_add_string_value (builder, mac); + json_builder_add_string_value (builder, "00:00:00:00:00:00"); json_builder_set_member_name (builder, "signalStrength"); - strength_dbm = nm_access_point_get_strength (ap) / 2 - 100; - json_builder_add_int_value (builder, strength_dbm); + json_builder_add_int_value (builder, -50); json_builder_end_object (builder); +#if GCLUE_USE_NETWORK_MANAGER } - +#endif json_builder_end_array (builder); json_builder_end_object (builder); @@ -423,7 +621,7 @@ g_debug ("Sending following request to '%s':\n%s", uri, data); g_free (uri); -out: + return ret; } @@ -481,12 +679,14 @@ return location; } +#if GCLUE_USE_NETWORK_MANAGER static char * -get_submit_url (void) +get_submit_config (char **nick) { GClueConfig *config; config = gclue_config_get_singleton (); + *nick = gclue_config_get_wifi_submit_nick (config); return gclue_config_get_wifi_submit_url (config); } @@ -501,14 +701,14 @@ JsonBuilder *builder; JsonGenerator *generator; JsonNode *root_node; - char *data, *timestamp, *url; + char *data, *timestamp, *url, *nick; gsize data_len; const GPtrArray *aps; /* As in Access Points */ guint i, frequency; gdouble lat, lon, accuracy, altitude; GTimeVal tv; - url = get_submit_url (); + url = get_submit_config (&nick); if (url == NULL) goto out; @@ -592,6 +792,10 @@ g_object_unref (generator); ret = soup_message_new ("POST", url); + if (nick != NULL && nick[0] != '\0') + soup_message_headers_append (ret->request_headers, + "X-Nickname", + nick); soup_message_set_request (ret, "application/json", SOUP_MEMORY_TAKE, @@ -603,3 +807,4 @@ out: return ret; } +#endif diff -Nru geoclue-2.0-2.1.7/src/gclue-wifi.h geoclue-2.0-2.1.8/src/gclue-wifi.h --- geoclue-2.0-2.1.7/src/gclue-wifi.h 2014-01-24 15:44:45.000000000 +0000 +++ geoclue-2.0-2.1.8/src/gclue-wifi.h 2014-04-09 19:10:17.000000000 +0000 @@ -28,8 +28,6 @@ G_BEGIN_DECLS -#define GCLUE_WIFI_ACCURACY_LEVEL GCLUE_ACCURACY_LEVEL_STREET - GType gclue_wifi_get_type (void) G_GNUC_CONST; #define GCLUE_TYPE_WIFI (gclue_wifi_get_type ()) @@ -64,7 +62,8 @@ GClueWebSourceClass parent_class; }; -GClueWifi * gclue_wifi_get_singleton (void); +GClueWifi * gclue_wifi_get_singleton (GClueAccuracyLevel level); +GClueAccuracyLevel gclue_wifi_get_accuracy_level (GClueWifi *wifi); G_END_DECLS diff -Nru geoclue-2.0-2.1.7/src/geoclue-interface.c geoclue-2.0-2.1.8/src/geoclue-interface.c --- geoclue-2.0-2.1.7/src/geoclue-interface.c 2014-03-11 12:25:10.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoclue-interface.c 2014-04-15 21:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.38.2. DO NOT EDIT. + * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -719,10 +719,16 @@ static void gclue_manager_proxy_iface_init (GClueManagerIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueManagerProxy, gclue_manager_proxy, G_TYPE_DBUS_PROXY, G_ADD_PRIVATE (GClueManagerProxy) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_MANAGER, gclue_manager_proxy_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueManagerProxy, gclue_manager_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_MANAGER, gclue_manager_proxy_iface_init)); + +#endif static void gclue_manager_proxy_finalize (GObject *object) { @@ -762,14 +768,20 @@ { const _ExtendedGDBusPropertyInfo *info = user_data; GError *error; + GVariant *_ret; error = NULL; - if (!g_dbus_proxy_call_finish (proxy, res, &error)) + _ret = g_dbus_proxy_call_finish (proxy, res, &error); + if (!_ret) { g_warning ("Error setting property '%s' on interface org.freedesktop.GeoClue2.Manager: %s (%s, %d)", info->parent_struct.name, error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } + else + { + g_variant_unref (_ret); + } } static void @@ -895,7 +907,12 @@ static void gclue_manager_proxy_init (GClueManagerProxy *proxy) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 proxy->priv = gclue_manager_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GCLUE_TYPE_MANAGER_PROXY, GClueManagerProxyPrivate); +#endif + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gclue_manager_interface_info ()); } @@ -914,8 +931,11 @@ proxy_class->g_signal = gclue_manager_proxy_g_signal; proxy_class->g_properties_changed = gclue_manager_proxy_g_properties_changed; - gclue_manager_override_properties (gobject_class, 1); + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueManagerProxyPrivate)); +#endif } static void @@ -1334,10 +1354,16 @@ } static void gclue_manager_skeleton_iface_init (GClueManagerIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueManagerSkeleton, gclue_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_ADD_PRIVATE (GClueManagerSkeleton) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_MANAGER, gclue_manager_skeleton_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueManagerSkeleton, gclue_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_MANAGER, gclue_manager_skeleton_iface_init)); + +#endif static void gclue_manager_skeleton_finalize (GObject *object) { @@ -1495,7 +1521,12 @@ static void gclue_manager_skeleton_init (GClueManagerSkeleton *skeleton) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 skeleton->priv = gclue_manager_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GCLUE_TYPE_MANAGER_SKELETON, GClueManagerSkeletonPrivate); +#endif + g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); skeleton->priv->properties = g_new0 (GValue, 2); @@ -1545,6 +1576,10 @@ skeleton_class->get_properties = gclue_manager_skeleton_dbus_interface_get_properties; skeleton_class->flush = gclue_manager_skeleton_dbus_interface_flush; skeleton_class->get_vtable = gclue_manager_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueManagerSkeletonPrivate)); +#endif } static void @@ -1713,12 +1748,26 @@ FALSE }; +static const _ExtendedGDBusPropertyInfo _gclue_client_property_info_active = +{ + { + -1, + (gchar *) "Active", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "active", + FALSE +}; + static const _ExtendedGDBusPropertyInfo * const _gclue_client_property_info_pointers[] = { &_gclue_client_property_info_location, &_gclue_client_property_info_distance_threshold, &_gclue_client_property_info_desktop_id, &_gclue_client_property_info_requested_accuracy_level, + &_gclue_client_property_info_active, NULL }; @@ -1766,6 +1815,7 @@ g_object_class_override_property (klass, property_id_begin++, "distance-threshold"); g_object_class_override_property (klass, property_id_begin++, "desktop-id"); g_object_class_override_property (klass, property_id_begin++, "requested-accuracy-level"); + g_object_class_override_property (klass, property_id_begin++, "active"); return property_id_begin - 1; } @@ -1782,6 +1832,7 @@ * @parent_iface: The parent interface. * @handle_start: Handler for the #GClueClient::handle-start signal. * @handle_stop: Handler for the #GClueClient::handle-stop signal. + * @get_active: Getter for the #GClueClient:active property. * @get_desktop_id: Getter for the #GClueClient:desktop-id property. * @get_distance_threshold: Getter for the #GClueClient:distance-threshold property. * @get_location: Getter for the #GClueClient:location property. @@ -1900,6 +1951,15 @@ */ g_object_interface_install_property (iface, g_param_spec_uint ("requested-accuracy-level", "RequestedAccuracyLevel", "RequestedAccuracyLevel", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GClueClient:active: + * + * Represents the D-Bus property "Active". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("active", "Active", "Active", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } /** @@ -2067,6 +2127,37 @@ } /** + * gclue_client_get_active: (skip) + * @object: A #GClueClient. + * + * Gets the value of the "Active" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +gclue_client_get_active (GClueClient *object) +{ + return GCLUE_CLIENT_GET_IFACE (object)->get_active (object); +} + +/** + * gclue_client_set_active: (skip) + * @object: A #GClueClient. + * @value: The value to set. + * + * Sets the "Active" D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +gclue_client_set_active (GClueClient *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "active", value, NULL); +} + +/** * gclue_client_emit_location_updated: * @object: A #GClueClient. * @arg_old: Argument to pass with the signal. @@ -2325,10 +2416,16 @@ static void gclue_client_proxy_iface_init (GClueClientIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueClientProxy, gclue_client_proxy, G_TYPE_DBUS_PROXY, G_ADD_PRIVATE (GClueClientProxy) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_CLIENT, gclue_client_proxy_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueClientProxy, gclue_client_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_CLIENT, gclue_client_proxy_iface_init)); + +#endif static void gclue_client_proxy_finalize (GObject *object) { @@ -2345,7 +2442,7 @@ { const _ExtendedGDBusPropertyInfo *info; GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); info = _gclue_client_property_info_pointers[prop_id - 1]; variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); if (info->use_gvariant) @@ -2368,14 +2465,20 @@ { const _ExtendedGDBusPropertyInfo *info = user_data; GError *error; + GVariant *_ret; error = NULL; - if (!g_dbus_proxy_call_finish (proxy, res, &error)) + _ret = g_dbus_proxy_call_finish (proxy, res, &error); + if (!_ret) { g_warning ("Error setting property '%s' on interface org.freedesktop.GeoClue2.Client: %s (%s, %d)", info->parent_struct.name, error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } + else + { + g_variant_unref (_ret); + } } static void @@ -2386,7 +2489,7 @@ { const _ExtendedGDBusPropertyInfo *info; GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); info = _gclue_client_property_info_pointers[prop_id - 1]; variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); g_dbus_proxy_call (G_DBUS_PROXY (object), @@ -2528,10 +2631,30 @@ return value; } +static gboolean +gclue_client_proxy_get_active (GClueClient *object) +{ + GClueClientProxy *proxy = GCLUE_CLIENT_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Active"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + static void gclue_client_proxy_init (GClueClientProxy *proxy) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 proxy->priv = gclue_client_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GCLUE_TYPE_CLIENT_PROXY, GClueClientProxyPrivate); +#endif + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gclue_client_interface_info ()); } @@ -2550,8 +2673,11 @@ proxy_class->g_signal = gclue_client_proxy_g_signal; proxy_class->g_properties_changed = gclue_client_proxy_g_properties_changed; - gclue_client_override_properties (gobject_class, 1); + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueClientProxyPrivate)); +#endif } static void @@ -2561,6 +2687,7 @@ iface->get_distance_threshold = gclue_client_proxy_get_distance_threshold; iface->get_desktop_id = gclue_client_proxy_get_desktop_id; iface->get_requested_accuracy_level = gclue_client_proxy_get_requested_accuracy_level; + iface->get_active = gclue_client_proxy_get_active; } /** @@ -2998,16 +3125,22 @@ } static void gclue_client_skeleton_iface_init (GClueClientIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueClientSkeleton, gclue_client_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_ADD_PRIVATE (GClueClientSkeleton) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_CLIENT, gclue_client_skeleton_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueClientSkeleton, gclue_client_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_CLIENT, gclue_client_skeleton_iface_init)); + +#endif static void gclue_client_skeleton_finalize (GObject *object) { GClueClientSkeleton *skeleton = GCLUE_CLIENT_SKELETON (object); guint n; - for (n = 0; n < 4; n++) + for (n = 0; n < 5; n++) g_value_unset (&skeleton->priv->properties[n]); g_free (skeleton->priv->properties); g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); @@ -3025,7 +3158,7 @@ GParamSpec *pspec G_GNUC_UNUSED) { GClueClientSkeleton *skeleton = GCLUE_CLIENT_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); g_mutex_lock (&skeleton->priv->lock); g_value_copy (&skeleton->priv->properties[prop_id - 1], value); g_mutex_unlock (&skeleton->priv->lock); @@ -3142,7 +3275,7 @@ GParamSpec *pspec) { GClueClientSkeleton *skeleton = GCLUE_CLIENT_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); g_mutex_lock (&skeleton->priv->lock); g_object_freeze_notify (object); if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) @@ -3159,14 +3292,20 @@ static void gclue_client_skeleton_init (GClueClientSkeleton *skeleton) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 skeleton->priv = gclue_client_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GCLUE_TYPE_CLIENT_SKELETON, GClueClientSkeletonPrivate); +#endif + g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 4); + skeleton->priv->properties = g_new0 (GValue, 5); g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT); g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); g_value_init (&skeleton->priv->properties[3], G_TYPE_UINT); + g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN); } static const gchar * @@ -3213,6 +3352,17 @@ return value; } +static gboolean +gclue_client_skeleton_get_active (GClueClient *object) +{ + GClueClientSkeleton *skeleton = GCLUE_CLIENT_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[4])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + static void gclue_client_skeleton_class_init (GClueClientSkeletonClass *klass) { @@ -3233,6 +3383,10 @@ skeleton_class->get_properties = gclue_client_skeleton_dbus_interface_get_properties; skeleton_class->flush = gclue_client_skeleton_dbus_interface_flush; skeleton_class->get_vtable = gclue_client_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueClientSkeletonPrivate)); +#endif } static void @@ -3243,6 +3397,7 @@ iface->get_distance_threshold = gclue_client_skeleton_get_distance_threshold; iface->get_desktop_id = gclue_client_skeleton_get_desktop_id; iface->get_requested_accuracy_level = gclue_client_skeleton_get_requested_accuracy_level; + iface->get_active = gclue_client_skeleton_get_active; } /** @@ -3312,6 +3467,19 @@ FALSE }; +static const _ExtendedGDBusPropertyInfo _gclue_location_property_info_altitude = +{ + { + -1, + (gchar *) "Altitude", + (gchar *) "d", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "altitude", + FALSE +}; + static const _ExtendedGDBusPropertyInfo _gclue_location_property_info_description = { { @@ -3330,6 +3498,7 @@ &_gclue_location_property_info_latitude, &_gclue_location_property_info_longitude, &_gclue_location_property_info_accuracy, + &_gclue_location_property_info_altitude, &_gclue_location_property_info_description, NULL }; @@ -3377,6 +3546,7 @@ g_object_class_override_property (klass, property_id_begin++, "latitude"); g_object_class_override_property (klass, property_id_begin++, "longitude"); g_object_class_override_property (klass, property_id_begin++, "accuracy"); + g_object_class_override_property (klass, property_id_begin++, "altitude"); g_object_class_override_property (klass, property_id_begin++, "description"); return property_id_begin - 1; } @@ -3393,6 +3563,7 @@ * GClueLocationIface: * @parent_iface: The parent interface. * @get_accuracy: Getter for the #GClueLocation:accuracy property. + * @get_altitude: Getter for the #GClueLocation:altitude property. * @get_description: Getter for the #GClueLocation:description property. * @get_latitude: Getter for the #GClueLocation:latitude property. * @get_longitude: Getter for the #GClueLocation:longitude property. @@ -3435,6 +3606,15 @@ g_object_interface_install_property (iface, g_param_spec_double ("accuracy", "Accuracy", "Accuracy", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** + * GClueLocation:altitude: + * + * Represents the D-Bus property "Altitude". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_double ("altitude", "Altitude", "Altitude", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GClueLocation:description: * * Represents the D-Bus property "Description". @@ -3539,6 +3719,37 @@ } /** + * gclue_location_get_altitude: (skip) + * @object: A #GClueLocation. + * + * Gets the value of the "Altitude" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gdouble +gclue_location_get_altitude (GClueLocation *object) +{ + return GCLUE_LOCATION_GET_IFACE (object)->get_altitude (object); +} + +/** + * gclue_location_set_altitude: (skip) + * @object: A #GClueLocation. + * @value: The value to set. + * + * Sets the "Altitude" D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +gclue_location_set_altitude (GClueLocation *object, gdouble value) +{ + g_object_set (G_OBJECT (object), "altitude", value, NULL); +} + +/** * gclue_location_get_description: (skip) * @object: A #GClueLocation. * @@ -3611,10 +3822,16 @@ static void gclue_location_proxy_iface_init (GClueLocationIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueLocationProxy, gclue_location_proxy, G_TYPE_DBUS_PROXY, G_ADD_PRIVATE (GClueLocationProxy) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_LOCATION, gclue_location_proxy_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueLocationProxy, gclue_location_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_LOCATION, gclue_location_proxy_iface_init)); + +#endif static void gclue_location_proxy_finalize (GObject *object) { @@ -3631,7 +3848,7 @@ { const _ExtendedGDBusPropertyInfo *info; GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); info = _gclue_location_property_info_pointers[prop_id - 1]; variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); if (info->use_gvariant) @@ -3654,14 +3871,20 @@ { const _ExtendedGDBusPropertyInfo *info = user_data; GError *error; + GVariant *_ret; error = NULL; - if (!g_dbus_proxy_call_finish (proxy, res, &error)) + _ret = g_dbus_proxy_call_finish (proxy, res, &error); + if (!_ret) { g_warning ("Error setting property '%s' on interface org.freedesktop.GeoClue2.Location: %s (%s, %d)", info->parent_struct.name, error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } + else + { + g_variant_unref (_ret); + } } static void @@ -3672,7 +3895,7 @@ { const _ExtendedGDBusPropertyInfo *info; GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); info = _gclue_location_property_info_pointers[prop_id - 1]; variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); g_dbus_proxy_call (G_DBUS_PROXY (object), @@ -3799,6 +4022,21 @@ return value; } +static gdouble +gclue_location_proxy_get_altitude (GClueLocation *object) +{ + GClueLocationProxy *proxy = GCLUE_LOCATION_PROXY (object); + GVariant *variant; + gdouble value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Altitude"); + if (variant != NULL) + { + value = g_variant_get_double (variant); + g_variant_unref (variant); + } + return value; +} + static const gchar * gclue_location_proxy_get_description (GClueLocation *object) { @@ -3817,7 +4055,12 @@ static void gclue_location_proxy_init (GClueLocationProxy *proxy) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 proxy->priv = gclue_location_proxy_get_instance_private (proxy); +#else + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GCLUE_TYPE_LOCATION_PROXY, GClueLocationProxyPrivate); +#endif + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gclue_location_interface_info ()); } @@ -3836,8 +4079,11 @@ proxy_class->g_signal = gclue_location_proxy_g_signal; proxy_class->g_properties_changed = gclue_location_proxy_g_properties_changed; - gclue_location_override_properties (gobject_class, 1); + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueLocationProxyPrivate)); +#endif } static void @@ -3846,6 +4092,7 @@ iface->get_latitude = gclue_location_proxy_get_latitude; iface->get_longitude = gclue_location_proxy_get_longitude; iface->get_accuracy = gclue_location_proxy_get_accuracy; + iface->get_altitude = gclue_location_proxy_get_altitude; iface->get_description = gclue_location_proxy_get_description; } @@ -4258,16 +4505,22 @@ } static void gclue_location_skeleton_iface_init (GClueLocationIface *iface); +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (GClueLocationSkeleton, gclue_location_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_ADD_PRIVATE (GClueLocationSkeleton) G_IMPLEMENT_INTERFACE (GCLUE_TYPE_LOCATION, gclue_location_skeleton_iface_init)); +#else +G_DEFINE_TYPE_WITH_CODE (GClueLocationSkeleton, gclue_location_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (GCLUE_TYPE_LOCATION, gclue_location_skeleton_iface_init)); + +#endif static void gclue_location_skeleton_finalize (GObject *object) { GClueLocationSkeleton *skeleton = GCLUE_LOCATION_SKELETON (object); guint n; - for (n = 0; n < 4; n++) + for (n = 0; n < 5; n++) g_value_unset (&skeleton->priv->properties[n]); g_free (skeleton->priv->properties); g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); @@ -4285,7 +4538,7 @@ GParamSpec *pspec G_GNUC_UNUSED) { GClueLocationSkeleton *skeleton = GCLUE_LOCATION_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); g_mutex_lock (&skeleton->priv->lock); g_value_copy (&skeleton->priv->properties[prop_id - 1], value); g_mutex_unlock (&skeleton->priv->lock); @@ -4402,7 +4655,7 @@ GParamSpec *pspec) { GClueLocationSkeleton *skeleton = GCLUE_LOCATION_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 4); + g_assert (prop_id != 0 && prop_id - 1 < 5); g_mutex_lock (&skeleton->priv->lock); g_object_freeze_notify (object); if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) @@ -4419,14 +4672,20 @@ static void gclue_location_skeleton_init (GClueLocationSkeleton *skeleton) { +#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 skeleton->priv = gclue_location_skeleton_get_instance_private (skeleton); +#else + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GCLUE_TYPE_LOCATION_SKELETON, GClueLocationSkeletonPrivate); +#endif + g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 4); + skeleton->priv->properties = g_new0 (GValue, 5); g_value_init (&skeleton->priv->properties[0], G_TYPE_DOUBLE); g_value_init (&skeleton->priv->properties[1], G_TYPE_DOUBLE); g_value_init (&skeleton->priv->properties[2], G_TYPE_DOUBLE); - g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[3], G_TYPE_DOUBLE); + g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); } static gdouble @@ -4462,13 +4721,24 @@ return value; } +static gdouble +gclue_location_skeleton_get_altitude (GClueLocation *object) +{ + GClueLocationSkeleton *skeleton = GCLUE_LOCATION_SKELETON (object); + gdouble value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_double (&(skeleton->priv->properties[3])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + static const gchar * gclue_location_skeleton_get_description (GClueLocation *object) { GClueLocationSkeleton *skeleton = GCLUE_LOCATION_SKELETON (object); const gchar *value; g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[3])); + value = g_value_get_string (&(skeleton->priv->properties[4])); g_mutex_unlock (&skeleton->priv->lock); return value; } @@ -4493,6 +4763,10 @@ skeleton_class->get_properties = gclue_location_skeleton_dbus_interface_get_properties; skeleton_class->flush = gclue_location_skeleton_dbus_interface_flush; skeleton_class->get_vtable = gclue_location_skeleton_dbus_interface_get_vtable; + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 + g_type_class_add_private (klass, sizeof (GClueLocationSkeletonPrivate)); +#endif } static void @@ -4501,6 +4775,7 @@ iface->get_latitude = gclue_location_skeleton_get_latitude; iface->get_longitude = gclue_location_skeleton_get_longitude; iface->get_accuracy = gclue_location_skeleton_get_accuracy; + iface->get_altitude = gclue_location_skeleton_get_altitude; iface->get_description = gclue_location_skeleton_get_description; } diff -Nru geoclue-2.0-2.1.7/src/geoclue-interface.h geoclue-2.0-2.1.8/src/geoclue-interface.h --- geoclue-2.0-2.1.7/src/geoclue-interface.h 2014-03-11 12:25:10.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoclue-interface.h 2014-04-15 21:16:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.38.2. DO NOT EDIT. + * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -231,6 +231,8 @@ GClueClient *object, GDBusMethodInvocation *invocation); + gboolean (*get_active) (GClueClient *object); + const gchar * (*get_desktop_id) (GClueClient *object); guint (*get_distance_threshold) (GClueClient *object); @@ -321,6 +323,9 @@ guint gclue_client_get_requested_accuracy_level (GClueClient *object); void gclue_client_set_requested_accuracy_level (GClueClient *object, guint value); +gboolean gclue_client_get_active (GClueClient *object); +void gclue_client_set_active (GClueClient *object, gboolean value); + /* ---- */ @@ -436,6 +441,8 @@ gdouble (*get_accuracy) (GClueLocation *object); + gdouble (*get_altitude) (GClueLocation *object); + const gchar * (*get_description) (GClueLocation *object); gdouble (*get_latitude) (GClueLocation *object); @@ -460,6 +467,9 @@ gdouble gclue_location_get_accuracy (GClueLocation *object); void gclue_location_set_accuracy (GClueLocation *object, gdouble value); +gdouble gclue_location_get_altitude (GClueLocation *object); +void gclue_location_set_altitude (GClueLocation *object, gdouble value); + const gchar *gclue_location_get_description (GClueLocation *object); gchar *gclue_location_dup_description (GClueLocation *object); void gclue_location_set_description (GClueLocation *object, const gchar *value); diff -Nru geoclue-2.0-2.1.7/src/geocode-glib/Makefile.in geoclue-2.0-2.1.8/src/geocode-glib/Makefile.in --- geoclue-2.0-2.1.7/src/geocode-glib/Makefile.in 2014-03-25 02:19:45.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geocode-glib/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -83,10 +83,10 @@ subdir = src/geocode-glib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -201,16 +201,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ diff -Nru geoclue-2.0-2.1.7/src/geoip-server/API-Documentation.txt geoclue-2.0-2.1.8/src/geoip-server/API-Documentation.txt --- geoclue-2.0-2.1.7/src/geoip-server/API-Documentation.txt 2013-11-26 01:03:19.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/API-Documentation.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -1. What does the server do? - -The server performs IP address and Wi-Fi based geolocation search. - -2. How to set up the server? - -After building geoclue, you will get a geoip-lookup binary that you can install -as a cgi-bin script inside your web server, or use the test application -("launch-web-server.sh") as below. - -$ ./launch-web-server.sh start - to start the server -$ ./launch-web-server.sh stop - to stop the server - -The script will set up the server at your http://localhost:12345. - -And the URL will be - http://localhost:12345/cgi-bin/geoip-lookup - -3. How should one query the server for IP address based Geolocation search? - -There are 2 ways - - -a. You can provide a query string in the format of "?ip=". After -installing the server at your localhost using the script, you can use - - - http://localhost:12345/cgi-bin/geoip-lookup?ip=123.23.23.23 - -b. If you do not provide the query string, the server will autodetect -the client's external IP address. - -If you have used launch-web-server.sh script to launch the server, the script -sets HTTP_CLIENT_IP (one of the many proxy variables checked by the server to -guess client's IP address) and thus a simple -http://localhost:12345/cgi-bin/geoip-lookup works. - -4. How should one query the server for Wi-Fi based geolocation search? - -The query string should be in the format of - - -?wifi=mac:|ssid:|ss:[&...] - -The server installed by the script at your localhost can be queried using the -following URL - - -http://localhost:12345/cgi-bin/geoip-lookup?wifi=mac:01-24-7c-bc-51-46%7Cssid:3x2x%7Css:-37&wifi=mac:09-86-3b-31-97-b2%7Cssid:belkin.7b2%7Css:-47&wifi=mac:28-cf-da-ba-be-13%7Cssid:HERESIARCH%20NETWORK%7Css:-49&wifi=mac:2b-cf-da-ba-be-10%7Cssid:%20ARCH%20GUESTS%7Css:-52&wifi=mac:08-56-3b-2b-e1-a8%7Cssid:belkin.1a8%7Css:-59&wifi=mac:02-1e-64-fd-df-67%7Cssid:Brown%20Cow%7Css:-59&wifi=mac:2a-cf-df-ba-be-10%7Cssid:%20ARCH%20GUESTS%7Css:-59 - -5. What is the output format of the server? - -The server provides Geolocation information in JSON format. - -An IP address based query would return - - -{"ip":"123.23.23.23","latitude":10.25,"longitude":105.96669769287109, -"country_name":"Vietnam","country_code":"VN","region_name":"Phu Yen", -"city":"Vinh Long","accuracy":"city","timezone":"Asia/Phnom_Penh", -"attribution":"This product includes GeoLite data created by MaxMind, - available from http://www.maxmind.com\n"} - -An Wi-Fi based query would return - - -{"latitude":40.060449299999988,"longitude":-105.2094195,"accuracy":24} - -6. What are the possible error scenarios and error messages? - -The server gives the following errors in the following cases - - -a. Invalid IP address - -{"error_code":0, "error_message":"Invalid IP address '123.23.23'"} - -b. Reserved IP address - -{"error_code":1, "error_message":"Can not find the IP address '127.0.0.1' in the -database"} - -c. Database not found by the server - -{"error_code":2, "error_message":"Can not open GeoLiteCity/GeoIP Binary database. -Set GEOIP_DATABASE_PATH env variable."} - -The error codes in the JSON output shown above are enum values. - -typedef enum { - INVALID_IP_ADDRESS_ERR = 0, - INVALID_ENTRY_ERR, - DATABASE_ERR -} GeoipServerError; - -They are defined in -http://cgit.freedesktop.org/geoclue/tree/src/geoip-server/geoip-server.h diff -Nru geoclue-2.0-2.1.7/src/geoip-server/geoip-lookup.c geoclue-2.0-2.1.8/src/geoip-server/geoip-lookup.c --- geoclue-2.0-2.1.7/src/geoip-server/geoip-lookup.c 2013-11-26 01:03:19.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/geoip-lookup.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ -/* vim: set et ts=8 sw=8: */ -/* geoip-lookup.c - * - * Copyright (C) 2013 Red Hat, Inc. - * Copyright (C) 2013 Satabdi Das - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Satabdi Das - * Bastien Nocera - * Zeeshan Ali (Khattak) - */ - -#include -#include -#include -#include -#include -#include - -#include "geoip-server.h" - -#define WIFI_LOOKUP_BASE_URI "https://maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&sensor=true" - -static const char *attribution_text = "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com"; - -static void -print_error_in_json (GeoipServerError error_code, - const char *extra_info) -{ - g_print ("{\"error_code\":%d, \"error_message\":\"", error_code); - - switch (error_code) { - case INVALID_IP_ADDRESS_ERR: - g_print ("Invalid IP address '%s'", extra_info ? extra_info : "(none)"); - break; - case INVALID_ENTRY_ERR: - g_print ("Can not find the IP address '%s' in the database", extra_info); - break; - case DATABASE_ERR: - g_print ("Can not open GeoLiteCity/GeoIP Binary database. Set GEOIP_DATABASE_PATH env variable."); - break; - default: - g_assert_not_reached (); - } - - g_print ("\"}\n"); -} - -static JsonBuilder* -add_result_attr_to_json_tree (const char *ipaddress, - GeoIP *gi) -{ - const char *timezone = NULL; - JsonBuilder *builder; - GeoIPRecord *gir; - - gir = GeoIP_record_by_addr (gi, ipaddress); - if (gir == NULL) { - print_error_in_json (INVALID_ENTRY_ERR, ipaddress); - return NULL; - } - - builder = json_builder_new (); - - json_builder_begin_object (builder); /* begin */ - - json_builder_set_member_name (builder, "ip"); - json_builder_add_string_value (builder, ipaddress); - - json_builder_set_member_name (builder, "latitude"); - json_builder_add_double_value (builder, gir->latitude); - json_builder_set_member_name (builder, "longitude"); - json_builder_add_double_value (builder, gir->longitude); - - const char *accuracy = "country"; - - /* Country level information */ - if (gir->country_name != NULL) { - json_builder_set_member_name (builder, "country_name"); - json_builder_add_string_value (builder, gir->country_name); - } - if (gir->country_code != NULL) { - json_builder_set_member_name (builder, "country_code"); - json_builder_add_string_value (builder, gir->country_code); - - /* Region level information */ - if (gir->region != NULL) { - accuracy = "region"; - json_builder_set_member_name (builder, "region_name"); - json_builder_add_string_value (builder, - GeoIP_region_name_by_code (gir->country_code, gir->region)); - } - } - if (gir->area_code > 0) { - json_builder_set_member_name (builder, "areacode"); - json_builder_add_int_value (builder, gir->area_code); - } - - /* City level information */ - if (gir->city != NULL) { - accuracy = "city"; - json_builder_set_member_name (builder, "city"); - json_builder_add_string_value (builder, gir->city); - } - if (gir->postal_code != NULL) { - json_builder_set_member_name (builder, "zipcode"); - json_builder_add_string_value (builder, gir->postal_code); - } - if (gir->metro_code > 0) { - json_builder_set_member_name (builder, "metro_code"); - json_builder_add_int_value (builder, gir->metro_code); - } - - json_builder_set_member_name (builder, "accuracy"); - json_builder_add_string_value (builder, accuracy); - - timezone = GeoIP_time_zone_by_country_and_region(gir->country_code, gir->region); - if (timezone) { - json_builder_set_member_name (builder, "timezone"); - json_builder_add_string_value (builder, timezone); - } - - json_builder_set_member_name (builder, "attribution"); - json_builder_add_string_value (builder, attribution_text); - - json_builder_end_object (builder); /* end */ - - GeoIPRecord_delete (gir); - - return builder; -} - -static JsonBuilder* -add_result_attr_to_json_tree_geoipdb (const char *ipaddress, - GeoIP *gi) -{ - JsonBuilder *builder; - const char *country_name; - const char *country_code; - - country_code = GeoIP_country_code_by_addr (gi, ipaddress); - country_name = GeoIP_country_name_by_addr (gi, ipaddress); - - if (!country_name && !country_code) { - print_error_in_json (INVALID_ENTRY_ERR, ipaddress); - return NULL; - } - - builder = json_builder_new (); - - json_builder_begin_object (builder); /* begin */ - - json_builder_set_member_name (builder, "ip"); - json_builder_add_string_value (builder, ipaddress); - - json_builder_set_member_name (builder, "country_code"); - json_builder_add_string_value (builder, country_code); - json_builder_set_member_name (builder, "country_name"); - json_builder_add_string_value (builder, country_name); - - json_builder_set_member_name (builder, "accuracy"); - json_builder_add_string_value (builder, "country"); - - json_builder_set_member_name (builder, "attribution"); - json_builder_add_string_value (builder, attribution_text); - - json_builder_end_object (builder); /* end */ - - return builder; -} - -static void -print_json_data (JsonBuilder *builder) -{ - JsonNode *node; - JsonGenerator *generator; - char *json_data; - gsize length; - - node = json_builder_get_root (builder); - - generator = json_generator_new (); - json_generator_set_root (generator, node); - json_data = json_generator_to_data (generator, &length); - g_print ("%*s\n", (int) length, json_data); - - g_free (json_data); - json_node_free (node); - g_object_unref (generator); -} - - -static void -ip_addr_lookup (const char *ipaddress) -{ - GeoIP *gi; - JsonBuilder *builder; - const char *db_path; - char *db; - gboolean using_geoip_db = FALSE; - - db_path = g_getenv ("GEOIP_DATABASE_PATH"); - if (!db_path) - db_path = GEOIP_DATABASE_PATH ; - db = g_strconcat (db_path, "/GeoLiteCity.dat", NULL); - if (g_file_test (db, G_FILE_TEST_EXISTS) == FALSE) { - g_free (db); - db = g_strconcat (db_path, "/GeoIP.dat", NULL); - using_geoip_db = TRUE; - } - - gi = GeoIP_open (db, GEOIP_STANDARD | GEOIP_CHECK_CACHE); - g_free (db); - if (gi == NULL) { - print_error_in_json (DATABASE_ERR, NULL); - return; - } - - if (using_geoip_db == TRUE) - builder = add_result_attr_to_json_tree_geoipdb (ipaddress, gi); - else - builder = add_result_attr_to_json_tree (ipaddress, gi); - - if (!builder) - return; - - print_json_data (builder); - g_object_unref (builder); - GeoIP_delete (gi); -} - -static gboolean -validate_ip_address (const char *ipaddress) -{ - /* TODO : put a check for private ips */ - GInetAddress *inet_address; - - if (!ipaddress) - return FALSE; - - inet_address = g_inet_address_new_from_string (ipaddress); - if (inet_address) { - g_object_unref (inet_address); - return TRUE; - } - return FALSE; -} - -static char * -get_client_ipaddress (void) -{ - const char *data; - char *value; - guint i; - static const char *variables[] = { - "HTTP_CLIENT_IP", - "HTTP_X_FORWARDED_FOR", - "HTTP_X_FORWARDED", - "HTTP_X_CLUSTER_CLIENT_IP", - "HTTP_FORWARDED_FOR", - "HTTP_FORWARDED", - "REMOTE_ADDR", - }; - - for (i = 0; i < G_N_ELEMENTS (variables); i++) { - data = g_getenv (variables[i]); - if (g_strcmp0 (variables[i], "HTTP_X_FORWARDED_FOR") == 0) { - if (data) { - int j; - char **data_array; - data_array = g_strsplit (data, ",", 0); - for (j = 0; data_array[j] != NULL; j++) { - data = data_array[j]; - if (validate_ip_address (data) == TRUE) { - value = g_strdup (data); - g_strfreev (data_array); - return value; - } - } - g_strfreev (data_array); - } - } else { - if (validate_ip_address (data) == TRUE) - return g_strdup (data); - } - } - print_error_in_json (INVALID_IP_ADDRESS_ERR, NULL); - return NULL; -} - -/* parse_json_for_wifi function parses the JSON output from - * google web service and converts it into the JSON format - * used by geocode-glib library. On failure, it returns FALSE. - * It doesn't print any error message since the IP based search - * is performed if Wi-Fi based search fails. - */ -static gboolean -parse_json_for_wifi (const char *data) -{ - JsonParser *parser; - JsonNode *root; - JsonObject *root_object; - JsonObject *loc_obj; - JsonBuilder *builder; - GError *error; - - parser = json_parser_new (); - if (json_parser_load_from_data (parser, data, -1, &error) == FALSE) { - g_object_unref (parser); - return FALSE; - } - - root = json_parser_get_root (parser); - root_object = json_node_get_object (root); - - loc_obj = json_object_get_object_member (root_object, "location"); - - if (loc_obj == NULL) { - return FALSE; - } - builder = json_builder_new (); - json_builder_begin_object (builder); - json_builder_set_member_name (builder, "latitude"); - json_builder_add_double_value (builder, - json_object_get_double_member (loc_obj, "lat")); - json_builder_set_member_name (builder, "longitude"); - json_builder_add_double_value (builder, - json_object_get_double_member (loc_obj, "lng")); - - - json_builder_set_member_name (builder, "accuracy"); - json_builder_add_double_value (builder, - json_object_get_double_member (root_object, "accuracy")); - - /* TODO: What should the text of the attribution text be? */ - json_builder_end_object (builder); - print_json_data (builder); - g_object_unref (parser); - g_object_unref (builder); - return TRUE; -} - -static gboolean -wifi_ap_lookup (const char *data) -{ - SoupSession *session; - SoupMessage *msg; - char *final_uri; - - session = soup_session_sync_new (); - final_uri = g_strconcat (WIFI_LOOKUP_BASE_URI, "&", data, NULL); - msg = soup_message_new ("GET", final_uri); - g_free (final_uri); - - soup_session_send_message (session, msg); - if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { - return parse_json_for_wifi (msg->response_body->data); - } - - return FALSE; -} - -/* Taken from libsoup/soup-form.c */ -#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10) -#define HEXCHAR(s) ((XDIGIT (s[1]) << 4) + XDIGIT (s[2])) - -static gboolean -form_decode (char *part) -{ - unsigned char *s, *d; - - s = d = (unsigned char *)part; - do { - if (*s == '%') { - if (!g_ascii_isxdigit (s[1]) || - !g_ascii_isxdigit (s[2])) - return FALSE; - *d++ = HEXCHAR (s); - s += 2; - } else if (*s == '+') - *d++ = ' '; - else - *d++ = *s; - } while (*s++); - - return TRUE; -} - -/** - * decode_query_string () returns a hashtable of Wi-Fi AP - * details and fills the ipaddress variable if there's any - * ip address in the query string. - **/ -static GHashTable * -decode_query_string (const char *encoded_form, - char **ipaddress) -{ - GHashTable *form_data_set; - char **pairs, *eq, *name, *value; - int i; - - form_data_set = g_hash_table_new_full (g_direct_hash, g_direct_equal, - g_free, NULL); - pairs = g_strsplit (encoded_form, "&", -1); - for (i = 0; pairs[i]; i++) { - name = pairs[i]; - - eq = strchr (name, '='); - if (!eq) - goto end; - *eq = '\0'; - value = eq + 1; - - if (!form_decode (name) || !form_decode (value)) - goto end; - if (strcmp (name, "wifi") == 0) { - g_hash_table_insert (form_data_set, name, value); - continue; - } else if (strcmp (name, "ip") == 0) { - *ipaddress = g_strdup (value); - } -end: - g_free (name); - } - - g_free (pairs); - - return form_data_set; -} - -int -main (void) -{ - GHashTable *ht; - char *ipaddress = NULL; - const char *data; - -#if (!GLIB_CHECK_VERSION (2, 36, 0)) - g_type_init (); -#endif - - g_print ("Content-type: text/plain;charset=us-ascii\n\n"); - /* If the query string contains a Wi-Fi field, request - * the information from the Google web service. otherwise - * use MaxMind's database for an IP-based search. - * IP-based search is also used as a fallback option - * when the Wi-Fi based lookup returns an error. */ - data = g_getenv ("QUERY_STRING"); - if (data != NULL) { - ht = decode_query_string (data, &ipaddress); - if (g_hash_table_size (ht) > 0) { - char *wifi_ap = soup_form_encode_hash (ht); - if (wifi_ap_lookup (wifi_ap) != FALSE) { - g_hash_table_destroy (ht); - g_free (wifi_ap); - return 0; - } - g_free (wifi_ap); - } - g_hash_table_destroy (ht); - } - - if (ipaddress) { - if (validate_ip_address (ipaddress) == FALSE) { - print_error_in_json (INVALID_IP_ADDRESS_ERR, ipaddress); - g_free (ipaddress); - return 1; - } - } else { - ipaddress = get_client_ipaddress (); - } - - if (!ipaddress) - return 1; - - ip_addr_lookup (ipaddress); - g_free (ipaddress); - - return 0; -} diff -Nru geoclue-2.0-2.1.7/src/geoip-server/geoip-server.h geoclue-2.0-2.1.8/src/geoip-server/geoip-server.h --- geoclue-2.0-2.1.7/src/geoip-server/geoip-server.h 2013-11-26 01:03:19.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/geoip-server.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ -/* vim: set et ts=8 sw=8: */ -/* geoip-server.h - * - * Copyright (C) 2013 Red Hat, Inc. - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Zeeshan Ali (Khattak) - */ - -#ifndef GEOIP_SERVER_H -#define GEOIP_SERVER_H - -#include - -typedef enum { - INVALID_IP_ADDRESS_ERR = 0, - INVALID_ENTRY_ERR, - DATABASE_ERR -} GeoipServerError; - -#endif /* GEOIP_SERVER_H */ diff -Nru geoclue-2.0-2.1.7/src/geoip-server/geoip-update.c geoclue-2.0-2.1.8/src/geoip-server/geoip-update.c --- geoclue-2.0-2.1.7/src/geoip-server/geoip-update.c 2013-11-26 01:03:19.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/geoip-update.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,282 +0,0 @@ -/* vim: set et ts=8 sw=8: */ -/* geoip-update.c - * - * Copyright (C) 2013 Red Hat, Inc. - * Copyright (C) 2013 Satabdi Das - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Satabdi Das - * Bastien Nocera - * Zeeshan Ali (Khattak) - */ - -#include -#include -#include -#include - -static struct { - const char *uri; - const char *db_gz_name; - const char *db_name; -} db_info_map[] = { - {"http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz", - "GeoLiteCity.dat.gz", - "GeoLiteCity.dat" - }, - {"http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz", - "GeoIP.dat.gz", - "GeoIP.dat" - } -}; - -/* local_db_needs_update function returns TRUE on success and FALSE on failure. - * It sets the parameter needs_update to TRUE if the local database needs - * to be updated. - */ -static gboolean -local_db_needs_update (SoupSession *session, - const char *db_uri, - GFile *db_local, - gboolean *needs_update, - GError **error) -{ - GFileInfo *db_local_info; - SoupMessage *msg; - SoupDate *date; - const gchar *db_time_str; - guint64 db_time; - guint64 db_local_time; - guint status_code; - - if (g_file_query_exists (db_local, NULL) == FALSE) { - *needs_update = TRUE; - return TRUE; - } - - msg = soup_message_new ("HEAD", db_uri); - status_code = soup_session_send_message (session, msg); - if (status_code != SOUP_STATUS_OK) { - g_set_error_literal (error, - SOUP_HTTP_ERROR, - status_code, - msg->reason_phrase); - return FALSE; - } - - db_time_str = soup_message_headers_get_one (msg->response_headers, "Last-Modified"); - date = soup_date_new_from_string (db_time_str); - db_time = (guint64) soup_date_to_time_t (date); - soup_date_free (date); - g_object_unref (msg); - - db_local_info = g_file_query_info (db_local, - "time::modified", - G_FILE_QUERY_INFO_NONE, - NULL, - error); - if (!db_local_info) - return FALSE; - - db_local_time = g_file_info_get_attribute_uint64 (db_local_info, "time::modified"); - if (db_time <= db_local_time) - *needs_update = FALSE; - else - *needs_update = TRUE; - - g_object_unref (db_local_info); - - return TRUE; -} - -static void -decompress_db (GFile *db, const char *path) -{ - GFile *db_decomp; - GFile *db_decomp_tmp; - GError *error = NULL; - GZlibDecompressor *conv; - GInputStream *instream; - GInputStream *instream_conv; - GOutputStream *outstream; - char *tmp_db_path; - - instream = (GInputStream *) g_file_read (db, NULL, &error); - if (!instream) { - g_print ("Error opening file: %s", error->message); - g_error_free (error); - return; - } - - conv = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP); - instream_conv = (GInputStream *) g_converter_input_stream_new (instream, G_CONVERTER (conv)); - g_object_unref (instream); - - tmp_db_path = g_strdup_printf ("%s.%s", path, "tmp"); - db_decomp_tmp = g_file_new_for_path (tmp_db_path); - g_free (tmp_db_path); - outstream = (GOutputStream *) g_file_replace (db_decomp_tmp, - NULL, - FALSE, - G_FILE_CREATE_NONE, - NULL, - &error); - if (!outstream) { - g_print ("Error creating file: %s\n", error->message); - g_error_free (error); - goto end; - } - - if (g_output_stream_splice (outstream, - instream_conv, - 0, - NULL, - &error) == -1) { - g_print ("Error decompressing the database: %s\n", error->message); - g_object_unref (outstream); - g_error_free (error); - goto end; - } - - if (g_output_stream_close (outstream, - NULL, - &error) == FALSE) { - g_print ("Error decompressing the database: %s\n", error->message); - g_error_free (error); - } else { - db_decomp = g_file_new_for_path (path); - if (g_file_move (db_decomp_tmp, - db_decomp, - G_FILE_COPY_OVERWRITE, - NULL, - NULL, - NULL, - &error) == FALSE) { - g_print ("Error moving the temporary database file to the" \ - " original database file: %s\n", error->message); - g_error_free (error); - } else { - g_print ("Database updated\n"); - } - - g_object_unref (db_decomp); - } - g_object_unref (outstream); - -end: - g_object_unref (db_decomp_tmp); - g_object_unref (conv); - g_object_unref (instream_conv); -} - -int -main (int argc, char **argv) -{ - SoupSession *session; - GError *error = NULL; - const char *path, *dbpath = NULL; - guint i; - GOptionContext *context; - const GOptionEntry entries[] = { - { "dbpath", 0, 0, G_OPTION_ARG_STRING, &dbpath, "The directory containing the databases", NULL }, - { NULL } - }; - -#if (!GLIB_CHECK_VERSION (2, 36, 0)) - g_type_init (); -#endif - - context = g_option_context_new ("- updates the city and country databases from Maxmind."); - g_option_context_add_main_entries (context, entries, NULL); - if (g_option_context_parse (context, &argc, &argv, &error) == FALSE) { - g_print ("Option parsing failed: %s\n", error->message); - return 1; - } - - path = g_getenv ("GEOIP_DATABASE_PATH"); - if (!path) { - if (dbpath) - path = dbpath; - else - path = GEOIP_DATABASE_PATH; - } - - session = soup_session_new (); - - for (i = 0; i < G_N_ELEMENTS (db_info_map); i++) { - SoupMessage *msg = NULL; - const char*db_uri; - GFile *db_local; - char *db_path; - char *db_decompressed_path; - gboolean needs_update; - guint status_code; - - g_print ("Updating %s database\n", db_info_map[i].db_name); - db_uri = db_info_map[i].uri; - - db_path = g_build_filename (path, db_info_map[i].db_gz_name, NULL); - db_local = g_file_new_for_path (db_path); - g_free (db_path); - - if (local_db_needs_update (session, db_uri, db_local, &needs_update, &error) == FALSE) { - g_print ("Could not update the database: %s\n", error->message); - g_error_free (error); - goto end_loop; - } - if (!needs_update) { - g_print ("Database '%s' up to date\n", db_info_map[i].db_name); - goto end_loop; - } - - msg = soup_message_new ("GET", db_uri); - status_code = soup_session_send_message (session, msg); - if (status_code != SOUP_STATUS_OK) { - g_set_error (&error, - SOUP_HTTP_ERROR, - status_code, - "%s", msg->reason_phrase); - g_print ("Could not download the database: %s\n", msg->reason_phrase); - goto end_loop; - } - - if (g_file_replace_contents (db_local, - msg->response_body->data, - msg->response_body->length, - NULL, - FALSE, - 0, - NULL, - NULL, - &error) == FALSE) { - g_print ("Could not download the database: %s\n", error->message); - goto end_loop; - } - - db_decompressed_path = g_build_filename (path, db_info_map[i].db_name, NULL); - decompress_db (db_local, db_decompressed_path); - g_free (db_decompressed_path); - -end_loop: - g_object_unref (db_local); - g_clear_object (&msg); - error = NULL; - } - - g_object_unref (session); - - return 0; -} diff -Nru geoclue-2.0-2.1.7/src/geoip-server/Makefile.am geoclue-2.0-2.1.8/src/geoip-server/Makefile.am --- geoclue-2.0-2.1.7/src/geoip-server/Makefile.am 2013-12-04 13:28:00.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -include $(top_srcdir)/Makefile.decl - -BUILT_GIRSOURCES = - -AM_CFLAGS = \ - -I$(top_srcdir) \ - $(GEOIP_SERVER_CFLAGS) \ - $(COMMON_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - -DGEOIP_DATABASE_PATH=\""$(GEOIP_DATABASE_PATH)"\" \ - -DTEST_SRCDIR=\""$(top_srcdir)/src/test-data/"\" \ - -DBUILDDIR=\""$(builddir)/"\" - -bin_PROGRAMS = geoip-lookup geoip-update - -TEST_PROGS += test-geoipformat -noinst_PROGRAMS = $(TEST_PROGS) - -geoip_lookup_SOURCES = geoip-lookup.c geoip-server.h - -geoip_lookup_LDADD = $(GEOIP_SERVER_LIBS) -geoip_update_LDADD = $(GEOIP_DBUPDATE_LIBS) -test_geoipformat_LDADD = $(GEOCLUE_LIBS) - -EXTRA_DIST = API-Documentation.txt - -MAINTAINERCLEANFILES = Makefile.in - --include $(top_srcdir)/git.mk diff -Nru geoclue-2.0-2.1.7/src/geoip-server/Makefile.in geoclue-2.0-2.1.8/src/geoip-server/Makefile.in --- geoclue-2.0-2.1.7/src/geoip-server/Makefile.in 2014-03-25 02:19:45.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,767 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2013 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@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -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@ -DIST_COMMON = $(top_srcdir)/Makefile.decl $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp -bin_PROGRAMS = geoip-lookup$(EXEEXT) geoip-update$(EXEEXT) -noinst_PROGRAMS = $(am__EXEEXT_1) -subdir = src/geoip-server -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -am__EXEEXT_1 = test-geoipformat$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_geoip_lookup_OBJECTS = geoip-lookup.$(OBJEXT) -geoip_lookup_OBJECTS = $(am_geoip_lookup_OBJECTS) -am__DEPENDENCIES_1 = -geoip_lookup_DEPENDENCIES = $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -geoip_update_SOURCES = geoip-update.c -geoip_update_OBJECTS = geoip-update.$(OBJEXT) -geoip_update_DEPENDENCIES = $(am__DEPENDENCIES_1) -test_geoipformat_SOURCES = test-geoipformat.c -test_geoipformat_OBJECTS = test-geoipformat.$(OBJEXT) -test_geoipformat_DEPENDENCIES = $(am__DEPENDENCIES_1) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(geoip_lookup_SOURCES) geoip-update.c test-geoipformat.c -DIST_SOURCES = $(geoip_lookup_SOURCES) geoip-update.c \ - test-geoipformat.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -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@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DBUS_SYS_DIR = @DBUS_SYS_DIR@ -DEFS = @DEFS@ -DEMO_AGENT_CFLAGS = @DEMO_AGENT_CFLAGS@ -DEMO_AGENT_LIBS = @DEMO_AGENT_LIBS@ -DEPDIR = @DEPDIR@ -DESKTOP_FILE_VALIDATE = @DESKTOP_FILE_VALIDATE@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GDBUS_CODEGEN = @GDBUS_CODEGEN@ -GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ -GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ -GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLIB_MKENUMS = @GLIB_MKENUMS@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ -INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ -INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ -INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -ModemManager_CFLAGS = @ModemManager_CFLAGS@ -ModemManager_LIBS = @ModemManager_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NetworkManager_CFLAGS = @NetworkManager_CFLAGS@ -NetworkManager_LIBS = @NetworkManager_LIBS@ -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@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -XGETTEXT = @XGETTEXT@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -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@ -dbus_srv_user = @dbus_srv_user@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -intltool__v_merge_options_ = @intltool__v_merge_options_@ -intltool__v_merge_options_0 = @intltool__v_merge_options_0@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -systemdsystemunitdir = @systemdsystemunitdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -GTESTER = gtester # in $PATH for non-GLIB packages -GTESTER_REPORT = gtester-report # in $PATH for non-GLIB packages - -# initialize variables for unconditional += appending -TEST_PROGS = test-geoipformat -BUILT_GIRSOURCES = -AM_CFLAGS = \ - -I$(top_srcdir) \ - $(GEOIP_SERVER_CFLAGS) \ - $(COMMON_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - -DGEOIP_DATABASE_PATH=\""$(GEOIP_DATABASE_PATH)"\" \ - -DTEST_SRCDIR=\""$(top_srcdir)/src/test-data/"\" \ - -DBUILDDIR=\""$(builddir)/"\" - -geoip_lookup_SOURCES = geoip-lookup.c geoip-server.h -geoip_lookup_LDADD = $(GEOIP_SERVER_LIBS) -geoip_update_LDADD = $(GEOIP_DBUPDATE_LIBS) -test_geoipformat_LDADD = $(GEOCLUE_LIBS) -EXTRA_DIST = API-Documentation.txt -MAINTAINERCLEANFILES = Makefile.in -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(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) --foreign src/geoip-server/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/geoip-server/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_srcdir)/Makefile.decl: - -$(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): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -geoip-lookup$(EXEEXT): $(geoip_lookup_OBJECTS) $(geoip_lookup_DEPENDENCIES) $(EXTRA_geoip_lookup_DEPENDENCIES) - @rm -f geoip-lookup$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(geoip_lookup_OBJECTS) $(geoip_lookup_LDADD) $(LIBS) - -geoip-update$(EXEEXT): $(geoip_update_OBJECTS) $(geoip_update_DEPENDENCIES) $(EXTRA_geoip_update_DEPENDENCIES) - @rm -f geoip-update$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(geoip_update_OBJECTS) $(geoip_update_LDADD) $(LIBS) - -test-geoipformat$(EXEEXT): $(test_geoipformat_OBJECTS) $(test_geoipformat_DEPENDENCIES) $(EXTRA_test_geoipformat_DEPENDENCIES) - @rm -f test-geoipformat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_geoipformat_OBJECTS) $(test_geoipformat_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geoip-lookup.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geoip-update.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-geoipformat.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - 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-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - 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" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -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 - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; 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-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -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." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -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 -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ - clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am 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-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS - - -# test: run all tests in cwd and subdirs -test: ${TEST_PROGS} - @test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS} - @ for subdir in $(SUBDIRS) . ; do \ - test "$$subdir" = "." -o "$$subdir" = "po" || \ - ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ - done - -# test-report: run tests in subdirs and generate report -# perf-report: run tests in subdirs with -m perf and generate report -# full-report: like test-report: with -m perf and -m slow -test-report perf-report full-report: ${TEST_PROGS} - @test -z "${TEST_PROGS}" || { \ - case $@ in \ - test-report) test_options="-k";; \ - perf-report) test_options="-k -m=perf";; \ - full-report) test_options="-k -m=perf -m=slow";; \ - esac ; \ - if test -z "$$GTESTER_LOGDIR" ; then \ - ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \ - elif test -n "${TEST_PROGS}" ; then \ - ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \ - fi ; \ - } - @ ignore_logdir=true ; \ - if test -z "$$GTESTER_LOGDIR" ; then \ - GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \ - ignore_logdir=false ; \ - fi ; \ - for subdir in $(SUBDIRS) . ; do \ - test "$$subdir" = "." -o "$$subdir" = "po" || \ - ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ - done ; \ - $$ignore_logdir || { \ - echo '' > $@.xml ; \ - echo '' >> $@.xml ; \ - for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ - sed '1,1s/^?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ - done ; \ - echo >> $@.xml ; \ - echo '' >> $@.xml ; \ - rm -rf "$$GTESTER_LOGDIR"/ ; \ - ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \ - } -.PHONY: test test-report perf-report full-report -# run make test as part of make check -check-local: test - --include $(top_srcdir)/git.mk - -# 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 geoclue-2.0-2.1.7/src/geoip-server/test-geoipformat.c geoclue-2.0-2.1.8/src/geoip-server/test-geoipformat.c --- geoclue-2.0-2.1.7/src/geoip-server/test-geoipformat.c 2013-11-26 01:03:19.000000000 +0000 +++ geoclue-2.0-2.1.8/src/geoip-server/test-geoipformat.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ -/* test-geoipformat.c - * - * Copyright (C) 2013 Red Hat, Inc. - * - * Geoclue 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 2 of the License, or (at your option) - * any later version. - * - * Geoclue 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 Geoclue; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Zeeshan Ali (Khattak) - * Bastien Nocera - */ - -#include -#include -#include - -static void -test_response_data (gconstpointer data) -{ - JsonParser *parser; - JsonNode *node; - JsonObject *object; - double latitude, longitude; - - parser = json_parser_new (); - - g_assert (json_parser_load_from_data (parser, (const char *) data, -1, NULL)); - - node = json_parser_get_root (parser); - g_assert (JSON_NODE_HOLDS_OBJECT (node)); - object = json_node_get_object (node); - g_assert (object != NULL); - - g_assert (json_object_has_member (object, "ip")); - g_assert (strcmp (json_object_get_string_member (object, "ip"), "213.243.180.91") == 0); - - g_assert (json_object_has_member (object, "latitude")); - latitude = json_object_get_double_member (object, "latitude"); - g_assert (latitude > 60.1755 && latitude <= 60.1756); - g_assert (json_object_has_member (object, "longitude")); - longitude = json_object_get_double_member (object, "longitude"); - g_assert (longitude >= 24.9342 && longitude < 24.9343); - - g_assert (json_object_has_member (object, "city")); - g_assert (strcmp (json_object_get_string_member (object, "city"), "Helsinki") == 0); - g_assert (json_object_has_member (object, "region_name")); - g_assert (strcmp (json_object_get_string_member (object, "region_name"), "Southern Finland") == 0); - g_assert (json_object_has_member (object, "country_name")); - g_assert (strcmp (json_object_get_string_member (object, "country_name"), "Finland") == 0); - - if (json_object_has_member (object, "accuracy")) - g_assert (strcmp (json_object_get_string_member (object, "accuracy"), "city") == 0); - if (json_object_has_member (object, "timezone")) - g_assert (strcmp (json_object_get_string_member (object, "timezone"), "Europe/Helsinki") == 0); - - g_object_unref (parser); -} - -static char * -get_freegeoip_response (void) -{ - GFile *file; - char *contents = NULL; - char *path; - GError *error = NULL; - - path = g_build_filename(TEST_SRCDIR, "freegeoip-results.json", NULL); - g_assert (path != NULL); - file = g_file_new_for_path(path); - if (!g_file_load_contents (file, NULL, &contents, NULL, NULL, &error)) { - g_warning ("Failed to load file '%s': %s", path, error->message); - g_error_free (error); - g_assert_not_reached (); - } - - g_free (path); - - return contents; -} - -static char * -get_fedora_geoip_response (void) -{ - GFile *file; - char *contents = NULL; - char *path; - GError *error = NULL; - - path = g_build_filename(TEST_SRCDIR, "fedora-geoip-results.json", NULL); - g_assert (path != NULL); - file = g_file_new_for_path(path); - if (!g_file_load_contents (file, NULL, &contents, NULL, NULL, &error)) { - g_warning ("Failed to load file '%s': %s", path, error->message); - g_error_free (error); - g_assert_not_reached (); - } - - g_free (path); - - return contents; -} - -static char * -get_our_server_response (const char *query) -{ - char *response; - char *p; - char *standard_output; - int exit_status; - char **environ; - char *argv[] = { NULL, NULL }; - GError *error = NULL; - - environ = g_get_environ (); - environ = g_environ_setenv (environ, "QUERY_STRING", query, TRUE); - - argv[0] = g_build_filename (BUILDDIR, "geoip-lookup", NULL); - g_assert (argv[0] != NULL); - - if (!g_spawn_sync (BUILDDIR, - argv, - environ, - G_SPAWN_STDERR_TO_DEV_NULL, - NULL, - NULL, - &standard_output, - NULL, - &exit_status, - &error)) { - g_warning ("Failed to execute '%s': %s", argv[0], error->message); - g_error_free (error); - g_assert_not_reached (); - } - - g_strfreev (environ); - g_free (argv[0]); - - /* Get rid of headers */ - p = strstr (standard_output, "\n\n"); - g_assert (p != NULL); - p += 2; - - response = g_strdup (p); - g_free (standard_output); - - return response; -} - -int -main (int argc, char **argv) -{ - char *our_response, *freegeoip_response, *fedora_geoip_response; - int ret; - -#if (!GLIB_CHECK_VERSION (2, 36, 0)) - g_type_init (); -#endif - g_test_init (&argc, &argv, NULL); - g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id="); - - our_response = get_our_server_response ("ip=213.243.180.91"); - g_test_add_data_func ("/geoip/gclue-server-format", - our_response, - test_response_data); - - freegeoip_response = get_freegeoip_response (); - g_test_add_data_func ("/geoip/freegeoip-format", - freegeoip_response, - test_response_data); - - fedora_geoip_response = get_fedora_geoip_response (); - g_test_add_data_func ("/geoip/fedora-geoip-format", - fedora_geoip_response, - test_response_data); - - ret = g_test_run (); - g_free (freegeoip_response); - g_free (fedora_geoip_response); - g_free (our_response); - - return ret; -} diff -Nru geoclue-2.0-2.1.7/src/Makefile.am geoclue-2.0-2.1.8/src/Makefile.am --- geoclue-2.0-2.1.7/src/Makefile.am 2014-03-11 12:23:49.000000000 +0000 +++ geoclue-2.0-2.1.8/src/Makefile.am 2014-04-09 19:10:17.000000000 +0000 @@ -4,10 +4,6 @@ SUBDIRS = public-api agent geocode-glib -if BUILD_GEOIP_SERVER -SUBDIRS += geoip-server -endif # BUILD_GEOIP_SERVER - interfacedir = $(datadir)/dbus-1/interfaces interface_DATA = org.freedesktop.GeoClue2.xml @@ -48,8 +44,6 @@ gclue-config.c \ gclue-error.h \ gclue-error.c \ - gclue-ipclient.h \ - gclue-ipclient.c \ gclue-location-source.h \ gclue-location-source.c \ gclue-locator.h \ @@ -62,12 +56,10 @@ gclue-service-location.c \ gclue-web-source.c \ gclue-web-source.h \ + gclue-wifi.h \ + gclue-wifi.c \ $(NULL) -if BUILD_WIFI_SOURCE -libgeoclue_la_SOURCES += gclue-wifi.h gclue-wifi.c -endif - if BUILD_MODEM_SOURCE libgeoclue_la_SOURCES += gclue-modem-source.c gclue-modem-source.h endif diff -Nru geoclue-2.0-2.1.7/src/Makefile.in geoclue-2.0-2.1.8/src/Makefile.in --- geoclue-2.0-2.1.7/src/Makefile.in 2014-03-25 02:19:44.000000000 +0000 +++ geoclue-2.0-2.1.8/src/Makefile.in 2014-04-15 21:16:05.000000000 +0000 @@ -84,18 +84,16 @@ $(srcdir)/Makefile.am $(srcdir)/geoclue.pc.in \ $(top_srcdir)/build-aux/depcomp libexec_PROGRAMS = geoclue$(EXEEXT) -@BUILD_GEOIP_SERVER_TRUE@am__append_1 = geoip-server -@BUILD_WIFI_SOURCE_TRUE@am__append_2 = gclue-wifi.h gclue-wifi.c -@BUILD_MODEM_SOURCE_TRUE@am__append_3 = gclue-modem-source.c gclue-modem-source.h -@BUILD_3G_SOURCE_TRUE@am__append_4 = gclue-3g.c gclue-3g.h -@BUILD_MODEM_GPS_SOURCE_TRUE@am__append_5 = gclue-modem-gps.c gclue-modem-gps.h +@BUILD_MODEM_SOURCE_TRUE@am__append_1 = gclue-modem-source.c gclue-modem-source.h +@BUILD_3G_SOURCE_TRUE@am__append_2 = gclue-3g.c gclue-3g.h +@BUILD_MODEM_GPS_SOURCE_TRUE@am__append_3 = gclue-modem-gps.c gclue-modem-gps.h subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-compiler-flags.m4 \ - $(top_srcdir)/m4/gtk-doc.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)/configure.ac + $(top_srcdir)/m4/gtk-doc.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -110,26 +108,25 @@ am__libgeoclue_la_SOURCES_DIST = geoclue-interface.c \ geoclue-interface.h gclue-client-info.h gclue-client-info.c \ gclue-config.h gclue-config.c gclue-error.h gclue-error.c \ - gclue-ipclient.h gclue-ipclient.c gclue-location-source.h \ - gclue-location-source.c gclue-locator.h gclue-locator.c \ - gclue-service-manager.h gclue-service-manager.c \ - gclue-service-client.h gclue-service-client.c \ - gclue-service-location.h gclue-service-location.c \ - gclue-web-source.c gclue-web-source.h gclue-wifi.h \ - gclue-wifi.c gclue-modem-source.c gclue-modem-source.h \ - gclue-3g.c gclue-3g.h gclue-modem-gps.c gclue-modem-gps.h + gclue-location-source.h gclue-location-source.c \ + gclue-locator.h gclue-locator.c gclue-service-manager.h \ + gclue-service-manager.c gclue-service-client.h \ + gclue-service-client.c gclue-service-location.h \ + gclue-service-location.c gclue-web-source.c gclue-web-source.h \ + gclue-wifi.h gclue-wifi.c gclue-modem-source.c \ + gclue-modem-source.h gclue-3g.c gclue-3g.h gclue-modem-gps.c \ + gclue-modem-gps.h am__objects_1 = geoclue-interface.lo am__objects_2 = $(am__objects_1) -@BUILD_WIFI_SOURCE_TRUE@am__objects_3 = gclue-wifi.lo -@BUILD_MODEM_SOURCE_TRUE@am__objects_4 = gclue-modem-source.lo -@BUILD_3G_SOURCE_TRUE@am__objects_5 = gclue-3g.lo -@BUILD_MODEM_GPS_SOURCE_TRUE@am__objects_6 = gclue-modem-gps.lo +@BUILD_MODEM_SOURCE_TRUE@am__objects_3 = gclue-modem-source.lo +@BUILD_3G_SOURCE_TRUE@am__objects_4 = gclue-3g.lo +@BUILD_MODEM_GPS_SOURCE_TRUE@am__objects_5 = gclue-modem-gps.lo am_libgeoclue_la_OBJECTS = $(am__objects_2) gclue-client-info.lo \ - gclue-config.lo gclue-error.lo gclue-ipclient.lo \ - gclue-location-source.lo gclue-locator.lo \ - gclue-service-manager.lo gclue-service-client.lo \ - gclue-service-location.lo gclue-web-source.lo $(am__objects_3) \ - $(am__objects_4) $(am__objects_5) $(am__objects_6) + gclue-config.lo gclue-error.lo gclue-location-source.lo \ + gclue-locator.lo gclue-service-manager.lo \ + gclue-service-client.lo gclue-service-location.lo \ + gclue-web-source.lo gclue-wifi.lo $(am__objects_3) \ + $(am__objects_4) $(am__objects_5) libgeoclue_la_OBJECTS = $(am_libgeoclue_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -249,7 +246,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = public-api agent geocode-glib geoip-server +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -311,16 +308,12 @@ GEOCLUE_API_VERSION = @GEOCLUE_API_VERSION@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ -GEOIP_DATABASE_PATH = @GEOIP_DATABASE_PATH@ -GEOIP_DBUPDATE_CFLAGS = @GEOIP_DBUPDATE_CFLAGS@ -GEOIP_DBUPDATE_LIBS = @GEOIP_DBUPDATE_LIBS@ -GEOIP_SERVER_CFLAGS = @GEOIP_SERVER_CFLAGS@ -GEOIP_SERVER_LIBS = @GEOIP_SERVER_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -444,7 +437,7 @@ # initialize variables for unconditional += appending TEST_PROGS = -SUBDIRS = public-api agent geocode-glib $(am__append_1) +SUBDIRS = public-api agent geocode-glib interfacedir = $(datadir)/dbus-1/interfaces interface_DATA = org.freedesktop.GeoClue2.xml dbus_built_sources = geoclue-interface.c geoclue-interface.h @@ -468,14 +461,14 @@ libgeoclue_la_SOURCES = $(BUILT_SOURCES) gclue-client-info.h \ gclue-client-info.c gclue-config.h gclue-config.c \ - gclue-error.h gclue-error.c gclue-ipclient.h gclue-ipclient.c \ - gclue-location-source.h gclue-location-source.c \ - gclue-locator.h gclue-locator.c gclue-service-manager.h \ - gclue-service-manager.c gclue-service-client.h \ - gclue-service-client.c gclue-service-location.h \ - gclue-service-location.c gclue-web-source.c gclue-web-source.h \ - $(NULL) $(am__append_2) $(am__append_3) $(am__append_4) \ - $(am__append_5) + gclue-error.h gclue-error.c gclue-location-source.h \ + gclue-location-source.c gclue-locator.h gclue-locator.c \ + gclue-service-manager.h gclue-service-manager.c \ + gclue-service-client.h gclue-service-client.c \ + gclue-service-location.h gclue-service-location.c \ + gclue-web-source.c gclue-web-source.h gclue-wifi.h \ + gclue-wifi.c $(NULL) $(am__append_1) $(am__append_2) \ + $(am__append_3) libgeoclue_la_LIBADD = \ $(GEOCLUE_LIBS) \ $(NetworkManager_LIBS) \ @@ -616,7 +609,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-client-info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-ipclient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-location-source.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-locator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gclue-main.Po@am__quote@ diff -Nru geoclue-2.0-2.1.7/src/org.freedesktop.GeoClue2.xml geoclue-2.0-2.1.8/src/org.freedesktop.GeoClue2.xml --- geoclue-2.0-2.1.7/src/org.freedesktop.GeoClue2.xml 2014-03-11 12:23:49.000000000 +0000 +++ geoclue-2.0-2.1.8/src/org.freedesktop.GeoClue2.xml 2014-04-11 14:30:54.000000000 +0000 @@ -105,6 +105,18 @@ + + + + + +