diff options
| author | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
|---|---|---|
| committer | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
| commit | a4256940da049f91bbbea5e53e469a59ea9c10f7 (patch) | |
| tree | 2211c102aea3a33f34f960f48c8b8a55daccd97b /libnm-glib | |
| parent | 8d275584fc94f398f0a7c990dcd057533d9a5856 (diff) | |
Imported Upstream version 0.9.8.8 upstream/0.9.8.8
Diffstat (limited to 'libnm-glib')
| -rw-r--r-- | libnm-glib/Makefile.am | 2 | ||||
| -rw-r--r-- | libnm-glib/Makefile.in | 323 | ||||
| -rw-r--r-- | libnm-glib/libnm-glib.ver | 6 | ||||
| -rw-r--r-- | libnm-glib/nm-client.c | 322 | ||||
| -rw-r--r-- | libnm-glib/nm-client.h | 20 | ||||
| -rw-r--r-- | libnm-glib/nm-device-wimax.c | 2 | ||||
| -rw-r--r-- | libnm-glib/nm-device.c | 105 | ||||
| -rw-r--r-- | libnm-glib/nm-dhcp4-config.c | 3 | ||||
| -rw-r--r-- | libnm-glib/nm-dhcp6-config.c | 3 | ||||
| -rw-r--r-- | libnm-glib/nm-ip6-config.c | 6 | ||||
| -rw-r--r-- | libnm-glib/nm-object.c | 18 | ||||
| -rw-r--r-- | libnm-glib/nm-remote-connection.c | 3 | ||||
| -rw-r--r-- | libnm-glib/nm-remote-settings.c | 6 | ||||
| -rw-r--r-- | libnm-glib/nm-secret-agent.c | 6 | ||||
| -rw-r--r-- | libnm-glib/nm-secret-agent.h | 14 | ||||
| -rw-r--r-- | libnm-glib/tests/Makefile.in | 174 |
16 files changed, 716 insertions, 297 deletions
diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am index b8eee472..c692a3ca 100644 --- a/libnm-glib/Makefile.am +++ b/libnm-glib/Makefile.am @@ -148,7 +148,7 @@ libnm_glib_la_LIBADD = \ SYMBOL_VIS_FILE=$(srcdir)/libnm-glib.ver libnm_glib_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \ - -version-info "9:0:5" + -version-info "10:0:6" noinst_PROGRAMS = libnm-glib-test diff --git a/libnm-glib/Makefile.in b/libnm-glib/Makefile.in index df3e843b..4a94d03a 100644 --- a/libnm-glib/Makefile.in +++ b/libnm-glib/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 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. @@ -19,23 +18,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +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 \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + 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@ @@ -58,10 +85,10 @@ noinst_PROGRAMS = libnm-glib-test$(EXEEXT) @HAVE_INTROSPECTION_TRUE@am__append_1 = NMClient-1.0.gir @HAVE_INTROSPECTION_TRUE@am__append_2 = $(gir_DATA) $(typelib_DATA) subdir = libnm-glib -DIST_COMMON = $(libdeprecated_HEADERS) $(libnminclude_HEADERS) \ - $(libnmvpn_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/libnm-glib-vpn.pc.in \ - $(srcdir)/libnm-glib.pc.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libnm-glib.pc.in $(srcdir)/libnm-glib-vpn.pc.in \ + $(top_srcdir)/build-aux/depcomp $(libdeprecated_HEADERS) \ + $(libnminclude_HEADERS) $(libnmvpn_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 \ @@ -123,6 +150,7 @@ libdeprecated_nm_glib_la_OBJECTS = \ 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 = libnm_glib_test_la_DEPENDENCIES = \ $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @@ -218,6 +246,18 @@ libnm_glib_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libnm_glib_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +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 @@ -230,33 +270,30 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(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_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +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_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdeprecated_nm_glib_la_SOURCES) \ $(libnm_glib_test_la_SOURCES) $(libnm_glib_vpn_la_SOURCES) \ $(libnm_glib_la_SOURCES) $(libnm_glib_test_SOURCES) DIST_SOURCES = $(libdeprecated_nm_glib_la_SOURCES) \ $(libnm_glib_test_la_SOURCES) $(libnm_glib_vpn_la_SOURCES) \ $(libnm_glib_la_SOURCES) $(libnm_glib_test_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -267,9 +304,29 @@ HEADERS = $(libdeprecated_HEADERS) $(libnminclude_HEADERS) \ $(libnmvpn_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +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 DIST_SUBDIRS = $(SUBDIRS) @@ -440,7 +497,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -455,6 +511,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ +SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ @@ -675,7 +733,7 @@ libnm_glib_la_LIBADD = \ SYMBOL_VIS_FILE = $(srcdir)/libnm-glib.ver libnm_glib_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \ - -version-info "9:0:5" + -version-info "10:0:6" libnm_glib_test_SOURCES = libnm-glib-test.c libnm_glib_test_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) @@ -770,6 +828,7 @@ libnm-glib.pc: $(top_builddir)/config.status $(srcdir)/libnm-glib.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libnm-glib-vpn.pc: $(top_builddir)/config.status $(srcdir)/libnm-glib-vpn.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -796,27 +855,35 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libdeprecated-nm-glib.la: $(libdeprecated_nm_glib_la_OBJECTS) $(libdeprecated_nm_glib_la_DEPENDENCIES) $(EXTRA_libdeprecated_nm_glib_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdeprecated_nm_glib_la_OBJECTS) $(libdeprecated_nm_glib_la_LIBADD) $(LIBS) + libnm-glib-test.la: $(libnm_glib_test_la_OBJECTS) $(libnm_glib_test_la_DEPENDENCIES) $(EXTRA_libnm_glib_test_la_DEPENDENCIES) $(AM_V_CCLD)$(libnm_glib_test_la_LINK) $(libnm_glib_test_la_OBJECTS) $(libnm_glib_test_la_LIBADD) $(LIBS) + libnm-glib-vpn.la: $(libnm_glib_vpn_la_OBJECTS) $(libnm_glib_vpn_la_DEPENDENCIES) $(EXTRA_libnm_glib_vpn_la_DEPENDENCIES) $(AM_V_CCLD)$(libnm_glib_vpn_la_LINK) -rpath $(libdir) $(libnm_glib_vpn_la_OBJECTS) $(libnm_glib_vpn_la_LIBADD) $(LIBS) + libnm-glib.la: $(libnm_glib_la_OBJECTS) $(libnm_glib_la_DEPENDENCIES) $(EXTRA_libnm_glib_la_DEPENDENCIES) $(AM_V_CCLD)$(libnm_glib_la_LINK) -rpath $(libdir) $(libnm_glib_la_OBJECTS) $(libnm_glib_la_LIBADD) $(LIBS) @@ -828,6 +895,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + libnm-glib-test$(EXEEXT): $(libnm_glib_test_OBJECTS) $(libnm_glib_test_DEPENDENCIES) $(EXTRA_libnm_glib_test_DEPENDENCIES) @rm -f libnm-glib-test$(EXEEXT) $(AM_V_CCLD)$(libnm_glib_test_LINK) $(libnm_glib_test_OBJECTS) $(libnm_glib_test_LDADD) $(LIBS) @@ -1512,22 +1580,25 @@ uninstall-libnmvpnHEADERS: dir='$(DESTDIR)$(libnmvpndir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1542,57 +1613,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1608,12 +1634,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1625,15 +1646,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +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 @@ -1642,6 +1659,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +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 @@ -1822,19 +1854,18 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libnmvpnHEADERS uninstall-pkgconfigDATA \ uninstall-typelibDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am ctags-recursive install install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am check-local clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-girDATA \ - install-html install-html-am install-info install-info-am \ +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am check-local clean clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLTLIBRARIES 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-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-girDATA install-html \ + install-html-am install-info install-info-am \ install-libLTLIBRARIES install-libdeprecatedHEADERS \ install-libnmincludeHEADERS install-libnmvpnHEADERS \ install-man install-pdf install-pdf-am install-pkgconfigDATA \ @@ -1842,7 +1873,7 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libdeprecatedHEADERS uninstall-libnmincludeHEADERS \ uninstall-libnmvpnHEADERS uninstall-pkgconfigDATA \ diff --git a/libnm-glib/libnm-glib.ver b/libnm-glib/libnm-glib.ver index 571bc7d2..b7d33211 100644 --- a/libnm-glib/libnm-glib.ver +++ b/libnm-glib/libnm-glib.ver @@ -31,14 +31,20 @@ global: nm_active_connection_new; nm_client_activate_connection; nm_client_add_and_activate_connection; + nm_client_check_connectivity; + nm_client_check_connectivity_async; + nm_client_check_connectivity_finish; nm_client_deactivate_connection; + nm_client_get_activating_connection; nm_client_get_active_connections; + nm_client_get_connectivity; nm_client_get_device_by_iface; nm_client_get_device_by_path; nm_client_get_devices; nm_client_get_logging; nm_client_get_manager_running; nm_client_get_permission_result; + nm_client_get_primary_connection; nm_client_get_state; nm_client_get_type; nm_client_get_version; diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index 3ffa7b9e..9226d350 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -60,6 +60,9 @@ typedef struct { NMState state; GPtrArray *devices; GPtrArray *active_connections; + NMConnectivityState connectivity; + NMActiveConnection *primary_connection; + NMActiveConnection *activating_connection; DBusGProxyCall *perm_call; GHashTable *permissions; @@ -93,6 +96,9 @@ enum { PROP_WIMAX_ENABLED, PROP_WIMAX_HARDWARE_ENABLED, PROP_ACTIVE_CONNECTIONS, + PROP_CONNECTIVITY, + PROP_PRIMARY_CONNECTION, + PROP_ACTIVATING_CONNECTION, LAST_PROP }; @@ -161,6 +167,9 @@ register_properties (NMClient *client) { NM_CLIENT_WIMAX_ENABLED, &priv->wimax_enabled }, { NM_CLIENT_WIMAX_HARDWARE_ENABLED, &priv->wimax_hw_enabled }, { NM_CLIENT_ACTIVE_CONNECTIONS, &priv->active_connections, NULL, NM_TYPE_ACTIVE_CONNECTION }, + { NM_CLIENT_CONNECTIVITY, &priv->connectivity }, + { NM_CLIENT_PRIMARY_CONNECTION, &priv->primary_connection, NULL, NM_TYPE_ACTIVE_CONNECTION }, + { NM_CLIENT_ACTIVATING_CONNECTION, &priv->activating_connection, NULL, NM_TYPE_ACTIVE_CONNECTION }, { NULL }, }; @@ -464,7 +473,7 @@ static void recheck_pending_activations (NMClient *self, const char *failed_path, GError *error) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (self); - GSList *iter; + GSList *iter, *next; const GPtrArray *active_connections; gboolean found_in_active = FALSE; gboolean found_in_pending = FALSE; @@ -479,9 +488,11 @@ recheck_pending_activations (NMClient *self, const char *failed_path, GError *er * If the connection to activate doesn't make it to active_connections, * due to an error, we have to call the callback for failed_path. */ - for (iter = priv->pending_activations; iter; iter = g_slist_next (iter)) { + for (iter = priv->pending_activations; iter; iter = next) { ActivateInfo *info = iter->data; + next = g_slist_next (iter); + if (!found_in_pending && failed_path && g_strcmp0 (failed_path, info->active_path) == 0) { found_in_pending = TRUE; ainfo = info; @@ -542,7 +553,7 @@ activate_cb (DBusGProxy *proxy, * @device: (allow-none): the #NMDevice * @specific_object: (allow-none): the object path of a connection-type-specific * object this activation should use. This parameter is currently ignored for - * wired and mobile broadband connections, and the value of NULL should be used + * wired and mobile broadband connections, and the value of %NULL should be used * (ie, no specific object). For WiFi or WiMAX connections, pass the object * path of a #NMAccessPoint or #NMWimaxNsp owned by @device, which you can * get using nm_object_get_path(), and which will be used to complete the @@ -618,12 +629,12 @@ add_activate_cb (DBusGProxy *proxy, * nm_client_add_and_activate_connection: * @client: a #NMClient * @partial: (allow-none): an #NMConnection to add; the connection may be - * partially filled (or even NULL) and will be completed by NetworkManager + * partially filled (or even %NULL) and will be completed by NetworkManager * using the given @device and @specific_object before being added * @device: the #NMDevice * @specific_object: (allow-none): the object path of a connection-type-specific * object this activation should use. This parameter is currently ignored for - * wired and mobile broadband connections, and the value of NULL should be used + * wired and mobile broadband connections, and the value of %NULL should be used * (ie, no specific object). For WiFi or WiMAX connections, pass the object * path of a #NMAccessPoint or #NMWimaxNsp owned by @device, which you can * get using nm_object_get_path(), and which will be used to complete the @@ -1125,6 +1136,58 @@ nm_client_set_logging (NMClient *client, const char *level, const char *domains, return TRUE; } +/** + * nm_client_get_primary_connection: + * @client: an #NMClient + * + * Gets the #NMActiveConnection corresponding to the primary active + * network device. + * + * In particular, when there is no VPN active, or the VPN does not + * have the default route, this returns the active connection that has + * the default route. If there is a VPN active with the default route, + * then this function returns the active connection that contains the + * route to the VPN endpoint. + * + * If there is no default route, or the default route is over a + * non-NetworkManager-recognized device, this will return %NULL. + * + * Returns: (transfer none): the appropriate #NMActiveConnection, if + * any + * + * Since: 0.9.8.4 + */ +NMActiveConnection * +nm_client_get_primary_connection (NMClient *client) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + + _nm_object_ensure_inited (NM_OBJECT (client)); + return NM_CLIENT_GET_PRIVATE (client)->primary_connection; +} + +/** + * nm_client_get_activating_connection: + * @client: an #NMClient + * + * Gets the #NMActiveConnection corresponding to a + * currently-activating connection that is expected to become the new + * #NMClient:primary-connection upon successful activation. + * + * Returns: (transfer none): the appropriate #NMActiveConnection, if + * any. + * + * Since: 0.9.8.4 + */ +NMActiveConnection * +nm_client_get_activating_connection (NMClient *client) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + + _nm_object_ensure_inited (NM_OBJECT (client)); + return NM_CLIENT_GET_PRIVATE (client)->activating_connection; +} + /****************************************************************/ static void @@ -1251,6 +1314,197 @@ client_device_removed (NMObject *client, NMObject *device) g_signal_emit (client, signals[DEVICE_REMOVED], 0, device); } +/** + * nm_client_get_connectivity: + * @client: an #NMClient + * + * Gets the current network connectivity state. Contrast + * nm_client_check_connectivity() and + * nm_client_check_connectivity_async(), which re-check the + * connectivity state first before returning any information. + * + * Returns: the current connectivity state + * Since: 0.9.8.4 + */ +NMConnectivityState +nm_client_get_connectivity (NMClient *client) +{ + NMClientPrivate *priv; + + g_return_val_if_fail (NM_IS_CLIENT (client), NM_STATE_UNKNOWN); + priv = NM_CLIENT_GET_PRIVATE (client); + + _nm_object_ensure_inited (NM_OBJECT (client)); + + return priv->connectivity; +} + +/** + * nm_client_check_connectivity: + * @client: an #NMClient + * @cancellable: a #GCancellable + * @error: return location for a #GError + * + * Updates the network connectivity state and returns the (new) + * current state. Contrast nm_client_get_connectivity(), which returns + * the most recent known state without re-checking. + * + * This is a blocking call; use nm_client_check_connectivity_async() + * if you do not want to block. + * + * Returns: the (new) current connectivity state + * Since: 0.9.8.4 + */ +NMConnectivityState +nm_client_check_connectivity (NMClient *client, + GCancellable *cancellable, + GError **error) +{ + NMClientPrivate *priv; + NMConnectivityState connectivity; + + g_return_val_if_fail (NM_IS_CLIENT (client), NM_CONNECTIVITY_UNKNOWN); + priv = NM_CLIENT_GET_PRIVATE (client); + + if (!dbus_g_proxy_call (priv->client_proxy, "CheckConnectivity", error, + G_TYPE_INVALID, + G_TYPE_UINT, &connectivity, + G_TYPE_INVALID)) + connectivity = NM_CONNECTIVITY_UNKNOWN; + + return connectivity; +} + +typedef struct { + NMClient *client; + DBusGProxyCall *call; + GCancellable *cancellable; + guint cancelled_id; + NMConnectivityState connectivity; +} CheckConnectivityData; + +static void +check_connectivity_data_free (CheckConnectivityData *ccd) +{ + if (ccd->cancellable) { + if (ccd->cancelled_id) + g_signal_handler_disconnect (ccd->cancellable, ccd->cancelled_id); + g_object_unref (ccd->cancellable); + } + + g_slice_free (CheckConnectivityData, ccd); +} + +static void +check_connectivity_cb (DBusGProxy *proxy, + DBusGProxyCall *call, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + CheckConnectivityData *ccd = g_simple_async_result_get_op_res_gpointer (simple); + GError *error = NULL; + + if (!dbus_g_proxy_end_call (proxy, call, &error, + G_TYPE_UINT, &ccd->connectivity, + G_TYPE_INVALID)) + g_simple_async_result_take_error (simple, error); + + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +static void +check_connectivity_cancelled_cb (GCancellable *cancellable, + gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + CheckConnectivityData *ccd = g_simple_async_result_get_op_res_gpointer (simple); + + g_signal_handler_disconnect (cancellable, ccd->cancelled_id); + ccd->cancelled_id = 0; + + dbus_g_proxy_cancel_call (NM_CLIENT_GET_PRIVATE (ccd->client)->client_proxy, ccd->call); + g_simple_async_result_complete_in_idle (simple); +} + +/** + * nm_client_check_connectivity_async: + * @client: an #NMClient + * @cancellable: a #GCancellable + * @callback: callback to call with the result + * @user_data: data for @callback. + * + * Asynchronously updates the network connectivity state and invokes + * @callback when complete. Contrast nm_client_get_connectivity(), + * which (immediately) returns the most recent known state without + * re-checking, and nm_client_check_connectivity(), which blocks. + * + * Since: 0.9.8.4 + */ +void +nm_client_check_connectivity_async (NMClient *client, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + NMClientPrivate *priv; + GSimpleAsyncResult *simple; + CheckConnectivityData *ccd; + + g_return_if_fail (NM_IS_CLIENT (client)); + priv = NM_CLIENT_GET_PRIVATE (client); + + ccd = g_slice_new (CheckConnectivityData); + ccd->client = client; + + simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data, + nm_client_check_connectivity_async); + g_simple_async_result_set_op_res_gpointer (simple, ccd, (GDestroyNotify) check_connectivity_data_free); + + if (cancellable) { + ccd->cancellable = g_object_ref (cancellable); + ccd->cancelled_id = g_signal_connect (cancellable, "cancelled", + G_CALLBACK (check_connectivity_cancelled_cb), + simple); + g_simple_async_result_set_check_cancellable (simple, cancellable); + } + + ccd->call = dbus_g_proxy_begin_call (priv->client_proxy, "CheckConnectivity", + check_connectivity_cb, simple, NULL, + G_TYPE_INVALID); +} + +/** + * nm_client_check_connectivity_finish: + * @client: an #NMClient + * @result: the #GAsyncResult + * @error: return location for a #GError + * + * Retrieves the result of an nm_client_check_connectivity_async() + * call. + * + * Returns: the (new) current connectivity state + * Since: 0.9.8.4 + */ +NMConnectivityState +nm_client_check_connectivity_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + CheckConnectivityData *ccd; + + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (client), nm_client_check_connectivity_async), NM_CONNECTIVITY_UNKNOWN); + + simple = G_SIMPLE_ASYNC_RESULT (result); + ccd = g_simple_async_result_get_op_res_gpointer (simple); + + if (g_simple_async_result_propagate_error (simple, error)) + return NM_CONNECTIVITY_UNKNOWN; + + return ccd->connectivity; +} + /****************************************************************/ /** @@ -1677,6 +1931,8 @@ dispose (GObject *object) free_devices (client, FALSE); free_active_connections (client, FALSE); + g_clear_object (&priv->primary_connection); + g_clear_object (&priv->activating_connection); g_slist_foreach (priv->pending_activations, (GFunc) activate_info_free, NULL); g_slist_free (priv->pending_activations); @@ -1785,6 +2041,15 @@ get_property (GObject *object, case PROP_ACTIVE_CONNECTIONS: g_value_set_boxed (value, nm_client_get_active_connections (self)); break; + case PROP_CONNECTIVITY: + g_value_set_uint (value, priv->connectivity); + break; + case PROP_PRIMARY_CONNECTION: + g_value_set_object (value, priv->primary_connection); + break; + case PROP_ACTIVATING_CONNECTION: + g_value_set_object (value, priv->activating_connection); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1951,6 +2216,53 @@ nm_client_class_init (NMClientClass *client_class) NM_TYPE_OBJECT_ARRAY, G_PARAM_READABLE)); + /** + * NMClient:connectivity: + * + * The network connectivity state. + * + * Since: 0.9.8.4 + */ + g_object_class_install_property + (object_class, PROP_CONNECTIVITY, + g_param_spec_uint (NM_CLIENT_CONNECTIVITY, + "Connectivity", + "Connectivity state", + NM_CONNECTIVITY_UNKNOWN, NM_CONNECTIVITY_FULL, NM_CONNECTIVITY_UNKNOWN, + G_PARAM_READABLE)); + + /** + * NMClient:primary-connection: + * + * The #NMActiveConnection of the device with the default route; + * see nm_client_get_primary_connection() for more details. + * + * Since: 0.9.8.4 + **/ + g_object_class_install_property + (object_class, PROP_PRIMARY_CONNECTION, + g_param_spec_object (NM_CLIENT_PRIMARY_CONNECTION, + "Primary connection", + "Primary connection", + NM_TYPE_ACTIVE_CONNECTION, + G_PARAM_READABLE)); + + /** + * NMClient:activating-connection: + * + * The #NMActiveConnection of the activating connection that is + * likely to become the new #NMClient:primary-connection. + * + * Since: 0.9.8.4 + **/ + g_object_class_install_property + (object_class, PROP_ACTIVATING_CONNECTION, + g_param_spec_object (NM_CLIENT_ACTIVATING_CONNECTION, + "Activating connection", + "Activating connection", + NM_TYPE_ACTIVE_CONNECTION, + G_PARAM_READABLE)); + /* signals */ /** diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h index 6c83e4ce..b4da609f 100644 --- a/libnm-glib/nm-client.h +++ b/libnm-glib/nm-client.h @@ -32,6 +32,7 @@ #include "nm-object.h" #include "nm-device.h" #include "nm-active-connection.h" +#include "nm-vpn-connection.h" G_BEGIN_DECLS @@ -53,6 +54,9 @@ G_BEGIN_DECLS #define NM_CLIENT_WIMAX_ENABLED "wimax-enabled" #define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled" #define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections" +#define NM_CLIENT_CONNECTIVITY "connectivity" +#define NM_CLIENT_PRIMARY_CONNECTION "primary-connection" +#define NM_CLIENT_ACTIVATING_CONNECTION "activating-connection" /** * NMClientPermission: @@ -212,6 +216,22 @@ NMClientPermissionResult nm_client_get_permission_result (NMClient *client, gboolean nm_client_get_logging (NMClient *client, char **level, char **domains, GError **error); gboolean nm_client_set_logging (NMClient *client, const char *level, const char *domains, GError **error); +NMConnectivityState nm_client_get_connectivity (NMClient *client); + +NMConnectivityState nm_client_check_connectivity (NMClient *client, + GCancellable *cancellable, + GError **error); +void nm_client_check_connectivity_async (NMClient *client, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMConnectivityState nm_client_check_connectivity_finish (NMClient *client, + GAsyncResult *result, + GError **error); + +NMActiveConnection *nm_client_get_primary_connection (NMClient *client); +NMActiveConnection *nm_client_get_activating_connection (NMClient *client); + G_END_DECLS #endif /* NM_CLIENT_H */ diff --git a/libnm-glib/nm-device-wimax.c b/libnm-glib/nm-device-wimax.c index 62e3f772..881fce5f 100644 --- a/libnm-glib/nm-device-wimax.c +++ b/libnm-glib/nm-device-wimax.c @@ -369,7 +369,7 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *self) * * Gets the ID of the serving Base Station when the device is connected. * - * Returns: the ID of the serving Base Station, or NULL + * Returns: the ID of the serving Base Station, or %NULL **/ const char * nm_device_wimax_get_bsid (NMDeviceWimax *self) diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index 5f492e2c..1c4fd736 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -205,6 +205,11 @@ device_state_change_reloaded (GObject *object, NMDevice *self = NM_DEVICE (object); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); StateChangeData *data = user_data; + NMDeviceState old_state = data->old_state; + NMDeviceState new_state = data->new_state; + NMDeviceStateReason reason = data->reason; + + g_slice_free (StateChangeData, data); _nm_object_reload_properties_finish (NM_OBJECT (object), result, NULL); @@ -213,17 +218,16 @@ device_state_change_reloaded (GObject *object, * they'll finish in the right order. In that case, only emit the signal * for the last one. */ - if (priv->last_seen_state != data->new_state) + if (priv->last_seen_state != new_state) return; /* Ensure that nm_device_get_state() will return the right value even if * we haven't processed the corresponding PropertiesChanged yet. */ - priv->state = data->new_state; + priv->state = new_state; g_signal_emit (self, signals[STATE_CHANGED], 0, - data->new_state, data->old_state, data->reason); - g_slice_free (StateChangeData, data); + new_state, old_state, reason); } static void @@ -1252,7 +1256,7 @@ nm_device_get_state (NMDevice *device) /** * nm_device_get_state_reason: * @device: a #NMDevice - * @reason: (out) (allow-none): location to store reason (#NMDeviceStateReason), or NULL + * @reason: (out) (allow-none): location to store reason (#NMDeviceStateReason), or %NULL * * Gets the current #NMDevice state (return value) and the reason for entering * the state (@reason argument). @@ -1364,39 +1368,33 @@ get_decoded_property (GUdevDevice *device, const char *property) return unescaped; } -static void -_device_update_description (NMDevice *device) +static char * +_get_udev_property (NMDevice *device, + const char *enc_prop, /* ID_XXX_ENC */ + const char *db_prop) /* ID_XXX_FROM_DATABASE */ { - NMDevicePrivate *priv; + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); const char *subsys[3] = { "net", "tty", NULL }; GUdevDevice *udev_device = NULL, *tmpdev, *olddev; const char *ifname; guint32 count = 0; - const char *vendor, *model; - - g_return_if_fail (NM_IS_DEVICE (device)); - priv = NM_DEVICE_GET_PRIVATE (device); + char *enc_value = NULL, *db_value = NULL; if (!priv->client) { priv->client = g_udev_client_new (subsys); if (!priv->client) - return; + return NULL; } ifname = nm_device_get_iface (device); if (!ifname) - return; + return NULL; udev_device = g_udev_client_query_by_subsystem_and_name (priv->client, "net", ifname); if (!udev_device) udev_device = g_udev_client_query_by_subsystem_and_name (priv->client, "tty", ifname); if (!udev_device) - return; - - g_free (priv->product); - priv->product = NULL; - g_free (priv->vendor); - priv->vendor = NULL; + return NULL; /* Walk up the chain of the device and its parents a few steps to grab * vendor and device ID information off it. @@ -1406,12 +1404,11 @@ _device_update_description (NMDevice *device) * as g_udev_device_get_parent() returns a ref-ed object. */ tmpdev = g_object_ref (udev_device); - while ((count++ < 3) && tmpdev && (!priv->vendor || !priv->product)) { - if (!priv->vendor) - priv->vendor = get_decoded_property (tmpdev, "ID_VENDOR_ENC"); - - if (!priv->product) - priv->product = get_decoded_property (tmpdev, "ID_MODEL_ENC"); + while ((count++ < 3) && tmpdev && !enc_value) { + if (!enc_value) + enc_value = get_decoded_property (tmpdev, enc_prop); + if (!db_value) + db_value = g_strdup (g_udev_device_get_property (tmpdev, db_prop)); olddev = tmpdev; tmpdev = g_udev_device_get_parent (tmpdev); @@ -1424,42 +1421,18 @@ _device_update_description (NMDevice *device) if (tmpdev) g_object_unref (tmpdev); - /* If we didn't get strings directly from the device, try database strings */ + /* Balance the initial g_udev_client_query_by_subsystem_and_name() */ + g_object_unref (udev_device); - /* Again, ref the original device as we need to unref it every iteration - * since g_udev_device_get_parent() returns a refed object. + /* Prefer the the encoded value which comes directly from the device + * over the hwdata database value. */ - tmpdev = g_object_ref (udev_device); - count = 0; - while ((count++ < 3) && tmpdev && (!priv->vendor || !priv->product)) { - if (!priv->vendor) { - vendor = g_udev_device_get_property (tmpdev, "ID_VENDOR_FROM_DATABASE"); - if (vendor) - priv->vendor = g_strdup (vendor); - } - - if (!priv->product) { - model = g_udev_device_get_property (tmpdev, "ID_MODEL_FROM_DATABASE"); - if (model) - priv->product = g_strdup (model); - } - - olddev = tmpdev; - tmpdev = g_udev_device_get_parent (tmpdev); - g_object_unref (olddev); + if (enc_value) { + g_free (db_value); + return enc_value; } - /* Unref the last device if we found what we needed before running out - * of parents. - */ - if (tmpdev) - g_object_unref (tmpdev); - - /* Balance the initial g_udev_client_query_by_subsystem_and_name() */ - g_object_unref (udev_device); - - _nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_VENDOR); - _nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_PRODUCT); + return db_value; } /** @@ -1479,8 +1452,14 @@ nm_device_get_product (NMDevice *device) g_return_val_if_fail (NM_IS_DEVICE (device), NULL); priv = NM_DEVICE_GET_PRIVATE (device); - if (!priv->product) - _device_update_description (device); + if (!priv->product) { + priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_MODEL_FROM_DATABASE"); + if (!priv->product) { + /* Sometimes ID_PRODUCT_FROM_DATABASE is used? */ + priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_PRODUCT_FROM_DATABASE"); + } + _nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_PRODUCT); + } return priv->product; } @@ -1501,8 +1480,10 @@ nm_device_get_vendor (NMDevice *device) g_return_val_if_fail (NM_IS_DEVICE (device), NULL); priv = NM_DEVICE_GET_PRIVATE (device); - if (!priv->vendor) - _device_update_description (device); + if (!priv->vendor) { + priv->vendor = _get_udev_property (device, "ID_VENDOR_ENC", "ID_VENDOR_FROM_DATABASE"); + _nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_VENDOR); + } return priv->vendor; } diff --git a/libnm-glib/nm-dhcp4-config.c b/libnm-glib/nm-dhcp4-config.c index 89ccf25e..b8d7dcdd 100644 --- a/libnm-glib/nm-dhcp4-config.c +++ b/libnm-glib/nm-dhcp4-config.c @@ -163,8 +163,7 @@ nm_dhcp4_config_class_init (NMDHCP4ConfigClass *config_class) * * The #GHashTable containing options of the configuration. * - * Type: GLib.HashTable - * Element-Type: utf8,GObject.Value + * Type: GLib.HashTable(utf8,GObject.Value) **/ g_object_class_install_property (object_class, PROP_OPTIONS, diff --git a/libnm-glib/nm-dhcp6-config.c b/libnm-glib/nm-dhcp6-config.c index 88b3b103..fd1e6526 100644 --- a/libnm-glib/nm-dhcp6-config.c +++ b/libnm-glib/nm-dhcp6-config.c @@ -163,8 +163,7 @@ nm_dhcp6_config_class_init (NMDHCP6ConfigClass *config_class) * * The #GHashTable containing options of the configuration. * - * Type: GLib.HashTable - * Element-Type: utf8,GObject.Value + * Type: GLib.HashTable(utf8,GObject.Value) **/ g_object_class_install_property (object_class, PROP_OPTIONS, diff --git a/libnm-glib/nm-ip6-config.c b/libnm-glib/nm-ip6-config.c index 988dcd30..9efc32ee 100644 --- a/libnm-glib/nm-ip6-config.c +++ b/libnm-glib/nm-ip6-config.c @@ -166,9 +166,9 @@ nm_ip6_config_get_addresses (NMIP6Config *config) * * Gets the domain name servers (DNS). * - * Returns: (element-type Posix.in6_addr): a #GSList containing elements of type - * 'struct in6_addr' which contain the addresses of nameservers of the configuration. - * This is the internal copy used by the configuration and must not be modified. + * Returns: a #GSList containing elements of type 'struct in6_addr' which + * contain the addresses of nameservers of the configuration. This is the + * internal copy used by the configuration and must not be modified. **/ const GSList * nm_ip6_config_get_nameservers (NMIP6Config *config) diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c index af659bd1..7696673b 100644 --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -525,6 +525,17 @@ create_async_complete (GObject *object, NMObjectTypeAsyncData *async_data) g_slice_free (NMObjectTypeAsyncData, async_data); } +static const char * +nm_object_or_connection_get_path (gpointer instance) +{ + if (NM_IS_OBJECT (instance)) + return nm_object_get_path (instance); + else if (NM_IS_CONNECTION (instance)) + return nm_connection_get_path (instance); + + g_assert_not_reached (); +} + static void async_inited (GObject *source, GAsyncResult *result, gpointer user_data) { @@ -534,7 +545,7 @@ async_inited (GObject *source, GAsyncResult *result, gpointer user_data) if (!g_async_initable_init_finish (G_ASYNC_INITABLE (object), result, &error)) { g_warning ("Could not create object for %s: %s", - nm_object_get_path (NM_OBJECT (object)), error->message); + nm_object_or_connection_get_path (object), error->message); g_error_free (error); g_object_unref (object); object = NULL; @@ -634,8 +645,10 @@ add_to_object_array_unique (GPtrArray *array, GObject *obj) if (obj != NULL) { for (i = 0; i < array->len; i++) { - if (g_ptr_array_index (array, i) == obj) + if (g_ptr_array_index (array, i) == obj) { + g_object_unref (obj); return; + } } g_ptr_array_add (array, obj); } @@ -1399,6 +1412,7 @@ _nm_object_reload_properties_async (NMObject *object, GAsyncReadyCallback callba if (!priv->property_interfaces && !priv->pseudo_properties) { g_simple_async_result_complete_in_idle (simple); + g_object_unref (simple); return; } diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index ebb6a7b6..b5c2821f 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -222,7 +222,7 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_dat * @connection: the #NMRemoteConnection * @setting_name: the #NMSetting object name to get secrets for * @callback: (scope async): a function to be called when the update completes; - * must not be NULL + * must not be %NULL * @user_data: (closure): caller-specific data to be passed to @callback * * Request the connection's secrets. @@ -428,6 +428,7 @@ init_get_settings_cb (DBusGProxy *proxy, } g_simple_async_result_complete (init_data->result); + g_object_unref (init_data->result); g_slice_free (NMRemoteConnectionInitData, init_data); } diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index 0e95ef0a..989528cb 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -178,7 +178,7 @@ add_connection_info_complete (NMRemoteSettings *self, * * Returns the %NMRemoteConnection representing the connection at @path. * - * Returns: (transfer none): the remote connection object on success, or NULL if the object was + * Returns: (transfer none): the remote connection object on success, or %NULL if the object was * not known **/ NMRemoteConnection * @@ -204,7 +204,7 @@ nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings, const cha * * Returns the %NMRemoteConnection identified by @uuid. * - * Returns: (transfer none): the remote connection object on success, or NULL if the object was + * Returns: (transfer none): the remote connection object on success, or %NULL if the object was * not known **/ NMRemoteConnection * @@ -643,7 +643,7 @@ save_hostname_cb (DBusGProxy *proxy, /** * nm_remote_settings_save_hostname: * @settings: the %NMRemoteSettings - * @hostname: the new persistent hostname to set, or NULL to clear any existing + * @hostname: the new persistent hostname to set, or %NULL to clear any existing * persistent hostname * @callback: (scope async) (allow-none): callback to be called when the * hostname operation completes diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c index bfa4fcfc..e7dcbbb5 100644 --- a/libnm-glib/nm-secret-agent.c +++ b/libnm-glib/nm-secret-agent.c @@ -681,7 +681,7 @@ auto_register_cb (gpointer user_data) * existing secrets without user interaction, or requesting entirely new * secrets from the user. * - * VFunc: get_secrets + * Virtual: get_secrets */ void nm_secret_agent_get_secrets (NMSecretAgent *self, @@ -721,7 +721,7 @@ nm_secret_agent_get_secrets (NMSecretAgent *self, * Asyncronously ensure that all secrets inside @connection * are stored to disk. * - * VFunc: save_secrets + * Virtual: save_secrets */ void nm_secret_agent_save_secrets (NMSecretAgent *self, @@ -752,7 +752,7 @@ nm_secret_agent_save_secrets (NMSecretAgent *self, * Asynchronously ask the agent to delete all saved secrets belonging to * @connection. * - * VFunc: delete_secrets + * Virtual: delete_secrets */ void nm_secret_agent_delete_secrets (NMSecretAgent *self, diff --git a/libnm-glib/nm-secret-agent.h b/libnm-glib/nm-secret-agent.h index dbc027c7..eabe9866 100644 --- a/libnm-glib/nm-secret-agent.h +++ b/libnm-glib/nm-secret-agent.h @@ -195,12 +195,12 @@ typedef struct { /* Called when the subclass should retrieve and return secrets. Subclass * must copy or reference any arguments it may require after returning from - * this method, as the arguments will freed (except for 'agent', 'callback', + * this method, as the arguments will freed (except for 'self', 'callback', * and 'user_data' of course). If the request is canceled, the callback * should still be called, but with the NM_SECRET_AGENT_ERROR_AGENT_CANCELED * error. */ - void (*get_secrets) (NMSecretAgent *agent, + void (*get_secrets) (NMSecretAgent *self, NMConnection *connection, const char *connection_path, const char *setting_name, @@ -215,17 +215,17 @@ typedef struct { * call, sending the NM_SECRET_AGENT_ERROR/NM_SECRET_AGENT_ERROR_AGENT_CANCELED * error to that callback. */ - void (*cancel_get_secrets) (NMSecretAgent *agent, + void (*cancel_get_secrets) (NMSecretAgent *self, const char *connection_path, const char *setting_name); /* Called when the subclass should save the secrets contained in the * connection to backing storage. Subclass must copy or reference any * arguments it may require after returning from this method, as the - * arguments will freed (except for 'agent', 'callback', and 'user_data' + * arguments will freed (except for 'self', 'callback', and 'user_data' * of course). */ - void (*save_secrets) (NMSecretAgent *agent, + void (*save_secrets) (NMSecretAgent *self, NMConnection *connection, const char *connection_path, NMSecretAgentSaveSecretsFunc callback, @@ -234,10 +234,10 @@ typedef struct { /* Called when the subclass should delete the secrets contained in the * connection from backing storage. Subclass must copy or reference any * arguments it may require after returning from this method, as the - * arguments will freed (except for 'agent', 'callback', and 'user_data' + * arguments will freed (except for 'self', 'callback', and 'user_data' * of course). */ - void (*delete_secrets) (NMSecretAgent *agent, + void (*delete_secrets) (NMSecretAgent *self, NMConnection *connection, const char *connection_path, NMSecretAgentDeleteSecretsFunc callback, diff --git a/libnm-glib/tests/Makefile.in b/libnm-glib/tests/Makefile.in index 636e81f2..ef9fb9b9 100644 --- a/libnm-glib/tests/Makefile.in +++ b/libnm-glib/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +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 \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + 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; \ - test $$am__dry = yes; \ - } + 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@ @@ -54,7 +81,8 @@ host_triplet = @host@ @ENABLE_TESTS_TRUE@noinst_PROGRAMS = \ @ENABLE_TESTS_TRUE@ test-remote-settings-client$(EXEEXT) subdir = libnm-glib/tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 \ @@ -88,6 +116,19 @@ 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 = +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 @@ -100,20 +141,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(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_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +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_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(test_remote_settings_client_SOURCES) DIST_SOURCES = $(am__test_remote_settings_client_SOURCES_DIST) am__can_run_installinfo = \ @@ -121,6 +158,23 @@ am__can_run_installinfo = \ 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) @@ -265,7 +319,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -280,6 +333,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ +SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ @@ -430,6 +485,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + test-remote-settings-client$(EXEEXT): $(test_remote_settings_client_OBJECTS) $(test_remote_settings_client_DEPENDENCIES) $(EXTRA_test_remote_settings_client_DEPENDENCIES) @rm -f test-remote-settings-client$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_remote_settings_client_OBJECTS) $(test_remote_settings_client_LDADD) $(LIBS) @@ -483,26 +539,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +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`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -514,15 +559,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +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 @@ -531,6 +572,21 @@ 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 @@ -674,9 +730,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ - clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ + 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-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -686,7 +742,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + tags tags-am uninstall uninstall-am @ENABLE_TESTS_TRUE@check-local: test-remote-settings-client |