Enlightenment CVS committal
Author : rephorm
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_dbus
Modified Files:
Ecore_DBus.h ecore_dbus_address.c ecore_dbus_message.c
ecore_dbus_private.h
Log Message:
small cleanups
api change on _new_error()
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_dbus/Ecore_DBus.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- Ecore_DBus.h 27 Sep 2006 00:00:59 -0000 1.19
+++ Ecore_DBus.h 27 Sep 2006 23:37:01 -0000 1.20
@@ -208,7 +208,7 @@
EAPI unsigned int ecore_dbus_message_new_error(Ecore_DBus_Server *svr,
char *error_name,
int reply_serial, char *destination,
- char *signature, ...);
+ char *error_message);
EAPI unsigned int ecore_dbus_message_new_signal(Ecore_DBus_Server *svr,
char *path,
char *interface, char *signal_name,
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_dbus/ecore_dbus_address.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_dbus_address.c 25 Sep 2006 05:39:50 -0000 1.4
+++ ecore_dbus_address.c 27 Sep 2006 23:37:01 -0000 1.5
@@ -62,7 +62,7 @@
addcpy = strdup(address);
p = addcpy;
- char *start;
+ char *start = NULL;
char *transport = p;
char *key = NULL;
char *val = NULL;
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_dbus/ecore_dbus_message.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore_dbus_message.c 27 Sep 2006 00:00:59 -0000 1.10
+++ ecore_dbus_message.c 27 Sep 2006 23:37:01 -0000 1.11
@@ -20,6 +20,10 @@
static void _ecore_dbus_message_body(Ecore_DBus_Message *msg,
char *signature, va_list args);
+static unsigned int _ecore_dbus_message_new_error(Ecore_DBus_Server *svr, char
*error_name,
+ int reply_serial, char *destination,
+ char *signature, ...);
+
static void _ecore_dbus_message_field_free(void *data);
/* printing functions */
@@ -74,9 +78,21 @@
return msg->serial;
}
+/* errors either have a single param, the error message, or no params. */
EAPI unsigned int
ecore_dbus_message_new_error(Ecore_DBus_Server *svr, char *error_name,
int reply_serial, char *destination,
+ char *error_message)
+{
+ char *format = "";
+ if (error_message) format = "s";
+
+ return _ecore_dbus_message_new_error(svr, error_name, reply_serial,
destination, format, error_message);
+}
+
+static unsigned int
+_ecore_dbus_message_new_error(Ecore_DBus_Server *svr, char *error_name,
+ int reply_serial, char *destination,
char *signature, ...)
{
va_list args;
@@ -286,15 +302,11 @@
ecore_dbus_message_body_field_get(Ecore_DBus_Message *m, unsigned int pos)
{
Ecore_DBus_Message_Field *f;
- unsigned int i = 0;
+ f = ecore_list_goto_index(m->fields, pos);
+
+ if (f)
+ return _ecore_dbus_message_field_value_get(f);
- ecore_list_goto_first(m->fields);
- while ((f = ecore_list_next(m->fields)))
- {
- if (i == pos)
- return _ecore_dbus_message_field_value_get(f);
- i++;
- }
return NULL;
}
@@ -331,7 +343,7 @@
void *
_ecore_dbus_message_field_new(Ecore_DBus_Message *msg, Ecore_DBus_Data_Type
type)
{
- Ecore_DBus_Message_Field *f;
+ Ecore_DBus_Message_Field *f = NULL;
switch (type)
{
@@ -707,4 +719,3 @@
printf("\n");
printf("[ecore_dbus] end raw message\n");
}
-
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_dbus/ecore_dbus_private.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ecore_dbus_private.h 27 Sep 2006 00:00:59 -0000 1.14
+++ ecore_dbus_private.h 27 Sep 2006 23:37:01 -0000 1.15
@@ -290,7 +290,11 @@
Ecore_DBus_Message *_ecore_dbus_message_unmarshal(Ecore_DBus_Server
*svr, unsigned char *message, int size);
+/* ecore_dbus_object.c */
int ecore_dbus_object_method_dispatch(Ecore_DBus_Server *server, const char
*path, const char *interface, const char *method);
+int ecore_dbus_objects_init();
+void ecore_dbus_objects_shutdown();
+
/* Errors */
#define DBUS_ERROR_FAILED
"org.freedesktop.DBus.Error.Failed"
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs