* Fixed implementation of D-Bus properties

* Added an example to demonstrate implementation of D-Bus properties
* Fixed DBus::Server (should work with the tcp transport too, see related TODO item)


git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@8158 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
pdurante 2006-10-24 11:12:29 +00:00
parent 19712668b1
commit 1b84dc5abc
30 changed files with 750 additions and 121 deletions

2
TODO
View file

@ -1,4 +1,4 @@
* Fix dbusxx-xml2cpp to generate client-side proxies * Fix dbusxx-xml2cpp to generate client-side proxies
* Implement continuations in a saner way * Implement continuations in a saner way
* Find time for some hardcore valgrinding * Find time for some hardcore valgrinding
* Correctly parse variants containing compound types * Make DBus::Server free an incoming connection when it's disconnected, not when freeing the server

View file

@ -19132,7 +19132,7 @@ echo "${ECHO_T}yes" >&6
# Save processed files # Save processed files
ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile dbus-c++-0.3.pc" ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile examples/properties/Makefile dbus-c++-0.3.pc"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure
@ -19703,6 +19703,7 @@ do
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; "doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;;
"doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;; "doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;;
"examples/properties/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/properties/Makefile" ;;
"dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;; "dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;; "include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;;

View file

@ -19120,7 +19120,7 @@ echo "${ECHO_T}yes" >&6
# Save processed files # Save processed files
ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile dbus-c++-0.3.pc" ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile examples/properties/Makefile dbus-c++-0.3.pc"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure
@ -19691,6 +19691,7 @@ do
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; "doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;;
"doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;; "doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;;
"examples/properties/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/properties/Makefile" ;;
"dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;; "dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;; "include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;;

View file

@ -35,22 +35,22 @@
{ {
'AM_ENABLE_STATIC' => 1, 'AM_ENABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1, 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1, 'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_TYPE_OFF_T' => 1,
'_LT_AC_SHELL_INIT' => 1, '_LT_AC_SHELL_INIT' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1, 'AC_REPLACE_FNMATCH' => 1,
'AC_DEFUN' => 1, 'AC_DEFUN' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AC_PROG_LIBTOOL' => 1, 'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1, '_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_PROG_MKDIR_P' => 1, 'AM_PROG_MKDIR_P' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1, 'AC_FUNC_WAIT3' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AM_AUTOMAKE_VERSION' => 1, 'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_STRTOD' => 1, 'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AC_CHECK_HEADERS' => 1, 'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AM_MISSING_PROG' => 1, 'AM_MISSING_PROG' => 1,
'AC_FUNC_STRNLEN' => 1, 'AC_FUNC_STRNLEN' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
@ -65,28 +65,28 @@
'AM_SANITY_CHECK' => 1, 'AM_SANITY_CHECK' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'_AM_PROG_TAR' => 1, '_AM_PROG_TAR' => 1,
'AC_LIBTOOL_GCJ' => 1, 'AC_LIBTOOL_GCJ' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1, 'AC_LIBSOURCE' => 1,
'AC_STRUCT_ST_BLOCKS' => 1, 'AC_STRUCT_ST_BLOCKS' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'_LT_AC_LANG_F77' => 1, '_LT_AC_LANG_F77' => 1,
'AC_CONFIG_AUX_DIR' => 1, 'AC_LIBTOOL_CONFIG' => 1,
'AC_PROG_MAKE_SET' => 1, 'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1, 'sinclude' => 1,
'AM_DISABLE_SHARED' => 1, 'AM_DISABLE_SHARED' => 1,
'_LT_AC_LANG_CXX' => 1,
'AM_PROG_LIBTOOL' => 1, 'AM_PROG_LIBTOOL' => 1,
'AM_PROG_LD' => 1, '_LT_AC_LANG_CXX' => 1,
'_LT_AC_FILE_LTDLL_C' => 1, '_LT_AC_FILE_LTDLL_C' => 1,
'AM_PROG_LD' => 1,
'AC_FUNC_STRERROR_R' => 1, 'AC_FUNC_STRERROR_R' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1, 'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_FORK' => 1,
'AU_DEFUN' => 1, 'AU_DEFUN' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PROG_NM' => 1, 'AC_PROG_NM' => 1,
'AC_LIBTOOL_DLOPEN' => 1, 'AC_LIBTOOL_DLOPEN' => 1,
'AC_PROG_LD' => 1, 'AC_PROG_LD' => 1,
@ -99,9 +99,9 @@
'_AM_SET_OPTION' => 1, '_AM_SET_OPTION' => 1,
'AC_CANONICAL_HOST' => 1, 'AC_CANONICAL_HOST' => 1,
'_LT_LINKER_BOILERPLATE' => 1, '_LT_LINKER_BOILERPLATE' => 1,
'AC_PROG_RANLIB' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'AC_PROG_RANLIB' => 1,
'AC_FUNC_SETPGRP' => 1, 'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1, 'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1, 'AC_FUNC_MMAP' => 1,
@ -113,43 +113,43 @@
'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1,
'_LT_AC_LANG_GCJ' => 1, '_LT_AC_LANG_GCJ' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1, 'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1, 'AC_C_INLINE' => 1,
'AC_LIBTOOL_RC' => 1, 'AC_LIBTOOL_RC' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1, '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'AC_CONFIG_FILES' => 1, 'AC_CONFIG_FILES' => 1,
'include' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'include' => 1,
'LT_AC_PROG_SED' => 1, 'LT_AC_PROG_SED' => 1,
'AM_ENABLE_SHARED' => 1, 'AM_ENABLE_SHARED' => 1,
'AM_GNU_GETTEXT' => 1, 'AM_GNU_GETTEXT' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1, '_LT_AC_LANG_GCJ_CONFIG' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_LIB' => 1,
'AC_ENABLE_SHARED' => 1, 'AC_ENABLE_SHARED' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1, 'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1, 'AC_FUNC_GETLOADAVG' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_ENABLE_STATIC' => 1, 'AC_ENABLE_STATIC' => 1,
'AM_PROG_CC_C_O' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_FUNC_FSEEKO' => 1,
'_LT_AC_TAGVAR' => 1, '_LT_AC_TAGVAR' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AC_FUNC_MKTIME' => 1,
'AM_CONDITIONAL' => 1, 'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_HEADER_SYS_WAIT' => 1, 'AC_HEADER_SYS_WAIT' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1, 'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1, 'AC_PROG_LN_S' => 1,
'AM_PROG_INSTALL_SH' => 1, 'AM_PROG_INSTALL_SH' => 1,
'AC_HEADER_DIRENT' => 1, 'm4_include' => 1,
'AC_PROG_EGREP' => 1, 'AC_PROG_EGREP' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AC_HEADER_DIRENT' => 1,
'AC_PATH_MAGIC' => 1, 'AC_PATH_MAGIC' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AM_MAKE_INCLUDE' => 1, 'AM_MAKE_INCLUDE' => 1,
'_LT_AC_TAGCONFIG' => 1, '_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1, 'm4_pattern_forbid' => 1,
@ -161,48 +161,48 @@
'AC_LIBTOOL_WIN32_DLL' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1, 'AC_PROG_LD_RELOAD_FLAG' => 1,
'AC_HEADER_TIME' => 1, 'AC_HEADER_TIME' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AM_MISSING_HAS_RUN' => 1, 'AM_MISSING_HAS_RUN' => 1,
'm4_sinclude' => 1, 'AC_FUNC_GETMNTENT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1, 'AC_LIBTOOL_DLOPEN_SELF' => 1,
'm4_sinclude' => 1,
'AC_PATH_X' => 1, 'AC_PATH_X' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'_PKG_SHORT_ERRORS_SUPPORTED' => 1, '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
'AC_HEADER_STDC' => 1, 'AC_HEADER_STDC' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1, 'AC_LIBTOOL_LINKER_OPTION' => 1,
'PKG_CHECK_EXISTS' => 1, 'PKG_CHECK_EXISTS' => 1,
'LT_AC_PROG_RC' => 1,
'AC_LIBTOOL_CXX' => 1, 'AC_LIBTOOL_CXX' => 1,
'LT_AC_PROG_RC' => 1,
'LT_AC_PROG_GCJ' => 1, 'LT_AC_PROG_GCJ' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1,
'AM_DEP_TRACK' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
'AM_DISABLE_STATIC' => 1, 'AM_DISABLE_STATIC' => 1,
'AC_FUNC_MBRTOWC' => 1, '_LT_AC_PROG_CXXCPP' => 1,
'_AC_PROG_LIBTOOL' => 1, 'AM_DEP_TRACK' => 1,
'AM_CONFIG_HEADER' => 1, 'AM_CONFIG_HEADER' => 1,
'_AC_PROG_LIBTOOL' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_SIGNAL' => 1,
'AC_TYPE_UID_T' => 1,
'_AM_IF_OPTION' => 1, '_AM_IF_OPTION' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PATH_TOOL_PREFIX' => 1, 'AC_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_F77' => 1,
'm4_pattern_allow' => 1, 'm4_pattern_allow' => 1,
'AC_LIBTOOL_F77' => 1,
'AM_SET_LEADING_DOT' => 1, 'AM_SET_LEADING_DOT' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1,
'_AM_DEPENDENCIES' => 1, '_AM_DEPENDENCIES' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'AC_PROG_CC' => 1,
'_LT_AC_SYS_COMPILER' => 1, '_LT_AC_SYS_COMPILER' => 1,
'AC_PROG_CC' => 1,
'AM_PROG_NM' => 1, 'AM_PROG_NM' => 1,
'PKG_CHECK_MODULES' => 1, 'PKG_CHECK_MODULES' => 1,
'AC_FUNC_STRCOLL' => 1, 'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1, 'AC_PROG_YACC' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1, 'AC_LIBLTDL_CONVENIENCE' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1, 'AC_DEPLIBS_CHECK_METHOD' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'AC_FUNC_CHOWN' => 1, 'AC_FUNC_CHOWN' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'AC_FUNC_GETPGRP' => 1, 'AC_FUNC_GETPGRP' => 1,
'AM_INIT_AUTOMAKE' => 1, 'AM_INIT_AUTOMAKE' => 1,
@ -213,29 +213,29 @@
'_LT_AC_LOCK' => 1, '_LT_AC_LOCK' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1, '_LT_AC_LANG_RC_CONFIG' => 1,
'AC_PROG_CPP' => 1, 'AC_PROG_CPP' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_LEX' => 1,
'AC_C_CONST' => 1, 'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_TYPE_PID_T' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1, 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_AUX_DIR_EXPAND' => 1, 'AM_AUX_DIR_EXPAND' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, 'AC_PROG_INSTALL' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1, '_LT_AC_LANG_F77_CONFIG' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'_AM_SET_OPTIONS' => 1, '_AM_SET_OPTIONS' => 1,
'AM_RUN_LOG' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_RUN_LOG' => 1,
'AC_LIBTOOL_PICMODE' => 1, 'AC_LIBTOOL_PICMODE' => 1,
'AH_OUTPUT' => 1, 'AH_OUTPUT' => 1,
'AC_CHECK_LIBM' => 1, 'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1, 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'_AM_MANGLE_OPTION' => 1, '_AM_MANGLE_OPTION' => 1,
'AC_CANONICAL_SYSTEM' => 1, 'AC_CANONICAL_SYSTEM' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'AC_CONFIG_HEADERS' => 1,
'AM_SET_DEPDIR' => 1, 'AM_SET_DEPDIR' => 1,
'_LT_CC_BASENAME' => 1,
'PKG_PROG_PKG_CONFIG' => 1, 'PKG_PROG_PKG_CONFIG' => 1,
'_LT_CC_BASENAME' => 1,
'AC_CHECK_FUNCS' => 1 'AC_CHECK_FUNCS' => 1
} }
], 'Autom4te::Request' ), ], 'Autom4te::Request' ),
@ -255,21 +255,21 @@
'm4_pattern_forbid' => 1, 'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1, 'AC_CANONICAL_TARGET' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1, 'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1, 'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1, 'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1, 'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_HEADER_TIME' => 1, 'AC_HEADER_TIME' => 1,
'AC_FUNC_LSTAT' => 1, 'AC_FUNC_WAIT3' => 1,
'AC_STRUCT_TM' => 1,
'AM_AUTOMAKE_VERSION' => 1, 'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_GETMNTENT' => 1, 'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_TYPE_MODE_T' => 1, 'AC_TYPE_MODE_T' => 1,
'AC_FUNC_STRTOD' => 1, 'AC_FUNC_GETMNTENT' => 1,
'AC_CHECK_HEADERS' => 1, 'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_FUNC_STRNLEN' => 1, 'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1, 'm4_sinclude' => 1,
'AC_PROG_CXX' => 1, 'AC_PROG_CXX' => 1,
@ -284,20 +284,20 @@
'AC_LIBSOURCE' => 1, 'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1, 'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1, 'AC_STRUCT_ST_BLOCKS' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_SIGNAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_TYPE_UID_T' => 1, 'AC_TYPE_UID_T' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_PROG_MAKE_SET' => 1, 'AC_PROG_MAKE_SET' => 1,
'm4_pattern_allow' => 1, 'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1, 'sinclude' => 1,
'm4_pattern_allow' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1, 'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1, 'AC_PROG_CC' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1, 'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_STRCOLL' => 1, 'AC_FUNC_FORK' => 1,
'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1, 'AC_PROG_YACC' => 1,
'AC_STRUCT_TIMEZONE' => 1, 'AC_STRUCT_TIMEZONE' => 1,
'AC_INIT' => 1, 'AC_INIT' => 1,
@ -320,34 +320,34 @@
'AM_MAINTAINER_MODE' => 1, 'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1, 'AC_FUNC_STRFTIME' => 1,
'AC_PROG_CPP' => 1, 'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1, 'AC_C_INLINE' => 1,
'AM_ENABLE_MULTILIB' => 1, 'AC_PROG_CPP' => 1,
'AC_PROG_LEX' => 1,
'AC_C_CONST' => 1,
'AC_TYPE_PID_T' => 1, 'AC_TYPE_PID_T' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_CONFIG_FILES' => 1, 'AC_CONFIG_FILES' => 1,
'include' => 1, 'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1, 'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1, 'AM_GNU_GETTEXT' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_LIB' => 1, 'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1, 'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1, 'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1, 'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1, 'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1, 'AM_PROG_CC_C_O' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1, 'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CONFIG_HEADERS' => 1, 'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1, 'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1, 'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1, 'm4_include' => 1,
'AC_HEADER_DIRENT' => 1, 'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1 'AC_CHECK_FUNCS' => 1

