Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : proto

Dir     : e17/proto/e_dbus/src/lib/dbus


Modified Files:
        E_DBus.h e_dbus_object.c e_dbus_util.c 


Log Message:
fix type int -> string conversion

===================================================================
RCS file: /cvs/e/e17/proto/e_dbus/src/lib/dbus/E_DBus.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- E_DBus.h    11 Jul 2007 00:43:40 -0000      1.7
+++ E_DBus.h    11 Jul 2007 00:44:54 -0000      1.8
@@ -124,6 +124,7 @@
 void e_dbus_callback_free(E_DBus_Callback *callback);
 void e_dbus_callback_call(E_DBus_Callback *cb, void *data);
 
+const char *e_dbus_basic_type_as_string(int type);
 
 #define DEBUG_LVL 0
 #define DEBUG(lvl, ...) if (lvl <= DEBUG_LVL) printf(__VA_ARGS__)
===================================================================
RCS file: /cvs/e/e17/proto/e_dbus/src/lib/dbus/e_dbus_object.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_dbus_object.c     3 Apr 2007 19:22:39 -0000       1.9
+++ e_dbus_object.c     11 Jul 2007 00:44:54 -0000      1.10
@@ -122,7 +122,7 @@
   {
     reply = dbus_message_new_method_return(msg);
     dbus_message_iter_init_append(msg, &iter);
-    dbus_message_iter_open_container(&iter, DBUS_TYPE_VARIANT, 
dbus_message_type_to_string(type), &sub);
+    dbus_message_iter_open_container(&iter, DBUS_TYPE_VARIANT, 
e_dbus_basic_type_as_string(type), &sub);
     dbus_message_iter_append_basic(&sub, type, &value);
     dbus_message_iter_close_container(&iter, &sub);
     return reply;
===================================================================
RCS file: /cvs/e/e17/proto/e_dbus/src/lib/dbus/e_dbus_util.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_dbus_util.c       11 Jul 2007 00:43:40 -0000      1.1
+++ e_dbus_util.c       11 Jul 2007 00:44:54 -0000      1.2
@@ -36,3 +36,37 @@
 {
   cb->func(cb->user_data, data);
 }
+
+const char *
+e_dbus_basic_type_as_string(int type)
+{
+  switch (type)
+  {
+    case DBUS_TYPE_BYTE:
+      return DBUS_TYPE_BYTE_AS_STRING;
+    case DBUS_TYPE_BOOLEAN:
+      return DBUS_TYPE_BOOLEAN_AS_STRING;
+    case DBUS_TYPE_INT16:
+      return DBUS_TYPE_INT16_AS_STRING;
+    case DBUS_TYPE_UINT16:
+      return DBUS_TYPE_UINT16_AS_STRING;
+    case DBUS_TYPE_INT32:
+      return DBUS_TYPE_INT32_AS_STRING;
+    case DBUS_TYPE_UINT32:
+      return DBUS_TYPE_UINT32_AS_STRING;
+    case DBUS_TYPE_INT64:
+      return DBUS_TYPE_INT64_AS_STRING;
+    case DBUS_TYPE_UINT64:
+      return DBUS_TYPE_UINT64_AS_STRING;
+    case DBUS_TYPE_DOUBLE:
+      return DBUS_TYPE_DOUBLE_AS_STRING;
+    case DBUS_TYPE_STRING:
+      return DBUS_TYPE_STRING_AS_STRING;
+    case DBUS_TYPE_OBJECT_PATH:
+      return DBUS_TYPE_OBJECT_PATH_AS_STRING;
+    case DBUS_TYPE_SIGNATURE:
+      return DBUS_TYPE_SIGNATURE_AS_STRING;
+    default:
+      return NULL;
+  }
+}



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to