[Pkg-e-commits] [SCM] D-Bus integration for EFL based applications branch, new-svn-snapshot, updated. debian/0.5.0.050+svn20081126-1-185-g59e8581
Albin Tonnerre
albin.tonnerre at gmail.com
Fri Jun 19 14:21:41 UTC 2009
The following commit has been merged in the new-svn-snapshot branch:
commit 1c56da79d308eb9a2be8b5046d52444720f22711
Author: Albin Tonnerre <albin.tonnerre at gmail.com>
Date: Thu Jun 18 19:19:10 2009 +0200
Import upstream release 0.5.0.061
diff --git a/configure b/configure
index b4f18ae..e8898d1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for e_dbus 0.5.0.060.
+# Generated by GNU Autoconf 2.61 for e_dbus 0.5.0.061.
#
# Report bugs to <enlightenment-devel at lists.sourceforge.net>.
#
@@ -723,8 +723,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='e_dbus'
PACKAGE_TARNAME='e_dbus'
-PACKAGE_VERSION='0.5.0.060'
-PACKAGE_STRING='e_dbus 0.5.0.060'
+PACKAGE_VERSION='0.5.0.061'
+PACKAGE_STRING='e_dbus 0.5.0.061'
PACKAGE_BUGREPORT='enlightenment-devel at lists.sourceforge.net'
ac_unique_file="configure.ac"
@@ -1412,7 +1412,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures e_dbus 0.5.0.060 to adapt to many kinds of systems.
+\`configure' configures e_dbus 0.5.0.061 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1482,7 +1482,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of e_dbus 0.5.0.060:";;
+ short | recursive ) echo "Configuration of e_dbus 0.5.0.061:";;
esac
cat <<\_ACEOF
@@ -1595,7 +1595,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-e_dbus configure 0.5.0.060
+e_dbus configure 0.5.0.061
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1609,7 +1609,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by e_dbus $as_me 0.5.0.060, which was
+It was created by e_dbus $as_me 0.5.0.061, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2385,7 +2385,7 @@ fi
# Define the identity of the package.
PACKAGE='e_dbus'
- VERSION='0.5.0.060'
+ VERSION='0.5.0.061'
cat >>confdefs.h <<_ACEOF
@@ -10974,7 +10974,7 @@ VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
-release="ver-pre-01"
+release="ver-svn-02"
econnman_release_info="-release $release"
edbus_release_info="-release $release"
ehal_release_info="-release $release"
@@ -12057,7 +12057,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by e_dbus $as_me 0.5.0.060, which was
+This file was extended by e_dbus $as_me 0.5.0.061, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12110,7 +12110,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-e_dbus config.status 0.5.0.060
+e_dbus config.status 0.5.0.061
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index a6d8495..90e9da2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,9 @@
# get rid of that stupid cache mechanism
rm -f config.cache
-AC_INIT(e_dbus, 0.5.0.060, enlightenment-devel at lists.sourceforge.net)
-AC_PREREQ(2.52)
-AC_CONFIG_SRCDIR(configure.ac)
+AC_INIT([e_dbus], [0.5.0.061], [enlightenment-devel at lists.sourceforge.net])
+AC_PREREQ([2.52])
+AC_CONFIG_SRCDIR([configure.ac])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
@@ -23,7 +23,7 @@ VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
-release="ver-pre-01"
+release="ver-svn-02"
econnman_release_info="-release $release"
edbus_release_info="-release $release"
ehal_release_info="-release $release"
diff --git a/src/lib/dbus/E_DBus.h b/src/lib/dbus/E_DBus.h
index da8c22c..427f806 100644
--- a/src/lib/dbus/E_DBus.h
+++ b/src/lib/dbus/E_DBus.h
@@ -9,6 +9,7 @@
#include <dbus/dbus.h>
#include <Ecore.h>
+#include <Eina.h>
#ifdef EAPI
#undef EAPI
@@ -86,6 +87,9 @@ extern "C" {
EAPI E_DBus_Object *e_dbus_object_add(E_DBus_Connection *conn, const char *object_path, void *data);
EAPI void e_dbus_object_free(E_DBus_Object *obj);
EAPI void *e_dbus_object_data_get(E_DBus_Object *obj);
+ EAPI E_DBus_Connection *e_dbus_object_conn_get(E_DBus_Object *obj);
+ EAPI const char *e_dbus_object_path_get(E_DBus_Object *obj);
+ EAPI const Eina_List *e_dbus_object_interfaces_get(E_DBus_Object *obj);
EAPI void e_dbus_object_property_get_cb_set(E_DBus_Object *obj, E_DBus_Object_Property_Get_Cb func);
EAPI void e_dbus_object_property_set_cb_set(E_DBus_Object *obj, E_DBus_Object_Property_Set_Cb func);
@@ -126,7 +130,7 @@ extern "C" {
EAPI DBusPendingCall *e_dbus_name_has_owner(E_DBus_Connection *conn, const char *name,
E_DBus_Method_Return_Cb cb_return,
const void *data);
- EAPI DBusPendingCall *e_dbus_start_service_by_name(E_DBus_Connection *conn, const char *name,
+ EAPI DBusPendingCall *e_dbus_start_service_by_name(E_DBus_Connection *conn, const char *name, unsigned int flags,
E_DBus_Method_Return_Cb cb_return,
const void *data);
diff --git a/src/lib/dbus/e_dbus_methods.c b/src/lib/dbus/e_dbus_methods.c
index a3f70e2..c9de2f7 100644
--- a/src/lib/dbus/e_dbus_methods.c
+++ b/src/lib/dbus/e_dbus_methods.c
@@ -122,7 +122,30 @@ e_dbus_name_has_owner(E_DBus_Connection *conn, const char *name, E_DBus_Method_R
EAPI DBusPendingCall *
-e_dbus_start_service_by_name(E_DBus_Connection *conn, const char *name, E_DBus_Method_Return_Cb cb_return, const void *data)
+e_dbus_start_service_by_name(E_DBus_Connection *conn, const char *name, unsigned int flags, E_DBus_Method_Return_Cb cb_return, const void *data)
{
- return _dbus_call__str(conn, "StartServiceByName", name, cb_return, data);
+ const char method_name[] = "StartServiceByName";
+ DBusMessage *msg;
+ DBusPendingCall *ret;
+
+ if (!conn)
+ {
+ fprintf(stderr, "ERROR: no connection for call of %s\n", method_name);
+ return NULL;
+ }
+
+ msg = _dbus_message_method_call(method_name);
+ if (!msg)
+ return NULL;
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_UINT32, &flags,
+ DBUS_TYPE_INVALID);
+ ret = e_dbus_message_send(conn, msg, cb_return, -1, (void *)data);
+ dbus_message_unref(msg);
+
+ if (!ret)
+ fprintf(stderr, "ERROR: failed to call %s(\"%s\")\n", method_name, name);
+
+ return ret;
}
diff --git a/src/lib/dbus/e_dbus_object.c b/src/lib/dbus/e_dbus_object.c
index ec48925..2c9ccb5 100644
--- a/src/lib/dbus/e_dbus_object.c
+++ b/src/lib/dbus/e_dbus_object.c
@@ -1,6 +1,6 @@
#include "E_DBus.h"
#include "e_dbus_private.h"
-#include <Ecore_Data.h>
+#include <Eina.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -274,6 +274,36 @@ e_dbus_object_data_get(E_DBus_Object *obj)
}
/**
+ * @brief Get the dbus connection of a dbus object
+ * @param obj the dbus object
+ */
+EAPI E_DBus_Connection *
+e_dbus_object_conn_get(E_DBus_Object *obj)
+{
+ return obj->conn;
+}
+
+/**
+ * @brief Get the path of a dbus object
+ * @param obj the dbus object
+ */
+EAPI const char *
+e_dbus_object_path_get(E_DBus_Object *obj)
+{
+ return obj->path;
+}
+
+/**
+ * @brief Get the interfaces of a dbus object
+ * @param obj the dbus object
+ */
+EAPI const Eina_List *
+e_dbus_object_interfaces_get(E_DBus_Object *obj)
+{
+ return obj->interfaces;
+}
+
+/**
* @brief Sets the callback to fetch properties from an object
* @param obj the object
* @param func the callback
diff --git a/src/lib/dbus/e_dbus_signal.c b/src/lib/dbus/e_dbus_signal.c
index b1b33c1..e635f8b 100644
--- a/src/lib/dbus/e_dbus_signal.c
+++ b/src/lib/dbus/e_dbus_signal.c
@@ -29,7 +29,8 @@ static void cb_signal_dispatcher(E_DBus_Connection *conn, DBusMessage *msg);
static void
e_dbus_signal_handler_free(E_DBus_Signal_Handler *sh)
{
- free(sh->sender);
+ if(sh->sender)
+ free(sh->sender);
free(sh);
}
@@ -80,6 +81,9 @@ cb_name_owner(void *data, DBusMessage *msg, DBusError *err)
static int
_match_append(char *buf, int size, int *used, const char *keyword, int keyword_size, const char *value, int value_size)
{
+ if(value == NULL)
+ return 1;
+
if (*used + keyword_size + value_size + sizeof(",=''") >= size)
{
DEBUG(1, "ERROR: cannot add match %s='%s': too long!\n", keyword, value);
@@ -173,7 +177,10 @@ e_dbus_signal_handler_add(E_DBus_Connection *conn, const char *sender, const cha
SET_STRING(member);
#undef SET_STRING
- sh->sender = strdup(sender);
+ if(sender)
+ sh->sender = strdup(sender);
+ else
+ sh->sender = NULL;
sh->cb_signal = cb_signal;
sh->data = data;
--
D-Bus integration for EFL based applications
More information about the Pkg-e-commits
mailing list