View file

@ -9320,18 +9320,19 @@ m4trace:configure.ac:68: -1- AC_SUBST([DOXYGEN], [$ac_cv_path_DOXYGEN])
m4trace:configure.ac:88: -1- AM_CONDITIONAL([DBUS_DOXYGEN_DOCS_ENABLED], [test x$enable_doxygen_docs = xyes]) m4trace:configure.ac:88: -1- AM_CONDITIONAL([DBUS_DOXYGEN_DOCS_ENABLED], [test x$enable_doxygen_docs = xyes])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_TRUE]) m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_TRUE])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_FALSE]) m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_FALSE])
m4trace:configure.ac:102: -1- AC_CONFIG_FILES([Makefile m4trace:configure.ac:103: -1- AC_CONFIG_FILES([Makefile
src/Makefile src/Makefile
tools/Makefile tools/Makefile
data/Makefile data/Makefile
doc/Makefile doc/Makefile
doc/Doxyfile doc/Doxyfile
doc/html/Makefile doc/html/Makefile
examples/properties/Makefile
dbus-c++-0.3.pc dbus-c++-0.3.pc
]) ])
m4trace:configure.ac:102: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. m4trace:configure.ac:103: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], []) You should run autoupdate.], [])
m4trace:configure.ac:102: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:103: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:102: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:103: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:102: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) m4trace:configure.ac:103: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file])
m4trace:configure.ac:102: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:103: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS

