#13795: Initial commit for sflphone-android
includes: libexpat libyaml libdbus-c++ commoncpp ccrtp
libdbus (from android-4.0.4 sources)
TODO:
- git ignores "/jni/sflphone", sflphone repo should be cloned.
- sflphone-android only needs daemon directory. Ideally it should be possible
to clone it without cloning the whole sflphone project.
into sfl-android (commit 6a0fa7a "#13961: Fix cipher handling" has been used here)
- add pjsip-android project as a git submodule
- sflphone-android needs pjsip android project. Ideally daemon git repository
should not embed pjsip. Instead pjsip should be clone from official repositories.
Considering this, structure should have three distincts git repos:
sflphone-android/.git
sflphone-android/jni/ccrtp-1.8.0-android
sflphone-android/jni/commoncpp2-1.8.1-android
sflphone-android/jni/dbus
sflphone-android/jni/libdbus-c++-0.9.0-android
sflphone-android/jni/libexpat
sflphone-android/jni/libyaml
sflphone-android/jni/sflphone-daemon/.git
sflphone-android/jni/sflphone-daemon/src/audio
sflphone-android/jni/sflphone-daemon/src/config
sflphone-android/jni/sflphone-daemon/src/dbus
sflphone-android/jni/sflphone-daemon/src/history
sflphone-android/jni/sflphone-daemon/src/hooks
sflphone-android/jni/sflphone-daemon/src/iax
sflphone-android/jni/sflphone-daemon/src/sip
sflphone-android/jni/sflphone-daemon/src/video
sflphone-android/jni/pjsip-android/.git
Signed-off-by: Emeric Vigier <emeric.vigier@savoirfairelinux.com>
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_adaptor.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_adaptor.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_adaptor.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_proxy.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_proxy.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/generate_proxy.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/generator_utils.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/generator_utils.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/generator_utils.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/introspect.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/introspect.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/introspect.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/xml.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/xml.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/xml.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/.deps/xml2cpp.Po b/jni/libdbus-c++-0.9.0-android/tools/.deps/xml2cpp.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/.deps/xml2cpp.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libdbus-c++-0.9.0-android/tools/Makefile b/jni/libdbus-c++-0.9.0-android/tools/Makefile
new file mode 100644
index 0000000..ee8c664
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/Makefile
@@ -0,0 +1,577 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tools/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# hacky, but ...
+
+
+pkgdatadir = $(datadir)/libdbus-c++
+pkgincludedir = $(includedir)/libdbus-c++
+pkglibdir = $(libdir)/libdbus-c++
+pkglibexecdir = $(libexecdir)/libdbus-c++
+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 = x86_64-unknown-linux-gnu
+host_triplet = arm-unknown-linux-androideabi
+bin_PROGRAMS = dbusxx-xml2cpp$(EXEEXT) dbusxx-introspect$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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)"
+PROGRAMS = $(bin_PROGRAMS)
+am_dbusxx_introspect_OBJECTS = introspect.$(OBJEXT)
+dbusxx_introspect_OBJECTS = $(am_dbusxx_introspect_OBJECTS)
+dbusxx_introspect_DEPENDENCIES = $(libdbus_cxx_la)
+am_dbusxx_xml2cpp_OBJECTS = xml.$(OBJEXT) xml2cpp.$(OBJEXT) \
+ generate_adaptor.$(OBJEXT) generate_proxy.$(OBJEXT) \
+ generator_utils.$(OBJEXT)
+dbusxx_xml2cpp_OBJECTS = $(am_dbusxx_xml2cpp_OBJECTS)
+am__DEPENDENCIES_1 =
+dbusxx_xml2cpp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
+DIST_SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run tar
+AR = arm-linux-androideabi-ar
+AUTOCONF = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run automake-1.11
+AWK = gawk
+BUILD_LIBDBUS_CXX_DIR = $(top_builddir)
+CC = arm-linux-androideabi-gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = arm-linux-androideabi-gcc -E
+CPPFLAGS =
+CXX = $(CXX_FOR_BUILD)
+CXXCPP = arm-linux-androideabi-g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2 -fvisibility=hidden
+CXX_FOR_BUILD = arm-linux-androideabi-g++
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = false
+DOXYGEN = no
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /home/evigier/android-14b-toolchain/arm-linux-androideabi/bin/ld
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/missing --run makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /bin/mkdir -p
+NM = /home/evigier/android-14b-toolchain/bin/arm-linux-androideabi-nm -B
+NMEDIT =
+OBJDUMP = arm-linux-androideabi-objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = libdbus-c++
+PACKAGE_BUGREPORT = andreas.volz@tux-style.com
+PACKAGE_NAME = libdbus-c++
+PACKAGE_STRING = libdbus-c++ 0.9.0
+PACKAGE_TARNAME = libdbus-c--
+PACKAGE_URL =
+PACKAGE_VERSION = 0.9.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR =
+PKG_CONFIG_PATH =
+PTHREAD_CC = arm-linux-androideabi-gcc
+PTHREAD_CFLAGS =
+PTHREAD_LIBS =
+RANLIB = arm-linux-androideabi-ranlib
+RT_LIBS =
+SED = /bin/sed
+SET_MAKE =
+SHELL = /bin/bash
+STRIP = arm-linux-androideabi-strip
+VERSION = 0.9.0
+abs_builddir = /home/evigier/git/libdbus-c++-0.9.0-android/tools
+abs_srcdir = /home/evigier/git/libdbus-c++-0.9.0-android/tools
+abs_top_builddir = /home/evigier/git/libdbus-c++-0.9.0-android
+abs_top_srcdir = /home/evigier/git/libdbus-c++-0.9.0-android
+ac_ct_AR =
+ac_ct_CC =
+ac_ct_CXX =
+ac_ct_DUMPBIN =
+acx_pthread_config =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+dbus_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
+dbus_LIBS = -ldbus-1 -lpthread -lrt
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+ecore_CFLAGS =
+ecore_LIBS =
+exec_prefix = ${prefix}
+glib_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
+glib_LIBS = -lglib-2.0
+gtkmm_CFLAGS =
+gtkmm_LIBS =
+host = arm-unknown-linux-androideabi
+host_alias = arm-linux-androideabi
+host_cpu = arm
+host_os = linux-androideabi
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/evigier/git/libdbus-c++-0.9.0-android/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /home/evigier/android-ndk-r8b/platforms/android-14/arch-arm/usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+xml_CFLAGS =
+xml_LIBS = -lexpat
+AM_CPPFLAGS = \
+ $(dbus_CFLAGS) \
+ $(xml_CFLAGS) \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -Wall
+
+#libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la
+libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la
+dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp \
+ generate_adaptor.cpp generate_adaptor.h generate_proxy.cpp\
+ generate_proxy.h generator_utils.cpp generator_utils.h
+
+dbusxx_xml2cpp_LDADD = $(xml_LIBS)
+dbusxx_introspect_SOURCES = introspect.h introspect.cpp
+dbusxx_introspect_LDADD = $(libdbus_cxx_la)
+MAINTAINERCLEANFILES = \
+ Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 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
+dbusxx-introspect$(EXEEXT): $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_DEPENDENCIES)
+ @rm -f dbusxx-introspect$(EXEEXT)
+ $(CXXLINK) $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_LDADD) $(LIBS)
+dbusxx-xml2cpp$(EXEEXT): $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_DEPENDENCIES)
+ @rm -f dbusxx-xml2cpp$(EXEEXT)
+ $(CXXLINK) $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include ./$(DEPDIR)/generate_adaptor.Po
+include ./$(DEPDIR)/generate_proxy.Po
+include ./$(DEPDIR)/generator_utils.Po
+include ./$(DEPDIR)/introspect.Po
+include ./$(DEPDIR)/xml.Po
+include ./$(DEPDIR)/xml2cpp.Po
+
+.cpp.o:
+ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+# source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+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)
+ 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; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool 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: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags 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 uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+
+# 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 --git a/jni/libdbus-c++-0.9.0-android/tools/Makefile.am b/jni/libdbus-c++-0.9.0-android/tools/Makefile.am
new file mode 100644
index 0000000..c025cd1
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/Makefile.am
@@ -0,0 +1,29 @@
+# hacky, but ...
+
+CXX = $(CXX_FOR_BUILD)
+
+AM_CPPFLAGS = \
+ $(dbus_CFLAGS) \
+ $(xml_CFLAGS) \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -Wall
+
+if CROSS_COMPILING
+libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la
+else
+libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la
+endif
+
+bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect
+
+dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp \
+ generate_adaptor.cpp generate_adaptor.h generate_proxy.cpp\
+ generate_proxy.h generator_utils.cpp generator_utils.h
+dbusxx_xml2cpp_LDADD = $(xml_LIBS)
+
+dbusxx_introspect_SOURCES = introspect.h introspect.cpp
+dbusxx_introspect_LDADD = $(libdbus_cxx_la)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in
diff --git a/jni/libdbus-c++-0.9.0-android/tools/Makefile.in b/jni/libdbus-c++-0.9.0-android/tools/Makefile.in
new file mode 100644
index 0000000..73c33c1
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/Makefile.in
@@ -0,0 +1,577 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# hacky, but ...
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = dbusxx-xml2cpp$(EXEEXT) dbusxx-introspect$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.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)"
+PROGRAMS = $(bin_PROGRAMS)
+am_dbusxx_introspect_OBJECTS = introspect.$(OBJEXT)
+dbusxx_introspect_OBJECTS = $(am_dbusxx_introspect_OBJECTS)
+dbusxx_introspect_DEPENDENCIES = $(libdbus_cxx_la)
+am_dbusxx_xml2cpp_OBJECTS = xml.$(OBJEXT) xml2cpp.$(OBJEXT) \
+ generate_adaptor.$(OBJEXT) generate_proxy.$(OBJEXT) \
+ generator_utils.$(OBJEXT)
+dbusxx_xml2cpp_OBJECTS = $(am_dbusxx_xml2cpp_OBJECTS)
+am__DEPENDENCIES_1 =
+dbusxx_xml2cpp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
+DIST_SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_LIBDBUS_CXX_DIR = @BUILD_LIBDBUS_CXX_DIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = $(CXX_FOR_BUILD)
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FOR_BUILD = @CXX_FOR_BUILD@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+RT_LIBS = @RT_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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_CFLAGS = @dbus_CFLAGS@
+dbus_LIBS = @dbus_LIBS@
+docdir = @docdir@
+dvidir = @dvidir@
+ecore_CFLAGS = @ecore_CFLAGS@
+ecore_LIBS = @ecore_LIBS@
+exec_prefix = @exec_prefix@
+glib_CFLAGS = @glib_CFLAGS@
+glib_LIBS = @glib_LIBS@
+gtkmm_CFLAGS = @gtkmm_CFLAGS@
+gtkmm_LIBS = @gtkmm_LIBS@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+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@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+xml_CFLAGS = @xml_CFLAGS@
+xml_LIBS = @xml_LIBS@
+AM_CPPFLAGS = \
+ $(dbus_CFLAGS) \
+ $(xml_CFLAGS) \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -Wall
+
+@CROSS_COMPILING_FALSE@libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la
+@CROSS_COMPILING_TRUE@libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la
+dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp \
+ generate_adaptor.cpp generate_adaptor.h generate_proxy.cpp\
+ generate_proxy.h generator_utils.cpp generator_utils.h
+
+dbusxx_xml2cpp_LDADD = $(xml_LIBS)
+dbusxx_introspect_SOURCES = introspect.h introspect.cpp
+dbusxx_introspect_LDADD = $(libdbus_cxx_la)
+MAINTAINERCLEANFILES = \
+ Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 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
+dbusxx-introspect$(EXEEXT): $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_DEPENDENCIES)
+ @rm -f dbusxx-introspect$(EXEEXT)
+ $(CXXLINK) $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_LDADD) $(LIBS)
+dbusxx-xml2cpp$(EXEEXT): $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_DEPENDENCIES)
+ @rm -f dbusxx-xml2cpp$(EXEEXT)
+ $(CXXLINK) $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_adaptor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_proxy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generator_utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml2cpp.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+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)
+ 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; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool 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: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags 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 uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+
+# 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 --git a/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.cpp b/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.cpp
new file mode 100644
index 0000000..f7972be
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.cpp
@@ -0,0 +1,722 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <algorithm>
+
+#include "generator_utils.h"
+#include "generate_adaptor.h"
+
+using namespace std;
+using namespace DBus;
+
+extern const char *tab;
+extern const char *header;
+extern const char *dbus_includes;
+
+/*! Generate adaptor code for a XML introspection
+ */
+void generate_adaptor(Xml::Document &doc, const char *filename)
+{
+ ostringstream body;
+ ostringstream head;
+ vector <string> include_vector;
+
+ head << header;
+ string filestring = filename;
+ underscorize(filestring);
+
+ string cond_comp = "__dbusxx__" + filestring + "__ADAPTOR_MARSHAL_H";
+
+ head << "#ifndef " << cond_comp << endl
+ << "#define " << cond_comp << endl;
+
+ head << dbus_includes;
+
+ Xml::Node &root = *(doc.root);
+ Xml::Nodes interfaces = root["interface"];
+
+ // iterate over all interface definitions
+ for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
+ {
+ Xml::Node &iface = **i;
+ Xml::Nodes methods = iface["method"];
+ Xml::Nodes signals = iface["signal"];
+ Xml::Nodes properties = iface["property"];
+ Xml::Nodes ms;
+ ms.insert(ms.end(), methods.begin(), methods.end());
+ ms.insert(ms.end(), signals.begin(), signals.end());
+
+ // gets the name of a interface: <interface name="XYZ">
+ string ifacename = iface.get("name");
+
+ // these interface names are skipped.
+ if (ifacename == "org.freedesktop.DBus.Introspectable"
+ || ifacename == "org.freedesktop.DBus.Properties")
+ {
+ cerr << "skipping interface " << ifacename << endl;
+ continue;
+ }
+
+ istringstream ss(ifacename);
+ string nspace;
+ unsigned int nspaces = 0;
+
+ // prints all the namespaces defined with <interface name="X.Y.Z">
+ while (ss.str().find('.', ss.tellg()) != string::npos)
+ {
+ getline(ss, nspace, '.');
+
+ body << "namespace " << nspace << " {" << endl;
+
+ ++nspaces;
+ }
+ body << endl;
+
+ string ifaceclass;
+
+ getline(ss, ifaceclass);
+
+ // a "_adaptor" is added to class name to distinguish between proxy and adaptor
+ ifaceclass += "_adaptor";
+
+ cerr << "generating code for interface " << ifacename << "..." << endl;
+
+ // the code from class definiton up to opening of the constructor is generated...
+ body << "class " << ifaceclass << endl
+ << ": public ::DBus::InterfaceAdaptor" << endl
+ << "{" << endl
+ << "public:" << endl
+ << endl
+ << tab << ifaceclass << "()" << endl
+ << tab << ": ::DBus::InterfaceAdaptor(\"" << ifacename << "\")" << endl
+ << tab << "{" << endl;
+
+ // generates code to bind the properties
+ for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+ {
+ Xml::Node &property = **pi;
+
+ body << tab << tab << "bind_property("
+ << property.get("name") << ", "
+ << "\"" << property.get("type") << "\", "
+ << (property.get("access").find("read") != string::npos
+ ? "true"
+ : "false")
+ << ", "
+ << (property.get("access").find("write") != string::npos
+ ? "true"
+ : "false")
+ << ");" << endl;
+ }
+
+ // generate code to register all methods
+ for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+
+ body << tab << tab << "register_method("
+ << ifaceclass << ", " << method.get("name") << ", " << stub_name(method.get("name"))
+ << ");" << endl;
+ }
+
+ body << tab << "}" << endl
+ << endl;
+
+ body << tab << "::DBus::IntrospectedInterface *introspect() const " << endl
+ << tab << "{" << endl;
+
+ // generate the introspect arguments
+ for (Xml::Nodes::iterator mi = ms.begin(); mi != ms.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+ Xml::Nodes args = method["arg"];
+
+ body << tab << tab << "static ::DBus::IntrospectedArgument " << method.get("name") << "_args[] = " << endl
+ << tab << tab << "{" << endl;
+
+ for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai)
+ {
+ Xml::Node &arg = **ai;
+
+ body << tab << tab << tab << "{ ";
+
+ if (arg.get("name").length())
+ {
+ body << "\"" << arg.get("name") << "\", ";
+ }
+ else
+ {
+ body << "0, ";
+ }
+ body << "\"" << arg.get("type") << "\", "
+ << (arg.get("direction") == "in" ? "true" : "false")
+ << " }," << endl;
+ }
+ body << tab << tab << tab << "{ 0, 0, 0 }" << endl
+ << tab << tab << "};" << endl;
+ }
+
+ body << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_methods[] = " << endl
+ << tab << tab << "{" << endl;
+
+ // generate the introspect methods
+ for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+
+ body << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
+ }
+
+ body << tab << tab << tab << "{ 0, 0 }" << endl
+ << tab << tab << "};" << endl;
+
+ body << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_signals[] = " << endl
+ << tab << tab << "{" << endl;
+
+ for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+ {
+ Xml::Node &method = **si;
+
+ body << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
+ }
+
+ body << tab << tab << tab << "{ 0, 0 }" << endl
+ << tab << tab << "};" << endl;
+
+ body << tab << tab << "static ::DBus::IntrospectedProperty " << ifaceclass << "_properties[] = " << endl
+ << tab << tab << "{" << endl;
+
+ for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+ {
+ Xml::Node &property = **pi;
+
+ body << tab << tab << tab << "{ "
+ << "\"" << property.get("name") << "\", "
+ << "\"" << property.get("type") << "\", "
+ << (property.get("access").find("read") != string::npos
+ ? "true"
+ : "false")
+ << ", "
+ << (property.get("access").find("write") != string::npos
+ ? "true"
+ : "false")
+ << " }," << endl;
+ }
+
+
+ body << tab << tab << tab << "{ 0, 0, 0, 0 }" << endl
+ << tab << tab << "};" << endl;
+
+ // generate the Introspected interface
+ body << tab << tab << "static ::DBus::IntrospectedInterface " << ifaceclass << "_interface = " << endl
+ << tab << tab << "{" << endl
+ << tab << tab << tab << "\"" << ifacename << "\"," << endl
+ << tab << tab << tab << ifaceclass << "_methods," << endl
+ << tab << tab << tab << ifaceclass << "_signals," << endl
+ << tab << tab << tab << ifaceclass << "_properties" << endl
+ << tab << tab << "};" << endl
+ << tab << tab << "return &" << ifaceclass << "_interface;" << endl
+ << tab << "}" << endl
+ << endl;
+
+ body << "public:" << endl
+ << endl
+ << tab << "/* properties exposed by this interface, use" << endl
+ << tab << " * property() and property(value) to get and set a particular property" << endl
+ << tab << " */" << endl;
+
+ // generate the properties code
+ for (Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi)
+ {
+ Xml::Node &property = **pi;
+ string name = property.get("name");
+ string type = property.get("type");
+ string type_name = signature_to_type(type);
+
+ body << tab << "::DBus::PropertyAdaptor< " << type_name << " > " << name << ";" << endl;
+ }
+
+ body << endl;
+
+ body << "public:" << endl
+ << endl
+ << tab << "/* methods exported by this interface," << endl
+ << tab << " * you will have to implement them in your ObjectAdaptor" << endl
+ << tab << " */" << endl;
+
+ // generate the methods code
+ for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+ Xml::Nodes args = method["arg"];
+ Xml::Nodes args_in = args.select("direction", "in");
+ Xml::Nodes args_out = args.select("direction", "out");
+ Xml::Nodes annotations = args["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ body << tab << "virtual ";
+
+ // return type is 'void' if none or multible return values
+ if (args_out.size() == 0 || args_out.size() > 1)
+ {
+ body << "void ";
+ }
+ else if (args_out.size() == 1)
+ {
+ // generate basic or object return type
+ if (arg_object.length())
+ {
+ body << arg_object << " ";
+ }
+ else
+ {
+ body << signature_to_type(args_out.front()->get("type")) << " ";
+ }
+ }
+
+ // generate the method name
+ body << method.get("name") << "(";
+
+ // generate the methods 'in' variables
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_name = arg.get("name");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << "const " << signature_to_type(arg.get("type")) << "& ";
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << "const " << arg_object << "& ";
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ if (arg_name.length())
+ body << arg_name;
+
+ if ((i + 1 != args_in.size() || args_out.size() > 1))
+ body << ", ";
+ }
+
+ // generate the method 'out' variables if multibe 'out' values exist
+ if (args_out.size() > 1)
+ {
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_name = arg.get("name");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << signature_to_type(arg.get("type")) << "& ";
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << arg_object << "& ";
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ if (arg_name.length())
+ body << arg_name;
+
+ if (i + 1 != args_out.size())
+ body << ", ";
+ }
+ }
+ body << ") = 0;" << endl;
+ }
+
+ body << endl
+ << "public:" << endl
+ << endl
+ << tab << "/* signal emitters for this interface" << endl
+ << tab << " */" << endl;
+
+ // generate the signals code
+ for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+ {
+ Xml::Node &signal = **si;
+ Xml::Nodes args = signal["arg"];
+
+ body << tab << "void " << signal.get("name") << "(";
+
+ // generate the signal arguments
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
+ {
+ Xml::Node &arg = **a;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << "const " << signature_to_type(arg.get("type")) << "& arg" << i + 1;
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << "const " << arg_object << "& arg" << i + 1;
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ if (i + 1 != args.size())
+ body << ", ";
+ }
+
+ body << ")" << endl
+ << tab << "{" << endl
+ << tab << tab << "::DBus::SignalMessage sig(\"" << signal.get("name") << "\");" << endl;
+
+ // generate the signal body
+ if (!args.empty())
+ {
+ body << tab << tab << "::DBus::MessageIter wi = sig.writer();" << endl;
+
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
+ {
+ Xml::Node &arg = **a;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << signature_to_type(arg.get("type")) << " _arg" << i + 1 << ";" << endl;
+ body << tab << tab << "_arg" << i + 1 << " << " << "arg" << i + 1 << ";" << endl;
+
+ body << tab << tab << "wi << _arg" << i + 1 << ";" << endl;
+ }
+ else
+ {
+ body << tab << tab << "wi << arg" << i + 1 << ";" << endl;
+ }
+ }
+ }
+
+ // emit the signal in method body
+ body << tab << tab << "emit_signal(sig);" << endl
+ << tab << "}" << endl;
+ }
+
+ body << endl
+ << "private:" << endl
+ << endl
+ << tab << "/* unmarshalers (to unpack the DBus message before calling the actual interface method)" << endl
+ << tab << " */" << endl;
+
+ // generate the unmarshalers
+ for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+ Xml::Nodes args = method["arg"];
+ Xml::Nodes args_in = args.select("direction", "in");
+ Xml::Nodes args_out = args.select("direction", "out");
+
+ body << tab << "::DBus::Message " << stub_name(method.get("name")) << "(const ::DBus::CallMessage &call)" << endl
+ << tab << "{" << endl
+ << tab << tab << "::DBus::MessageIter ri = call.reader();" << endl
+ << endl;
+
+ // generate the 'in' variables
+ unsigned int i = 1;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+
+ body << tab << tab << signature_to_type(arg.get("type")) << " argin" << i << ";" << " ";
+ body << "ri >> argin" << i << ";" << endl;
+ }
+
+ // generate the 'in' object variables
+ i = 1;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << arg_object << " _argin" << i << ";";
+ body << " " << "_argin" << i << " << " << "argin" << i << ";" << endl;
+ }
+ }
+
+ // generate 'out' variables
+ if (!args_out.empty())
+ {
+ unsigned int i = 1;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+
+ body << tab << tab << signature_to_type(arg.get("type")) << " argout" << i;
+
+ if (args_out.size() == 1) // a single 'out' parameter will be assigned
+ {
+ body << " = ";
+ }
+ else // multible 'out' parameters will be handled as parameters below
+ {
+ body << ";" << endl;
+ }
+ }
+ }
+
+ // generate 'out' object variables
+ if (!args_out.empty())
+ {
+ unsigned int i = 1;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate object types
+ if (arg_object.length())
+ {
+ body << tab << tab << arg_object << " _argout" << i << ";" << endl;
+ }
+ }
+ }
+
+ // generate in '<<' operation
+ i = 0;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+ }
+
+ // do correct indent
+ if (args_out.size() != 1)
+ {
+ body << tab << tab;
+ }
+
+ body << method.get("name") << "(";
+
+ // generate call stub parameters
+ i = 0;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << "_argin" << i + 1;
+ }
+ else
+ {
+ body << "argin" << i + 1;
+ }
+
+ if ((i + 1 != args_in.size() || args_out.size() > 1))
+ body << ", ";
+ }
+
+ if (args_out.size() > 1)
+ {
+ i = 0;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << "_argout" << i + 1;
+ }
+ else
+ {
+ body << "argout" << i + 1;
+ }
+
+ if (i + 1 != args_out.size())
+ body << ", ";
+ }
+ }
+
+ body << ");" << endl;
+
+ body << tab << tab << "::DBus::ReturnMessage reply(call);" << endl;
+
+ if (!args_out.empty())
+ {
+ body << tab << tab << "::DBus::MessageIter wi = reply.writer();" << endl;
+
+ // generate out '<<' operation
+ i = 0;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << "argout" << i + 1 << " << " << "_argout" << i + 1 << ";" << endl;
+ }
+ }
+
+ for (unsigned int i = 0; i < args_out.size(); ++i)
+ {
+ body << tab << tab << "wi << argout" << i + 1 << ";" << endl;
+ }
+ }
+
+ body << tab << tab << "return reply;" << endl;
+
+ body << tab << "}" << endl;
+ }
+
+ body << "};" << endl
+ << endl;
+
+ for (unsigned int i = 0; i < nspaces; ++i)
+ {
+ body << "} ";
+ }
+ body << endl;
+ }
+
+ body << "#endif //" << cond_comp << endl;
+
+ // remove all duplicates in the header include vector
+ vector<string>::const_iterator vec_end_it = unique(include_vector.begin(), include_vector.end());
+
+ for (vector<string>::const_iterator vec_it = include_vector.begin();
+ vec_it != vec_end_it;
+ ++vec_it)
+ {
+ const string &include = *vec_it;
+
+ head << "#include " << "\"" << include << ".h" << "\"" << endl;
+ }
+ head << endl;
+
+ ofstream file(filename);
+ if (file.bad())
+ {
+ cerr << "unable to write file " << filename << endl;
+ exit(-1);
+ }
+
+ file << head.str();
+ file << body.str();
+
+ file.close();
+}
diff --git a/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.h b/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.h
new file mode 100644
index 0000000..fd888f0
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generate_adaptor.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATE_ADAPTOR_H
+#define __DBUSXX_TOOLS_GENERATE_ADAPTOR_H
+
+#include <string>
+#include "xml.h"
+
+void generate_adaptor(DBus::Xml::Document &doc, const char *filename);
+
+#endif//__DBUSXX_TOOLS_GENERATE_ADAPTOR_H
diff --git a/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.cpp b/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.cpp
new file mode 100644
index 0000000..bf1094a
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.cpp
@@ -0,0 +1,665 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <algorithm>
+
+#include "generator_utils.h"
+#include "generate_proxy.h"
+
+using namespace std;
+using namespace DBus;
+
+extern const char *tab;
+extern const char *header;
+extern const char *dbus_includes;
+
+/*! Generate proxy code for a XML introspection
+ */
+void generate_proxy(Xml::Document &doc, const char *filename)
+{
+ ostringstream body;
+ ostringstream head;
+ vector <string> include_vector;
+
+ head << header;
+ string filestring = filename;
+ underscorize(filestring);
+
+ string cond_comp = "__dbusxx__" + filestring + "__PROXY_MARSHAL_H";
+
+ head << "#ifndef " << cond_comp << endl
+ << "#define " << cond_comp << endl;
+
+ head << dbus_includes;
+
+ Xml::Node &root = *(doc.root);
+ Xml::Nodes interfaces = root["interface"];
+
+ // iterate over all interface definitions
+ for (Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
+ {
+ Xml::Node &iface = **i;
+ Xml::Nodes methods = iface["method"];
+ Xml::Nodes signals = iface["signal"];
+ Xml::Nodes properties = iface["property"];
+ Xml::Nodes ms;
+ ms.insert(ms.end(), methods.begin(), methods.end());
+ ms.insert(ms.end(), signals.begin(), signals.end());
+
+ // gets the name of a interface: <interface name="XYZ">
+ string ifacename = iface.get("name");
+
+ // these interface names are skipped.
+ if (ifacename == "org.freedesktop.DBus.Introspectable"
+ || ifacename == "org.freedesktop.DBus.Properties")
+ {
+ cerr << "skipping interface " << ifacename << endl;
+ continue;
+ }
+
+ istringstream ss(ifacename);
+ string nspace;
+ unsigned int nspaces = 0;
+
+ // prints all the namespaces defined with <interface name="X.Y.Z">
+ while (ss.str().find('.', ss.tellg()) != string::npos)
+ {
+ getline(ss, nspace, '.');
+
+ body << "namespace " << nspace << " {" << endl;
+
+ ++nspaces;
+ }
+ body << endl;
+
+ string ifaceclass;
+
+ getline(ss, ifaceclass);
+
+ // a "_proxy" is added to class name to distinguish between proxy and adaptor
+ ifaceclass += "_proxy";
+
+ cerr << "generating code for interface " << ifacename << "..." << endl;
+
+ // the code from class definiton up to opening of the constructor is generated...
+ body << "class " << ifaceclass << endl
+ << ": public ::DBus::InterfaceProxy" << endl
+ << "{" << endl
+ << "public:" << endl
+ << endl
+ << tab << ifaceclass << "()" << endl
+ << tab << ": ::DBus::InterfaceProxy(\"" << ifacename << "\")" << endl
+ << tab << "{" << endl;
+
+ // generates code to connect all the signal stubs; this is still inside the constructor
+ for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+ {
+ Xml::Node &signal = **si;
+
+ string marshname = "_" + signal.get("name") + "_stub";
+
+ body << tab << tab << "connect_signal("
+ << ifaceclass << ", " << signal.get("name") << ", " << stub_name(signal.get("name"))
+ << ");" << endl;
+ }
+
+ // the constructor ends here
+ body << tab << "}" << endl
+ << endl;
+
+ // write public block header for properties
+ body << "public:" << endl << endl
+ << tab << "/* properties exported by this interface */" << endl;
+
+ // this loop generates all properties
+ for (Xml::Nodes::iterator pi = properties.begin();
+ pi != properties.end(); ++pi)
+ {
+ Xml::Node &property = **pi;
+ string prop_name = property.get("name");
+ string property_access = property.get("access");
+ if (property_access == "read" || property_access == "readwrite")
+ {
+ body << tab << tab << "const " << signature_to_type(property.get("type"))
+ << " " << prop_name << "() {" << endl;
+ body << tab << tab << tab << "::DBus::CallMessage call ;\n ";
+ body << tab << tab << tab
+ << "call.member(\"Get\"); call.interface(\"org.freedesktop.DBus.Properties\");"
+ << endl;
+ body << tab << tab << tab
+ << "::DBus::MessageIter wi = call.writer(); " << endl;
+ body << tab << tab << tab
+ << "const std::string interface_name = \"" << ifacename << "\";"
+ << endl;
+ body << tab << tab << tab
+ << "const std::string property_name = \"" << prop_name << "\";"
+ << endl;
+ body << tab << tab << tab << "wi << interface_name;" << endl;
+ body << tab << tab << tab << "wi << property_name;" << endl;
+ body << tab << tab << tab
+ << "::DBus::Message ret = this->invoke_method (call);" << endl;
+ // TODO: support invoke_method_NoReply for properties
+ body << tab << tab << tab
+ << "::DBus::MessageIter ri = ret.reader ();" << endl;
+ body << tab << tab << tab << "::DBus::Variant argout; " << endl;
+ body << tab << tab << tab << "ri >> argout;" << endl;
+ body << tab << tab << tab << "return argout;" << endl;
+ body << tab << tab << "};" << endl;
+ }
+
+ if (property_access == "write" || property_access == "readwrite")
+ {
+ body << tab << tab << "void " << prop_name << "( const " << signature_to_type(property.get("type")) << " & input" << ") {" << endl;
+ body << tab << tab << tab << "::DBus::CallMessage call ;\n ";
+ body << tab << tab << tab << "call.member(\"Set\"); call.interface( \"org.freedesktop.DBus.Properties\");" << endl;
+ body << tab << tab << tab << "::DBus::MessageIter wi = call.writer(); " << endl;
+ body << tab << tab << tab << "::DBus::Variant value;" << endl;
+ body << tab << tab << tab << "::DBus::MessageIter vi = value.writer ();" << endl;
+ body << tab << tab << tab << "vi << input;" << endl;
+ body << tab << tab << tab << "const std::string interface_name = \"" << ifacename << "\";" << endl;
+ body << tab << tab << tab << "const std::string property_name = \"" << prop_name << "\";" << endl;
+ body << tab << tab << tab << "wi << interface_name;" << endl;
+ body << tab << tab << tab << "wi << property_name;" << endl;
+ body << tab << tab << tab << "wi << value;" << endl;
+ body << tab << tab << tab << "::DBus::Message ret = this->invoke_method (call);" << endl;
+ // TODO: support invoke_method_noreply for properties
+ body << tab << tab << "};" << endl;
+ }
+ }
+
+ // write public block header for methods
+ body << "public:" << endl
+ << endl
+ << tab << "/* methods exported by this interface," << endl
+ << tab << " * this functions will invoke the corresponding methods on the remote objects" << endl
+ << tab << " */" << endl;
+
+ // this loop generates all methods
+ for (Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
+ {
+ Xml::Node &method = **mi;
+ Xml::Nodes args = method["arg"];
+ Xml::Nodes args_in = args.select("direction", "in");
+ Xml::Nodes args_out = args.select("direction", "out");
+ Xml::Nodes annotations = args["annotation"];
+ Xml::Nodes method_annotations = method["annotation"];
+ Xml::Nodes annotations_noreply = method_annotations.select("name", "org.freedesktop.DBus.Method.NoReply");
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+ bool annotation_noreply_value = false;
+
+ // parse method level noreply annotations
+ if (!annotations_noreply.empty())
+ {
+ string annotation_noreply_value_str = annotations_noreply.front()->get("value");
+
+ if (annotation_noreply_value_str == "true")
+ {
+ annotation_noreply_value = true;
+ }
+ }
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (args_out.size() == 0 || args_out.size() > 1)
+ {
+ body << tab << "void ";
+ }
+ else if (args_out.size() == 1)
+ {
+ if (arg_object.length())
+ {
+ body << tab << arg_object << " ";
+ }
+ else
+ {
+ body << tab << signature_to_type(args_out.front()->get("type")) << " ";
+ }
+ }
+
+ body << method.get("name") << "(";
+
+ // generate all 'in' arguments for a method signature
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << "const " << signature_to_type(arg.get("type")) << "& ";
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << "const " << arg_object << "& ";
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ string arg_name = arg.get("name");
+ if (arg_name.length())
+ body << arg_name;
+ else
+ body << "argin" << i;
+
+ if ((i + 1 != args_in.size() || args_out.size() > 1))
+ body << ", ";
+ }
+
+ if (args_out.size() > 1)
+ {
+ // generate all 'out' arguments for a method signature
+ unsigned int j = 0;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++j)
+ {
+ Xml::Node &arg = **ao;
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << signature_to_type(arg.get("type")) << "&";
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << arg_object << "& ";
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ string arg_name = arg.get("name");
+ if (arg_name.length())
+ body << " " << arg_name;
+ else
+ body << " argout" << j;
+
+ if (j + 1 != args_out.size())
+ body << ", ";
+ }
+ }
+ body << ")" << endl;
+
+ body << tab << "{" << endl
+ << tab << tab << "::DBus::CallMessage call;" << endl;
+
+ if (!args_in.empty())
+ {
+ body << tab << tab << "::DBus::MessageIter wi = call.writer();" << endl
+ << endl;
+ }
+
+ // generate all 'in' arguments for a method body
+ i = 0;
+ for (Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ string arg_name = arg.get("name");
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (!arg_name.length())
+ {
+ arg_name = "argin";
+ arg_name += toString <uint> (i);
+ }
+
+ // generate extra code to wrap object
+ if (arg_object.length())
+ {
+ body << tab << tab << signature_to_type(arg.get("type")) << "_" << arg_name << ";" << endl;
+ body << tab << tab << "_" << arg_name << " << " << arg_name << ";" << endl;
+
+ arg_name = string("_") + arg_name;
+ }
+
+ body << tab << tab << "wi << " << arg_name << ";" << endl;
+ }
+
+ body << tab << tab << "call.member(\"" << method.get("name") << "\");" << endl;
+
+ // generate noreply/reply method calls
+ if (annotation_noreply_value)
+ {
+ if (args_out.size())
+ {
+ cerr << "Function: " << method.get("name") << ":" << endl;
+ cerr << "Option 'org.freedesktop.DBus.Method.NoReply' not allowed for methods with 'out' variables!" << endl << "-> Option ignored!" << endl;
+
+ body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
+ }
+ else
+ {
+ body << tab << tab << "assert (invoke_method_noreply (call));" << endl; // will only assert in case of no memory
+ }
+ }
+ else
+ {
+ body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
+ }
+
+ if (!args_out.empty())
+ {
+ body << tab << tab << "::DBus::MessageIter ri = ret.reader();" << endl
+ << endl;
+ }
+
+ // generate 'out' values as return if only one existing
+ if (args_out.size() == 1)
+ {
+ Xml::Nodes annotations = args_out["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << arg_object << " _argout;" << endl;
+ }
+
+ body << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout;" << endl;
+
+ body << tab << tab << "ri >> argout;" << endl;
+
+ if (arg_object.length())
+ {
+ body << tab << tab << "_argout << argout;" << endl;
+ body << tab << tab << "return _argout;" << endl;
+ }
+ else
+ {
+ body << tab << tab << "return argout;" << endl;
+ }
+ }
+ else if (args_out.size() > 1)
+ {
+ // generate multible 'out' value
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
+ {
+ Xml::Node &arg = **ao;
+ string arg_name = arg.get("name");
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (!arg_name.length())
+ {
+ arg_name = "argout" + toString <uint> (i);
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << signature_to_type(arg.get("type")) << "_" << arg_name << ";" << endl;
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << "ri >> " << "_" << arg_name << ";" << endl;
+ }
+ else
+ {
+ body << tab << tab << "ri >> " << arg_name << ";" << endl;
+ }
+
+ if (arg_object.length())
+ {
+ body << tab << tab << arg_name << " << " << "_" << arg_name << ";" << endl;
+ }
+ }
+ }
+
+ body << tab << "}" << endl
+ << endl;
+ }
+
+ // write public block header for signals
+ body << endl
+ << "public:" << endl
+ << endl
+ << tab << "/* signal handlers for this interface" << endl
+ << tab << " */" << endl;
+
+ // this loop generates all signals
+ for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+ {
+ Xml::Node &signal = **si;
+ Xml::Nodes args = signal["arg"];
+
+ body << tab << "virtual void " << signal.get("name") << "(";
+
+ // this loop generates all argument for a signal
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ string arg_name = arg.get("name");
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ // generate basic signature only if no object name available...
+ if (!arg_object.length())
+ {
+ body << "const " << signature_to_type(arg.get("type")) << "& ";
+ }
+ // ...or generate object style if available
+ else
+ {
+ body << "const " << arg_object << "& ";
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+
+ if (arg_name.length())
+ body << arg_name;
+ else
+ body << "argin" << i;
+
+ if ((ai + 1 != args.end()))
+ body << ", ";
+ }
+ body << ") = 0;" << endl;
+ }
+
+ // write private block header for unmarshalers
+ body << endl
+ << "private:" << endl
+ << endl
+ << tab << "/* unmarshalers (to unpack the DBus message before calling the actual signal handler)" << endl
+ << tab << " */" << endl;
+
+ // generate all the unmarshalers
+ for (Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
+ {
+ Xml::Node &signal = **si;
+ Xml::Nodes args = signal["arg"];
+
+ body << tab << "void " << stub_name(signal.get("name")) << "(const ::DBus::SignalMessage &sig)" << endl
+ << tab << "{" << endl;
+
+ if (!args.empty())
+ {
+ body << tab << tab << "::DBus::MessageIter ri = sig.reader();" << endl
+ << endl;
+ }
+
+ unsigned int i = 0;
+ for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i)
+ {
+ Xml::Node &arg = **ai;
+ string arg_name = arg.get("name");
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ body << tab << tab << signature_to_type(arg.get("type")) << " " ;
+
+ // use a default if no arg name given
+ if (!arg_name.length())
+ {
+ arg_name = "arg" + toString <uint> (i);
+ }
+
+ body << arg_name << ";" << endl;
+ body << tab << tab << "ri >> " << arg_name << ";" << endl;
+
+ // if a object type is used create a local variable and insert values with '<<' operation
+ if (arg_object.length())
+ {
+ body << tab << tab << arg_object << " _" << arg_name << ";" << endl;
+ body << tab << tab << "_" << arg_name << " << " << arg_name << ";" << endl;
+
+ // store a object name to later generate header includes
+ include_vector.push_back(arg_object);
+ }
+ }
+
+ body << tab << tab << signal.get("name") << "(";
+
+ // generate all arguments for the call to the virtual function
+ unsigned int j = 0;
+ for (Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++j)
+ {
+ Xml::Node &arg = **ai;
+ string arg_name = arg.get("name");
+ Xml::Nodes annotations = arg["annotation"];
+ Xml::Nodes annotations_object = annotations.select("name", "org.freedesktop.DBus.Object");
+ string arg_object;
+
+ if (!annotations_object.empty())
+ {
+ arg_object = annotations_object.front()->get("value");
+ }
+
+ if (!arg_name.length())
+ {
+ arg_name = "arg" + toString <uint> (j);
+ }
+
+ if (arg_object.length())
+ {
+ body << "_" << arg_name;
+ }
+ else
+ {
+ body << arg_name;
+ }
+
+ if (ai + 1 != args.end())
+ body << ", ";
+ }
+
+ body << ");" << endl;
+
+ body << tab << "}" << endl;
+ }
+
+ body << "};" << endl
+ << endl;
+
+ for (unsigned int i = 0; i < nspaces; ++i)
+ {
+ body << "} ";
+ }
+ body << endl;
+ }
+
+ body << "#endif //" << cond_comp << endl;
+
+ // remove all duplicates in the header include vector
+ vector<string>::const_iterator vec_end_it = unique(include_vector.begin(), include_vector.end());
+
+ for (vector<string>::const_iterator vec_it = include_vector.begin();
+ vec_it != vec_end_it;
+ ++vec_it)
+ {
+ const string &include = *vec_it;
+
+ head << "#include " << "\"" << include << ".h" << "\"" << endl;
+ }
+ head << endl;
+
+ ofstream file(filename);
+ if (file.bad())
+ {
+ cerr << "unable to write file " << filename << endl;
+ exit(-1);
+ }
+
+ file << head.str();
+ file << body.str();
+
+ file.close();
+}
diff --git a/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.h b/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.h
new file mode 100644
index 0000000..0224f4d
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generate_proxy.h
@@ -0,0 +1,31 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATE_PROXY_H
+#define __DBUSXX_TOOLS_GENERATE_PROXY_H
+
+#include "xml.h"
+
+void generate_proxy(DBus::Xml::Document &doc, const char *filename);
+
+#endif//__DBUSXX_TOOLS_GENERATE_PROXY_H
diff --git a/jni/libdbus-c++-0.9.0-android/tools/generator_utils.cpp b/jni/libdbus-c++-0.9.0-android/tools/generator_utils.cpp
new file mode 100644
index 0000000..5686f6b
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generator_utils.cpp
@@ -0,0 +1,173 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <iostream>
+#include <cstdlib>
+
+#include "generator_utils.h"
+
+using namespace std;
+
+const char *tab = " ";
+
+const char *header = "\n/*\n * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n */\n\n";
+
+const char *dbus_includes = "\n#include <dbus-c++/dbus.h>\n#include <cassert>\n";
+
+void underscorize(string &str)
+{
+ for (unsigned int i = 0; i < str.length(); ++i)
+ {
+ if (!isalpha(str[i]) && !isdigit(str[i])) str[i] = '_';
+ }
+}
+
+string stub_name(string name)
+{
+ underscorize(name);
+
+ return "_" + name + "_stub";
+}
+
+const char *atomic_type_to_string(char t)
+{
+ static struct
+ {
+ char type;
+ const char *name;
+ } atos[] =
+ {
+ { 'y', "uint8_t" },
+ { 'b', "bool" },
+ { 'n', "int16_t" },
+ { 'q', "uint16_t" },
+ { 'i', "int32_t" },
+ { 'u', "uint32_t" },
+ { 'x', "int64_t" },
+ { 't', "uint64_t" },
+ { 'd', "double" },
+ { 's', "std::string" },
+ { 'o', "::DBus::Path" },
+ { 'g', "::DBus::Signature" },
+ { 'v', "::DBus::Variant" },
+ { '\0', "" }
+ };
+ int i;
+
+ for (i = 0; atos[i].type; ++i)
+ {
+ if (atos[i].type == t) break;
+ }
+ return atos[i].name;
+}
+
+static void _parse_signature(const string &signature, string &type, unsigned int &i, bool only_once = false)
+{
+ /*cout << "signature: " << signature << endl;
+ cout << "type: " << type << endl;
+ cout << "i: " << i << ", signature[i]: " << signature[i] << endl;*/
+
+ for (; i < signature.length(); ++i)
+ {
+ switch (signature[i])
+ {
+ case 'a':
+ {
+ switch (signature[++i])
+ {
+ case '{':
+ {
+ type += "std::map< ";
+ ++i;
+ _parse_signature(signature, type, i);
+ type += " >";
+
+ break;
+ }
+ case '(':
+ {
+ type += "std::vector< ::DBus::Struct< ";
+ ++i;
+ _parse_signature(signature, type, i);
+ type += " > >";
+
+ break;
+ }
+ default:
+ {
+ type += "std::vector< ";
+ _parse_signature(signature, type, i, true);
+
+ type += " >";
+
+ break;
+ }
+ }
+ break;
+ }
+ case '(':
+ {
+ type += "::DBus::Struct< ";
+ ++i;
+
+ _parse_signature(signature, type, i);
+
+ type += " >";
+ break;
+ }
+ case ')':
+ case '}':
+ {
+ return;
+ }
+ default:
+ {
+ const char *atom = atomic_type_to_string(signature[i]);
+ if (!atom)
+ {
+ cerr << "invalid signature" << endl;
+ exit(-1);
+ }
+ type += atom;
+
+ break;
+ }
+ }
+
+ if (only_once)
+ return;
+
+ if (i + 1 < signature.length() && signature[i + 1] != ')' && signature[i + 1] != '}')
+ {
+ type += ", ";
+ }
+ }
+}
+
+string signature_to_type(const string &signature)
+{
+ string type;
+ unsigned int i = 0;
+ _parse_signature(signature, type, i);
+ return type;
+}
diff --git a/jni/libdbus-c++-0.9.0-android/tools/generator_utils.h b/jni/libdbus-c++-0.9.0-android/tools/generator_utils.h
new file mode 100644
index 0000000..276d228
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/generator_utils.h
@@ -0,0 +1,45 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __DBUSXX_TOOLS_GENERATOR_UTILS_H
+#define __DBUSXX_TOOLS_GENERATOR_UTILS_H
+
+#include <string>
+#include <sstream>
+#include <iomanip>
+
+const char *atomic_type_to_string(char t);
+std::string stub_name(std::string name);
+std::string signature_to_type(const std::string &signature);
+void underscorize(std::string &str);
+
+/// create std::string from any number
+template <typename T>
+std::string toString(const T &thing, int w = 0, int p = 0)
+{
+ std::ostringstream os;
+ os << std::setw(w) << std::setprecision(p) << thing;
+ return os.str();
+}
+
+#endif//__DBUSXX_TOOLS_GENERATOR_UTILS_H
diff --git a/jni/libdbus-c++-0.9.0-android/tools/introspect.cpp b/jni/libdbus-c++-0.9.0-android/tools/introspect.cpp
new file mode 100644
index 0000000..a994ae1
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/introspect.cpp
@@ -0,0 +1,79 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <cstring>
+#include <signal.h>
+#include <unistd.h>
+#include <iostream>
+#include "introspect.h"
+
+DBus::BusDispatcher dispatcher;
+static bool systembus;
+static char *path;
+static char *service;
+
+void niam(int sig)
+{
+ DBus::Connection conn = systembus ? DBus::Connection::SystemBus() : DBus::Connection::SessionBus();
+
+ IntrospectedObject io(conn, path, service);
+
+ std::cout << io.Introspect();
+
+ dispatcher.leave();
+}
+
+int main(int argc, char **argv)
+{
+ signal(SIGTERM, niam);
+ signal(SIGINT, niam);
+ signal(SIGALRM, niam);
+
+ if (argc == 1)
+ {
+ std::cerr << std::endl << "Usage: " << argv[0] << " [--system] <object_path> [<destination>]" << std::endl << std::endl;
+ }
+ else
+ {
+ if (strcmp(argv[1], "--system"))
+ {
+ systembus = false;
+ path = argv[1];
+ service = argc > 2 ? argv[2] : 0;
+ }
+ else
+ {
+ systembus = true;
+ path = argv[2];
+ service = argc > 3 ? argv[3] : 0;
+ }
+
+ DBus::default_dispatcher = &dispatcher;
+
+ alarm(1);
+
+ dispatcher.enter();
+ }
+
+ return 0;
+}
diff --git a/jni/libdbus-c++-0.9.0-android/tools/introspect.h b/jni/libdbus-c++-0.9.0-android/tools/introspect.h
new file mode 100644
index 0000000..ee7b1c5
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/introspect.h
@@ -0,0 +1,44 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#ifndef __DBUSXX_TOOLS_INTROSPECT_H
+#define __DBUSXX_TOOLS_INTROSPECT_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <dbus-c++/dbus.h>
+#include <string>
+
+class IntrospectedObject : public DBus::IntrospectableProxy, public DBus::ObjectProxy
+{
+public:
+
+ IntrospectedObject(DBus::Connection &conn, const char *path, const char *service)
+ : DBus::ObjectProxy(conn, path, service)
+ {}
+};
+
+#endif//__DBUSXX_TOOLS_INTROSPECT_H
diff --git a/jni/libdbus-c++-0.9.0-android/tools/xml.cpp b/jni/libdbus-c++-0.9.0-android/tools/xml.cpp
new file mode 100644
index 0000000..d3cc3ab
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/xml.cpp
@@ -0,0 +1,313 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#include "xml.h"
+
+#include <expat.h>
+
+std::istream &operator >> (std::istream &in, DBus::Xml::Document &doc)
+{
+ std::stringbuf xmlbuf;
+ in.get(xmlbuf, '\0');
+ doc.from_xml(xmlbuf.str());
+
+ return in;
+}
+
+std::ostream &operator << (std::ostream &out, const DBus::Xml::Document &doc)
+{
+ return out << doc.to_xml();
+}
+
+using namespace DBus;
+using namespace DBus::Xml;
+
+Error::Error(const char *error, int line, int column)
+{
+ std::ostringstream estream;
+
+ estream << "line " << line << ", column " << column << ": " << error;
+
+ _error = estream.str();
+}
+
+Node::Node(const char *n, const char **a)
+ : name(n)
+{
+ if (a)
+ for (int i = 0; a[i]; i += 2)
+ {
+ _attrs[a[i]] = a[i + 1];
+
+ //debug_log("xml:\t%s = %s", a[i], a[i+1]);
+ }
+}
+
+Nodes Nodes::operator[](const std::string &key)
+{
+ Nodes result;
+
+ for (iterator i = begin(); i != end(); ++i)
+ {
+ Nodes part = (**i)[key];
+
+ result.insert(result.end(), part.begin(), part.end());
+ }
+ return result;
+}
+
+Nodes Nodes::select(const std::string &attr, const std::string &value)
+{
+ Nodes result;
+
+ for (iterator i = begin(); i != end(); ++i)
+ {
+ if ((*i)->get(attr) == value)
+ result.insert(result.end(), *i);
+ }
+ return result;
+}
+
+Nodes Node::operator[](const std::string &key)
+{
+ Nodes result;
+
+ if (key.length() == 0) return result;
+
+ for (Children::iterator i = children.begin(); i != children.end(); ++i)
+ {
+ if (i->name == key)
+ result.push_back(&(*i));
+ }
+ return result;
+}
+
+std::string Node::get(const std::string &attribute)
+{
+ if (_attrs.find(attribute) != _attrs.end())
+ return _attrs[attribute];
+ else
+ return "";
+}
+
+void Node::set(const std::string &attribute, std::string value)
+{
+ if (value.length())
+ _attrs[attribute] = value;
+ else
+ _attrs.erase(value);
+}
+
+std::string Node::to_xml() const
+{
+ std::string xml;
+ int depth = 0;
+
+ _raw_xml(xml, depth);
+
+ return xml;
+}
+
+void Node::_raw_xml(std::string &xml, int &depth) const
+{
+ xml.append(depth * 2, ' ');
+ xml.append("<" + name);
+
+ for (Attributes::const_iterator i = _attrs.begin(); i != _attrs.end(); ++i)
+ {
+ xml.append(" " + i->first + "=\"" + i->second + "\"");
+ }
+
+ if (cdata.length() == 0 && children.size() == 0)
+ {
+ xml.append("/>\n");
+ }
+ else
+ {
+ xml.append(">");
+
+ if (cdata.length())
+ {
+ xml.append(cdata);
+ }
+
+ if (children.size())
+ {
+ xml.append("\n");
+ depth++;
+
+ for (Children::const_iterator i = children.begin(); i != children.end(); ++i)
+ {
+ i->_raw_xml(xml, depth);
+ }
+
+ depth--;
+ xml.append(depth * 2, ' ');
+ }
+ xml.append("</" + name + ">\n");
+ }
+}
+
+Document::Document()
+ : root(0), _depth(0)
+{
+}
+
+Document::Document(const std::string &xml)
+ : root(0), _depth(0)
+{
+ from_xml(xml);
+}
+
+Document::~Document()
+{
+ delete root;
+}
+
+struct Document::Expat
+{
+ static void start_doctype_decl_handler(
+ void *data, const XML_Char *name, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset
+ );
+ static void end_doctype_decl_handler(void *data);
+ static void start_element_handler(void *data, const XML_Char *name, const XML_Char **atts);
+ static void character_data_handler(void *data, const XML_Char *chars, int len);
+ static void end_element_handler(void *data, const XML_Char *name);
+};
+
+void Document::from_xml(const std::string &xml)
+{
+ _depth = 0;
+ delete root;
+ root = 0;
+
+ XML_Parser parser = XML_ParserCreate("UTF-8");
+
+ XML_SetUserData(parser, this);
+
+ XML_SetDoctypeDeclHandler(
+ parser,
+ Document::Expat::start_doctype_decl_handler,
+ Document::Expat::end_doctype_decl_handler
+ );
+
+ XML_SetElementHandler(
+ parser,
+ Document::Expat::start_element_handler,
+ Document::Expat::end_element_handler
+ );
+
+ XML_SetCharacterDataHandler(
+ parser,
+ Document::Expat::character_data_handler
+ );
+
+ XML_Status status = XML_Parse(parser, xml.c_str(), xml.length(), true);
+
+ if (status == XML_STATUS_ERROR)
+ {
+ const char *error = XML_ErrorString(XML_GetErrorCode(parser));
+ int line = XML_GetCurrentLineNumber(parser);
+ int column = XML_GetCurrentColumnNumber(parser);
+
+ XML_ParserFree(parser);
+
+ throw Error(error, line, column);
+ }
+ else
+ {
+ XML_ParserFree(parser);
+ }
+}
+
+std::string Document::to_xml() const
+{
+ return root->to_xml();
+}
+
+void Document::Expat::start_doctype_decl_handler(
+ void *data, const XML_Char *name, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset
+)
+{
+}
+
+void Document::Expat::end_doctype_decl_handler(void *data)
+{
+}
+
+void Document::Expat::start_element_handler(void *data, const XML_Char *name, const XML_Char **atts)
+{
+ Document *doc = (Document *)data;
+
+ //debug_log("xml:%d -> %s", doc->_depth, name);
+
+ if (!doc->root)
+ {
+ doc->root = new Node(name, atts);
+ }
+ else
+ {
+ Node::Children *cld = &(doc->root->children);
+
+ for (int i = 1; i < doc->_depth; ++i)
+ {
+ cld = &(cld->back().children);
+ }
+ cld->push_back(Node(name, atts));
+
+ //std::cerr << doc->to_xml() << std::endl;
+ }
+ doc->_depth++;
+}
+
+void Document::Expat::character_data_handler(void *data, const XML_Char *chars, int len)
+{
+ Document *doc = (Document *)data;
+
+ Node *nod = doc->root;
+
+ for (int i = 1; i < doc->_depth; ++i)
+ {
+ nod = &(nod->children.back());
+ }
+ int x, y;
+
+ x = 0;
+ y = len - 1;
+
+ while (isspace(chars[y]) && y > 0) --y;
+ while (isspace(chars[x]) && x < y) ++x;
+
+ nod->cdata = std::string(chars, x, y + 1);
+}
+
+void Document::Expat::end_element_handler(void *data, const XML_Char *name)
+{
+ Document *doc = (Document *)data;
+
+ //debug_log("xml:%d <- %s", doc->_depth, name);
+
+ doc->_depth--;
+}
+
diff --git a/jni/libdbus-c++-0.9.0-android/tools/xml.h b/jni/libdbus-c++-0.9.0-android/tools/xml.h
new file mode 100644
index 0000000..736a0dd
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/xml.h
@@ -0,0 +1,144 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#ifndef __DBUSXX_XML_H
+#define __DBUSXX_XML_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <exception>
+#include <string>
+#include <vector>
+#include <map>
+#include <iostream>
+#include <sstream>
+
+namespace DBus
+{
+
+namespace Xml
+{
+
+class Error : public std::exception
+{
+public:
+
+ Error(const char *error, int line, int column);
+
+ ~Error() throw()
+ {}
+
+ const char *what() const throw()
+ {
+ return _error.c_str();
+ }
+
+private:
+
+ std::string _error;
+};
+
+class Node;
+
+class Nodes : public std::vector<Node *>
+{
+public:
+
+ Nodes operator[](const std::string &key);
+
+ Nodes select(const std::string &attr, const std::string &value);
+};
+
+class Node
+{
+public:
+
+ typedef std::map<std::string, std::string> Attributes;
+
+ typedef std::vector<Node> Children;
+
+ std::string name;
+ std::string cdata;
+ Children children;
+
+ Node(std::string &n, Attributes &a)
+ : name(n), _attrs(a)
+ {}
+
+ Node(const char *n, const char **a = NULL);
+
+ Nodes operator[](const std::string &key);
+
+ std::string get(const std::string &attribute);
+
+ void set(const std::string &attribute, std::string value);
+
+ std::string to_xml() const;
+
+ Node &add(Node child)
+ {
+ children.push_back(child);
+ return children.back();
+ }
+
+private:
+
+ void _raw_xml(std::string &xml, int &depth) const;
+
+ Attributes _attrs;
+};
+
+class Document
+{
+public:
+
+ struct Expat;
+
+ Node *root;
+
+ Document();
+
+ Document(const std::string &xml);
+
+ ~Document();
+
+ void from_xml(const std::string &xml);
+
+ std::string to_xml() const;
+
+private:
+
+ int _depth;
+};
+
+} /* namespace Xml */
+
+} /* namespace DBus */
+
+std::istream &operator >> (std::istream &, DBus::Xml::Document &);
+std::ostream &operator << (std::ostream &, DBus::Xml::Document &);
+
+#endif//__DBUSXX_XML_H
diff --git a/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.cpp b/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.cpp
new file mode 100644
index 0000000..ff031f8
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.cpp
@@ -0,0 +1,127 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <cstdlib>
+#include <cstring>
+#include <string>
+#include <map>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+#include "xml2cpp.h"
+#include "generate_adaptor.h"
+#include "generate_proxy.h"
+
+using namespace std;
+using namespace DBus;
+
+//typedef map<string,string> TypeCache;
+
+void usage(const char *argv0)
+{
+ cerr << endl << "Usage: " << argv0 << " <xmlfile> [ --proxy=<outfile.h> ] [ --adaptor=<outfile.h> ]"
+ << endl << endl;
+ exit(-1);
+}
+
+/*int char_to_atomic_type(char t)
+{
+ if (strchr("ybnqiuxtdsgavre", t))
+ return t;
+
+ return DBUS_TYPE_INVALID;
+}*/
+
+
+
+/*bool is_atomic_type(const string &type)
+{
+ return type.length() == 1 && char_to_atomic_type(type[0]) != DBUS_TYPE_INVALID;
+}*/
+
+
+int main(int argc, char **argv)
+{
+ if (argc < 2)
+ {
+ usage(argv[0]);
+ }
+
+ bool proxy_mode, adaptor_mode;
+ char *proxy, *adaptor;
+
+ proxy_mode = false;
+ proxy = 0;
+
+ adaptor_mode = false;
+ adaptor = 0;
+
+ for (int a = 1; a < argc; ++a)
+ {
+ if (!strncmp(argv[a], "--proxy=", 8))
+ {
+ proxy_mode = true;
+ proxy = argv[a] + 8;
+ }
+ else if (!strncmp(argv[a], "--adaptor=", 10))
+ {
+ adaptor_mode = true;
+ adaptor = argv[a] + 10;
+ }
+ }
+
+ if (!proxy_mode && !adaptor_mode) usage(argv[0]);
+
+ ifstream xmlfile(argv[1]);
+
+ if (xmlfile.bad())
+ {
+ cerr << "unable to open file " << argv[1] << endl;
+ return -1;
+ }
+
+ Xml::Document doc;
+
+ try
+ {
+ xmlfile >> doc;
+ //cout << doc.to_xml();
+ }
+ catch (Xml::Error &e)
+ {
+ cerr << "error parsing " << argv[1] << ": " << e.what() << endl;
+ return -1;
+ }
+
+ if (!doc.root)
+ {
+ cerr << "empty document" << endl;
+ return -1;
+ }
+
+ if (proxy_mode) generate_proxy(doc, proxy);
+ if (adaptor_mode) generate_adaptor(doc, adaptor);
+
+ return 0;
+}
diff --git a/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.h b/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.h
new file mode 100644
index 0000000..4b0cd12
--- /dev/null
+++ b/jni/libdbus-c++-0.9.0-android/tools/xml2cpp.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * D-Bus++ - C++ bindings for D-Bus
+ *
+ * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#ifndef __DBUSXX_TOOLS_XML2CPP_H
+#define __DBUSXX_TOOLS_XML2CPP_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xml.h"
+
+#endif//__DBUSXX_TOOLS_XML2CPP_H