View file

@ -424,16 +424,17 @@ m4trace:configure.ac:68: -1- AC_SUBST([DOXYGEN], [$ac_cv_path_DOXYGEN])
m4trace:configure.ac:88: -1- AM_CONDITIONAL([DBUS_DOXYGEN_DOCS_ENABLED], [test x$enable_doxygen_docs = xyes]) m4trace:configure.ac:88: -1- AM_CONDITIONAL([DBUS_DOXYGEN_DOCS_ENABLED], [test x$enable_doxygen_docs = xyes])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_TRUE]) m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_TRUE])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_FALSE]) m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_FALSE])
m4trace:configure.ac:102: -1- AC_CONFIG_FILES([Makefile m4trace:configure.ac:103: -1- AC_CONFIG_FILES([Makefile
src/Makefile src/Makefile
tools/Makefile tools/Makefile
data/Makefile data/Makefile
doc/Makefile doc/Makefile
doc/Doxyfile doc/Doxyfile
doc/html/Makefile doc/html/Makefile
examples/properties/Makefile
dbus-c++-0.3.pc dbus-c++-0.3.pc
]) ])
m4trace:configure.ac:102: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. m4trace:configure.ac:103: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], []) You should run autoupdate.], [])
m4trace:configure.ac:102: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:103: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:102: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:103: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])

3
configure vendored
View file

@ -19120,7 +19120,7 @@ echo "${ECHO_T}yes" >&6
# Save processed files # Save processed files
ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile dbus-c++-0.3.pc" ac_config_files="$ac_config_files Makefile src/Makefile tools/Makefile data/Makefile doc/Makefile doc/Doxyfile doc/html/Makefile examples/properties/Makefile dbus-c++-0.3.pc"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure
@ -19691,6 +19691,7 @@ do
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; "doc/Doxyfile" ) CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;;
"doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;; "doc/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;;
"examples/properties/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/properties/Makefile" ;;
"dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;; "dbus-c++-0.3.pc" ) CONFIG_FILES="$CONFIG_FILES dbus-c++-0.3.pc" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;; "include/dbus-c++/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/dbus-c++/config.h" ;;

View file

@ -98,5 +98,6 @@ AC_OUTPUT(
doc/Makefile doc/Makefile
doc/Doxyfile doc/Doxyfile
doc/html/Makefile doc/html/Makefile
examples/properties/Makefile
dbus-c++-0.3.pc dbus-c++-0.3.pc
) )

1
examples/.deps/server.Po Normal file
View file

@ -0,0 +1 @@
# dummy

2
examples/Makefile.am Normal file
View file

@ -0,0 +1,2 @@
EXTRA_DIST = properties

View file

@ -0,0 +1,14 @@
EXTRA_DIST = README props-introspect.xml
INCLUDES = -I$(top_srcdir)/include
noinst_PROGRAMS = props-server
props_server_SOURCES = props-glue.h props-server.h props-server.cpp
props_server_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la
props-glue.h: props-introspect.xml
$(top_builddir)/tools/dbusxx-xml2cpp $^ --adaptor=$@
BUILT_SOURCES = props-glue.h
CLEANFILES = $(BUILT_SOURCES)

View file

@ -0,0 +1,448 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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@
noinst_PROGRAMS = props-server$(EXEEXT)
subdir = examples/properties
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_props_server_OBJECTS = props-server.$(OBJEXT)
props_server_OBJECTS = $(am_props_server_OBJECTS)
props_server_DEPENDENCIES = $(top_builddir)/src/libdbus-c++-0.3.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/dbus-c++
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX --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 --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(props_server_SOURCES)
DIST_SOURCES = $(props_server_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
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@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
EXTRA_DIST = README props-introspect.xml
INCLUDES = -I$(top_srcdir)/include
props_server_SOURCES = props-glue.h props-server.h props-server.cpp
props_server_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la
BUILT_SOURCES = props-glue.h
CLEANFILES = $(BUILT_SOURCES)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) 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 \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/properties/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/properties/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
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
props-server$(EXEEXT): $(props_server_OBJECTS) $(props_server_DEPENDENCIES)
@rm -f props-server$(EXEEXT)
$(CXXLINK) $(props_server_LDFLAGS) $(props_server_OBJECTS) $(props_server_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/props-server.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@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@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@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@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@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
distclean-libtool:
-rm -f libtool
uninstall-info-am:
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; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& 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)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$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: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) 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:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
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-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
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-info-am
props-glue.h: props-introspect.xml
$(top_builddir)/tools/dbusxx-xml2cpp $^ --adaptor=$@
# 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:

View file

@ -0,0 +1,18 @@
This very simple example shows how to export properties (from objects implementing the org.freedesktop.DBus.Properties interface)
To test, run `DBUSXX_VERBOSE=1 ./props_server` and try the following commands:
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Version"
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Version" int32:2
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:string:"Hello D-Bus"
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:int32:200
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Message"
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Something"
dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" int32:100

View file

@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<node name="/org/freedesktop/DBus/Examples/Properties">
<interface name="org.freedesktop.DBus.PropsDemo">
<property name="Version" type="i" access="read"/>
<property name="Message" type="s" access="readwrite"/>
<signal name="MessageChanged">
<arg name="message" type="s"/>
</signal>
</interface>
</node>

View file

@ -0,0 +1,46 @@
#include "props-server.h"
#include <signal.h>
static const char* PROPS_SERVER_NAME = "org.freedesktop.DBus.Examples.Properties";
static const char* PROPS_SERVER_PATH = "/org/freedesktop/DBus/Examples/Properties";
PropsServer::PropsServer( DBus::Connection& connection )
: DBus::ObjectAdaptor(connection, PROPS_SERVER_PATH)
{
Version = 1;
Message = "default message";
}
void PropsServer::on_set_property
( DBus::InterfaceAdaptor& interface, const DBus::String& property, const DBus::Variant& value )
{
if(property == "Message")
{
DBus::String msg = value;
this->MessageChanged(msg);
}
}
DBus::BusDispatcher dispatcher;
void niam( int sig )
{
dispatcher.leave();
}
int main()
{
signal(SIGTERM, niam);
signal(SIGINT, niam);
DBus::default_dispatcher = &dispatcher;
DBus::Connection conn = DBus::Connection::SessionBus();
conn.request_name(PROPS_SERVER_NAME);
PropsServer server(conn);
dispatcher.enter();
return 0;
}

View file

@ -0,0 +1,21 @@
#ifndef __DEMO_PROPS_SERVER_H
#define __DEMO_PROPS_SERVER_H
#include <dbus-c++/dbus.h>
#include "props-glue.h"
class PropsServer
: public org::freedesktop::DBus::PropsDemo,
public DBus::IntrospectableAdaptor,
public DBus::PropertiesAdaptor,
public DBus::ObjectAdaptor
{
public:
PropsServer( DBus::Connection& connection );
void on_set_property
( DBus::InterfaceAdaptor& interface, const DBus::String& property, const DBus::Variant& value );
};
#endif//__DEMO_PROPS_SERVER_H

View file

@ -38,7 +38,7 @@ class Connection;
typedef Slot<bool, const Message&> MessageSlot; typedef Slot<bool, const Message&> MessageSlot;
typedef std::list<Connection*> ConnectionPList; typedef std::list<Connection> ConnectionList;
class ObjectAdaptor; class ObjectAdaptor;
class Dispatcher; class Dispatcher;
@ -59,7 +59,7 @@ public:
Connection( Private* ); Connection( Private* );
Connection( const char* address, bool priv = false ); Connection( const char* address, bool priv = true );
Connection( const Connection& c ); Connection( const Connection& c );

View file

@ -39,6 +39,7 @@ struct PropertyData
{ {
bool read; bool read;
bool write; bool write;
std::string sig;
Variant value; Variant value;
}; };
@ -137,7 +138,7 @@ public:
Variant* get_property( const std::string& name ); Variant* get_property( const std::string& name );
bool set_property( const std::string& name, Variant& value ); void set_property( const std::string& name, Variant& value );
virtual IntrospectedInterface* const introspect() const virtual IntrospectedInterface* const introspect() const
{ {
@ -174,9 +175,10 @@ protected:
InterfaceAdaptor::_methods[ #method ] = \ InterfaceAdaptor::_methods[ #method ] = \
new ::DBus::Callback< interface, ::DBus::Message, const ::DBus::CallMessage& >(this, & interface :: callback ); new ::DBus::Callback< interface, ::DBus::Message, const ::DBus::CallMessage& >(this, & interface :: callback );
# define bind_property(variable, can_read, can_write) \ # define bind_property(variable, type, can_read, can_write) \
InterfaceAdaptor::_properties[ #variable ].read = can_read; \ InterfaceAdaptor::_properties[ #variable ].read = can_read; \
InterfaceAdaptor::_properties[ #variable ].write = can_write; \ InterfaceAdaptor::_properties[ #variable ].write = can_write; \
InterfaceAdaptor::_properties[ #variable ].sig = type; \
variable.bind( InterfaceAdaptor::_properties[ #variable ] ); variable.bind( InterfaceAdaptor::_properties[ #variable ] );
# define connect_signal(interface, signal, callback) \ # define connect_signal(interface, signal, callback) \

View file

@ -45,10 +45,7 @@ public:
T operator() (void) const T operator() (void) const
{ {
T t; return (T)_data->value;
MessageIter ri = _data->value.reader();
ri >> t;
return t;
} }
PropertyAdaptor& operator = ( const T& t ) PropertyAdaptor& operator = ( const T& t )

View file

@ -44,22 +44,23 @@ public:
Server( const char* address ); Server( const char* address );
Server( const Server& s );
Dispatcher* setup( Dispatcher* ); Dispatcher* setup( Dispatcher* );
virtual ~Server(); virtual ~Server();
bool operator == ( const Server& ) const;
bool listening() const; bool listening() const;
bool operator == ( const Server& ) const;
void disconnect(); void disconnect();
struct Private; struct Private;
protected: protected:
Server( const Server& s )
{}
virtual void on_new_connection( Connection& c ) = 0; virtual void on_new_connection( Connection& c ) = 0;
private: private:

View file

@ -32,13 +32,14 @@
#include "connection_p.h" #include "connection_p.h"
#include "dispatcher_p.h" #include "dispatcher_p.h"
#include "server_p.h"
#include "message_p.h" #include "message_p.h"
#include "pendingcall_p.h" #include "pendingcall_p.h"
using namespace DBus; using namespace DBus;
Connection::Private::Private( DBusConnection* c ) Connection::Private::Private( DBusConnection* c, Server::Private* s )
: conn(c) , dispatcher(0) : conn(c) , dispatcher(0), server(s)
{ {
init(); init();
} }
@ -56,6 +57,10 @@ Connection::Private::Private( DBusBusType type )
Connection::Private::~Private() Connection::Private::~Private()
{ {
debug_log("terminating connection 0x%08x", conn);
detach_server();
if(dbus_connection_get_is_connected(conn)) if(dbus_connection_get_is_connected(conn))
{ {
std::vector<std::string>::iterator i = names.begin(); std::vector<std::string>::iterator i = names.begin();
@ -66,7 +71,7 @@ Connection::Private::~Private()
dbus_bus_release_name(conn, i->c_str(), NULL); dbus_bus_release_name(conn, i->c_str(), NULL);
++i; ++i;
} }
//dbus_connection_disconnect(conn); dbus_connection_close(conn);
} }
dbus_connection_unref(conn); dbus_connection_unref(conn);
} }
@ -74,6 +79,7 @@ Connection::Private::~Private()
void Connection::Private::init() void Connection::Private::init()
{ {
dbus_connection_ref(conn); dbus_connection_ref(conn);
dbus_connection_ref(conn); //todo: the library has to own another reference
disconn_filter = new Callback<Connection::Private, bool, const Message&>( disconn_filter = new Callback<Connection::Private, bool, const Message&>(
this, &Connection::Private::disconn_filter_function this, &Connection::Private::disconn_filter_function
@ -85,10 +91,40 @@ void Connection::Private::init()
dbus_connection_set_exit_on_disconnect(conn, false); //why was this set to true?? dbus_connection_set_exit_on_disconnect(conn, false); //why was this set to true??
} }
void Connection::Private::detach_server()
{
/* Server::Private* tmp = server;
server = NULL;
if(tmp)
{
ConnectionList::iterator i;
for(i = tmp->connections.begin(); i != tmp->connections.end(); ++i)
{
if(i->_pvt.get() == this)
{
tmp->connections.erase(i);
break;
}
}
}*/
}
bool Connection::Private::do_dispatch() bool Connection::Private::do_dispatch()
{ {
debug_log("dispatching on %p", conn); debug_log("dispatching on %p", conn);
if(!dbus_connection_get_is_connected(conn))
{
debug_log("connection terminated");
detach_server();
return true;
}
return dbus_connection_dispatch(conn) != DBUS_DISPATCH_DATA_REMAINS; return dbus_connection_dispatch(conn) != DBUS_DISPATCH_DATA_REMAINS;
} }
@ -156,7 +192,7 @@ Connection::Connection( const char* address, bool priv )
InternalError e; InternalError e;
DBusConnection* conn = priv DBusConnection* conn = priv
? dbus_connection_open_private(address, e) ? dbus_connection_open_private(address, e)
: dbus_connection_open(address,e); : dbus_connection_open(address, e);
if(e) throw Error(e); if(e) throw Error(e);

View file

@ -26,6 +26,7 @@
#define __DBUSXX_CONNECTION_P_H #define __DBUSXX_CONNECTION_P_H
#include <dbus-c++/connection.h> #include <dbus-c++/connection.h>
#include <dbus-c++/server.h>
#include <dbus-c++/dispatcher.h> #include <dbus-c++/dispatcher.h>
#include <dbus-c++/refptr_impl.h> #include <dbus-c++/refptr_impl.h>
@ -47,7 +48,10 @@ struct Connection::Private
MessageSlot disconn_filter; MessageSlot disconn_filter;
bool disconn_filter_function( const Message& ); bool disconn_filter_function( const Message& );
Private( DBusConnection* ); Server::Private* server;
void detach_server();
Private( DBusConnection*, Server::Private* = NULL );
Private( DBusBusType ); Private( DBusBusType );

View file

@ -27,6 +27,7 @@
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include "dispatcher_p.h" #include "dispatcher_p.h"
#include "server_p.h"
#include "connection_p.h" #include "connection_p.h"
DBus::Dispatcher* DBus::default_dispatcher = NULL; DBus::Dispatcher* DBus::default_dispatcher = NULL;

View file

@ -88,7 +88,7 @@ Variant* InterfaceAdaptor::get_property( const std::string& name )
return NULL; return NULL;
} }
bool InterfaceAdaptor::set_property( const std::string& name, Variant& value ) void InterfaceAdaptor::set_property( const std::string& name, Variant& value )
{ {
PropertyTable::iterator pti = _properties.find(name); PropertyTable::iterator pti = _properties.find(name);
@ -97,10 +97,15 @@ bool InterfaceAdaptor::set_property( const std::string& name, Variant& value )
if( !pti->second.write ) if( !pti->second.write )
throw ErrorAccessDenied("property is not writeable"); throw ErrorAccessDenied("property is not writeable");
Signature sig = value.signature();
if( pti->second.sig != sig )
throw ErrorInvalidSignature("property expects a different type");
pti->second.value = value; pti->second.value = value;
return true; return;
} }
return false; throw ErrorFailed("requested property not found");
} }
InterfaceProxy* ProxyBase::find_interface( const std::string& name ) InterfaceProxy* ProxyBase::find_interface( const std::string& name )

View file

@ -30,6 +30,7 @@
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include "message_p.h" #include "message_p.h"
#include "server_p.h"
#include "connection_p.h" #include "connection_p.h"
using namespace DBus; using namespace DBus;

View file

@ -46,7 +46,7 @@ Message PropertiesAdaptor::Get( const CallMessage& call )
ri >> iface_name >> property_name; ri >> iface_name >> property_name;
debug_log("requesting property %s on interface %s\n", property_name.c_str(), iface_name.c_str()); debug_log("requesting property %s on interface %s", property_name.c_str(), iface_name.c_str());
InterfaceAdaptor* interface = (InterfaceAdaptor*) find_interface(iface_name); InterfaceAdaptor* interface = (InterfaceAdaptor*) find_interface(iface_name);
@ -85,8 +85,7 @@ Message PropertiesAdaptor::Set( const CallMessage& call )
on_set_property(*interface, property_name, value); on_set_property(*interface, property_name, value);
if(!interface->set_property(property_name, value)) interface->set_property(property_name, value);
throw ErrorFailed("requested property not found");
ReturnMessage reply(call); ReturnMessage reply(call);

View file

@ -35,18 +35,23 @@ using namespace DBus;
Server::Private::Private( DBusServer* s ) Server::Private::Private( DBusServer* s )
: server(s) : server(s)
{ {
dbus_server_set_new_connection_function(server, on_new_conn_cb, this, NULL); }
Server::Private::~Private()
{
} }
void Server::Private::on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data ) void Server::Private::on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data )
{ {
//Private* p = static_cast<Private*>(data); Server* s = static_cast<Server*>(data);
//m->on_new_connection(nc); //TODO Connection nc (new Connection::Private(conn, s->_pvt.get()));
Connection nc(new Connection::Private(conn)); s->_pvt->connections.push_back(nc);
debug_log("incoming connection"); s->on_new_connection(nc);
debug_log("incoming connection 0x%08x", conn);
} }
Server::Server( const char* address ) Server::Server( const char* address )
@ -56,15 +61,21 @@ Server::Server( const char* address )
if(e) throw Error(e); if(e) throw Error(e);
_pvt = new Private(server); debug_log("server 0x%08x listening on %s", server, address);
}
_pvt = new Private(server);
dbus_server_set_new_connection_function(_pvt->server, Private::on_new_conn_cb, this, NULL);
setup(default_dispatcher);
}
/*
Server::Server( const Server& s ) Server::Server( const Server& s )
: _pvt(s._pvt) : _pvt(s._pvt)
{ {
dbus_server_ref(_pvt->server); dbus_server_ref(_pvt->server);
} }
*/
Server::~Server() Server::~Server()
{ {
dbus_server_unref(_pvt->server); dbus_server_unref(_pvt->server);

View file

@ -39,8 +39,12 @@ struct Server::Private
Dispatcher* dispatcher; Dispatcher* dispatcher;
ConnectionList connections;
Private( DBusServer* ); Private( DBusServer* );
~Private();
static void on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data ); static void on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data );
}; };

View file

@ -87,7 +87,8 @@ MessageIter& operator << ( MessageIter& iter, const Variant& val )
MessageIter& operator >> ( MessageIter& iter, Variant& val ) MessageIter& operator >> ( MessageIter& iter, Variant& val )
{ {
//TODO: check if iter really points to a variant if(iter.type() != DBUS_TYPE_VARIANT)
throw ErrorInvalidArgs("variant type expected");
val.clear(); val.clear();

View file

@ -405,6 +405,7 @@ void generate_adaptor( Xml::Document& doc, const char* filename )
file << tab << tab << "bind_property(" file << tab << tab << "bind_property("
<< property.get("name") << ", " << property.get("name") << ", "
<< "\"" << property.get("type") << "\", "
<< ( property.get("access").find("read") != string::npos << ( property.get("access").find("read") != string::npos
? "true" ? "true"
: "false" ) : "false" )