Changeset 289
- Timestamp:
- 05/25/09 21:56:42 (3 years ago)
- bzr:base-revision:
- alberto.botti@gmail.com-20090521192404-ptvzvmhm87oq7etr
- bzr:committer:
- Alberto Botti <alberto.botti@gmail.com>
- bzr:file-ids:
rgc/include/client/rgc_client.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Finclude%2Fclient%2Frgc_client.h
rgc/include/client/rgc_remote_object.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Finclude%2Fclient%2Frgc_remote_object.h
rgc/include/connection/rgc_protocol_client.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Finclude%2Fconnection%2Frgc_protocol_client.h
rgc/include/connection/rgc_protocol_server.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Finclude%2Fconnection%2Frgc_protocol_server.h
rgc/src/client/rgc_client_cmd.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_client_cmd.c
rgc/src/client/rgc_info.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_info.c
rgc/src/client/rgc_info.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_info.h
rgc/src/client/rgc_query.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_query.c
rgc/src/client/rgc_remote_object.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_remote_object.c
rgc/src/client/rgc_remote_signal.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_remote_signal.c
rgc/src/client/rgc_remote_signal.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fclient%2Frgc_remote_signal.h
rgc/src/common/rgc_utils.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fcommon%2Frgc_utils.h
rgc/src/connection/dbus/rgc_protocol_dbus_server.c rgc_protocol_dbus_se-20090309124819-kmj94w5bsr24cefl-4
rgc/src/connection/rbp/rbp_message.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message.c
rgc/src/connection/rbp/rbp_message.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message.h
rgc/src/connection/rbp/rbp_message_execute_client.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message_execute_client.c
rgc/src/connection/rbp/rbp_message_execute_server.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message_execute_server.c
rgc/src/connection/rbp/rbp_message_lowlevel.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message_lowlevel.c
rgc/src/connection/rbp/rbp_message_string.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frbp_message_string.c
rgc/src/connection/rbp/rgc_protocol_rbp_client.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frgc_protocol_rbp_client.c
rgc/src/connection/rbp/rgc_protocol_rbp_server.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frbp%2Frgc_protocol_rbp_server.c
rgc/src/connection/rgc_connection_client.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_connection_client.c
rgc/src/connection/rgc_connection_client.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_connection_client.h
rgc/src/connection/rgc_connection_server.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_connection_server.c
rgc/src/connection/rgc_connection_server.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_connection_server.h
rgc/src/connection/rgc_protocol_client.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_protocol_client.c
rgc/src/connection/rgc_protocol_client.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_protocol_client.h
rgc/src/connection/rgc_protocol_server.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_protocol_server.c
rgc/src/connection/rgc_protocol_server.h 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fconnection%2Frgc_protocol_server.h
rgc/src/server/rgc_signal.c 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Fsrc%2Fserver%2Frgc_signal.c
rgc/test/Makefile.am 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Ftest%2FMakefile.am
rgc/test/Makefile.in 210@45ad373b-3914-0410-8193-a61cc481f39f:trunk:rgc%2Ftest%2FMakefile.in
rgc/test/check_query.c check_query.c-20090309124827-7ebnk01c4gfihigv-1
rgc/test/check_rbp.c check_rbp.c-20090522130120-ul6epb7z8me1cerb-1
rgc/test/check_remote_obj.c check_remote_obj.c-20090309124832-uxme781mpafyryoo-1- bzr:mapping-version:
- v4
- bzr:merge:
alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p- bzr:repository-uuid:
- 45ad373b-3914-0410-8193-a61cc481f39f
- bzr:revision-id:
- alberto.botti@gmail.com-20090525195410-45j88awlynnup3b1
- bzr:revno:
- 81
- bzr:revprop:branch-nick:
- trunk
- bzr:root:
- trunk
- bzr:text-parents:
rgc/include/client/rgc_client.h alberto.botti@gmail.com-20090204203706-s4k8dta7qo2zk9xr
rgc/include/client/rgc_remote_object.h alberto.botti@gmail.com-20090306143652-vce6aj4qhdsnato6
rgc/include/connection/rgc_protocol_client.h alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/include/connection/rgc_protocol_server.h alberto.botti@gmail.com-20090306143652-vce6aj4qhdsnato6
rgc/src/client/rgc_client_cmd.c alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/src/client/rgc_info.c alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l
rgc/src/client/rgc_info.h alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l
rgc/src/client/rgc_query.c alberto.botti@gmail.com-20090522225944-idvciojo63rw7wgz
rgc/src/client/rgc_remote_object.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/client/rgc_remote_signal.c svn-v3-trunk0:45ad373b-3914-0410-8193-a61cc481f39f:trunk:210
rgc/src/client/rgc_remote_signal.h svn-v3-trunk0:45ad373b-3914-0410-8193-a61cc481f39f:trunk:210
rgc/src/common/rgc_utils.h alberto.botti@gmail.com-20090309202859-cexjc99k235vxl9c
rgc/src/connection/dbus/rgc_protocol_dbus_server.c alberto.botti@gmail.com-20090309124852-c9237byuwhf5xhtb
rgc/src/connection/rbp/rbp_message.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rbp/rbp_message.h alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rbp/rbp_message_execute_client.c alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l
rgc/src/connection/rbp/rbp_message_execute_server.c alberto.botti@gmail.com-20090306143652-vce6aj4qhdsnato6
rgc/src/connection/rbp/rbp_message_lowlevel.c alberto.botti@gmail.com-20090304130000-1a9z78agyveb0x12
rgc/src/connection/rbp/rbp_message_string.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rbp/rgc_protocol_rbp_client.c alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/src/connection/rbp/rgc_protocol_rbp_server.c alberto.botti@gmail.com-20090522225944-idvciojo63rw7wgz
rgc/src/connection/rgc_connection_client.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_connection_client.h alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_connection_server.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_connection_server.h alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_protocol_client.c alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/src/connection/rgc_protocol_client.h alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/src/connection/rgc_protocol_server.c alberto.botti@gmail.com-20090306143652-vce6aj4qhdsnato6
rgc/src/connection/rgc_protocol_server.h alberto.botti@gmail.com-20090306143652-vce6aj4qhdsnato6
rgc/src/server/rgc_signal.c alberto.botti@gmail.com-20090204203706-s4k8dta7qo2zk9xr
rgc/test/Makefile.am alberto.botti@gmail.com-20090523135405-4zsipgk3oj869376
rgc/test/Makefile.in alberto.botti@gmail.com-20090523135405-4zsipgk3oj869376
rgc/test/check_query.c alberto.botti@gmail.com-20090309202859-cexjc99k235vxl9c
rgc/test/check_rbp.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/test/check_remote_obj.c alberto.botti@gmail.com-20090309202859-cexjc99k235vxl9c- bzr:text-revisions:
rgc/include/client/rgc_client.h alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l
rgc/include/client/rgc_remote_object.h alberto.botti@gmail.com-20090523141639-btaidciozs00n72k
rgc/include/connection/rgc_protocol_client.h alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/include/connection/rgc_protocol_server.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_client_cmd.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/client/rgc_info.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_info.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_query.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_remote_object.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_remote_signal.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/client/rgc_remote_signal.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/common/rgc_utils.h alberto.botti@gmail.com-20090522130348-njo1fsfpichievhw
rgc/src/connection/dbus/rgc_protocol_dbus_server.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rbp/rbp_message.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rbp/rbp_message.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rbp/rbp_message_execute_client.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rbp/rbp_message_execute_server.c alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l
rgc/src/connection/rbp/rbp_message_lowlevel.c alberto.botti@gmail.com-20090522225944-idvciojo63rw7wgz
rgc/src/connection/rbp/rbp_message_string.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rbp/rgc_protocol_rbp_client.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rbp/rgc_protocol_rbp_server.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_connection_client.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_connection_client.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_connection_server.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_connection_server.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_protocol_client.c alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_protocol_client.h alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/src/connection/rgc_protocol_server.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/connection/rgc_protocol_server.h alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/src/server/rgc_signal.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/test/Makefile.am alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/test/Makefile.in alberto.botti@gmail.com-20090524203640-94hhlog30bihb0j8
rgc/test/check_query.c alberto.botti@gmail.com-20090522225944-idvciojo63rw7wgz
rgc/test/check_rbp.c alberto.botti@gmail.com-20090525195143-anhz3032v51q4h5p
rgc/test/check_remote_obj.c alberto.botti@gmail.com-20090522085825-x7p3tnbyznz5h32l- bzr:timestamp:
- 2009-05-25 21:54:10.654000044 +0200
- bzr:user-agent:
- bzr1.13.1+bzr-svn0.5.3
- svn:original-date:
- 2009-05-25T19:54:10.654000Z
- Location:
- trunk/rgc
- Files:
-
- 1 added
- 34 modified
-
include/client/rgc_client.h (modified) (1 diff)
-
include/client/rgc_remote_object.h (modified) (1 diff)
-
include/connection/rgc_protocol_client.h (modified) (3 diffs)
-
include/connection/rgc_protocol_server.h (modified) (2 diffs)
-
src/client/rgc_client_cmd.c (modified) (5 diffs)
-
src/client/rgc_info.c (modified) (7 diffs)
-
src/client/rgc_info.h (modified) (3 diffs)
-
src/client/rgc_query.c (modified) (3 diffs)
-
src/client/rgc_remote_object.c (modified) (7 diffs)
-
src/client/rgc_remote_signal.c (modified) (1 diff)
-
src/client/rgc_remote_signal.h (modified) (1 diff)
-
src/common/rgc_utils.h (modified) (1 diff)
-
src/connection/dbus/rgc_protocol_dbus_server.c (modified) (4 diffs)
-
src/connection/rbp/rbp_message.c (modified) (25 diffs)
-
src/connection/rbp/rbp_message.h (modified) (11 diffs)
-
src/connection/rbp/rbp_message_execute_client.c (modified) (1 diff)
-
src/connection/rbp/rbp_message_execute_server.c (modified) (1 diff)
-
src/connection/rbp/rbp_message_lowlevel.c (modified) (3 diffs)
-
src/connection/rbp/rbp_message_string.c (modified) (7 diffs)
-
src/connection/rbp/rgc_protocol_rbp_client.c (modified) (7 diffs)
-
src/connection/rbp/rgc_protocol_rbp_server.c (modified) (10 diffs)
-
src/connection/rgc_connection_client.c (modified) (6 diffs)
-
src/connection/rgc_connection_client.h (modified) (4 diffs)
-
src/connection/rgc_connection_server.c (modified) (10 diffs)
-
src/connection/rgc_connection_server.h (modified) (5 diffs)
-
src/connection/rgc_protocol_client.c (modified) (3 diffs)
-
src/connection/rgc_protocol_client.h (modified) (3 diffs)
-
src/connection/rgc_protocol_server.c (modified) (2 diffs)
-
src/connection/rgc_protocol_server.h (modified) (2 diffs)
-
src/server/rgc_signal.c (modified) (1 diff)
-
test/Makefile.am (modified) (6 diffs)
-
test/Makefile.in (modified) (9 diffs)
-
test/check_query.c (modified) (1 diff)
-
test/check_rbp.c (added)
-
test/check_remote_obj.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rgc/include/client/rgc_client.h
r283 r289 14 14 void 15 15 rgc_client_set_message_cb (RgcMessageCb cb); 16 17 18 /* FIXME: this shouldn't be here */ 19 void 20 rgc_info_table_dump (void); -
trunk/rgc/include/client/rgc_remote_object.h
r286 r289 103 103 const gchar *method_name, 104 104 guint parameter_n, 105 GValueArray * parameters);105 GValueArray *array); 106 106 107 107 void -
trunk/rgc/include/connection/rgc_protocol_client.h
r3 r289 33 33 guint parameters_n, 34 34 gchar **parameters, 35 GValue Array*values);35 GValue **values); 36 36 37 37 /* void (*destroy_object) (RgcProtocolClient *prot, … … 46 46 const gchar *method_name, 47 47 guint parameters_n, 48 GValue Array*values);48 GValue **values); 49 49 50 50 void (*set_data) (RgcProtocolClient *prot, … … 52 52 guint parameters_n, 53 53 gchar **parameters, 54 GValue Array*values);54 GValue **values); 55 55 56 56 void (*query) (RgcProtocolClient *prot, -
trunk/rgc/include/connection/rgc_protocol_server.h
r286 r289 29 29 const gchar *signal_name, 30 30 guint parameters_n, 31 GValue Array*values);31 GValue **values); 32 32 33 33 void (*property_changed) (RgcProtocolServer *prot, … … 40 40 const gchar *info_type, 41 41 guint n_values, 42 GValue Array*values);42 GValue **values); 43 43 44 44 void (*register_object) (RgcProtocolServer *prot, -
trunk/rgc/src/client/rgc_client_cmd.c
r25 r289 233 233 gchar *point = (gchar *) string; 234 234 235 guint properties_n = 0;236 gchararray *array_properties = NULL;237 GValueArray *array_values = NULL;235 // guint properties_n = 0; 236 // gchararray *array_properties = NULL; 237 // GValueArray *array_values = NULL; 238 238 239 239 … … 276 276 /* Now the real mess */ 277 277 switch (mess_type) { 278 case RBP_CALL_METHOD: {278 /*case RBP_CALL_METHOD: { 279 279 gchar *method_name = get_token (&point, '('); 280 280 if (!method_name) { … … 295 295 296 296 break; 297 } 298 case RBP_SET_DATA: {297 }*/ 298 /*case RBP_SET_DATA: { 299 299 if (!parse_parameters (&point, &properties_n, &array_properties, &array_values, FALSE)) 300 300 return FALSE; … … 305 305 306 306 break; 307 } 308 case RBP_NEW: {307 }*/ 308 /*case RBP_NEW: { 309 309 gchar *class_name = get_token (&point, '('); 310 310 if (!class_name != (strlen(class_name) == 0)) { … … 324 324 325 325 break; 326 } 326 }*/ 327 327 /* case RBP_DESTROY: 328 328 mess = (RgcMessage *) rgc_message_destroy_create (obj_name); -
trunk/rgc/src/client/rgc_info.c
r288 r289 25 25 static gchar* 26 26 rgc_info_create_uid (const gchar *obj_name, 27 const gchar *type) 27 const gchar *info_type, 28 const gchar *info_detail) 28 29 { 29 return g_strdup_printf ("%s/%s ", obj_name, type);30 return g_strdup_printf ("%s/%s/%s", obj_name, info_type, info_detail); 30 31 } 31 32 … … 33 34 void 34 35 rgc_info_append_cb (RgcRemoteObject *obj, 35 gchar *info_name, 36 const gchar *info_name, 37 const gchar *info_detail, 36 38 RgcInfoCallback handler, 37 39 gpointer handler_data, … … 50 52 event->user_data = user_data; 51 53 52 gchar *uid = rgc_info_create_uid (obj->obj_name, info_name );54 gchar *uid = rgc_info_create_uid (obj->obj_name, info_name, info_detail); 53 55 54 56 GSList *list = g_hash_table_lookup (_rgc_info_table, uid); … … 65 67 void 66 68 rgc_info_cb_execute (const gchar *obj_name, 67 const gchar *type, 69 const gchar *info_type, 70 const gchar *info_detail, 68 71 guint n_values, 69 GValue * values)72 GValue **values) 70 73 { 71 gchar *uid = rgc_info_create_uid (obj_name, type);74 gchar *uid = rgc_info_create_uid (obj_name, info_type, info_detail); 72 75 GSList *list = g_hash_table_lookup (_rgc_info_table, uid); 73 76 74 RgcRemoteObject *obj = NULL; /******************************************/ 77 g_print ("rgc_info_cb_execute: obj_name \"%s\" type \"%s\", detail \"%s\", list %p\n", 78 obj_name, info_type, info_detail, list); 79 80 // FIXME: we should keep an hash table of RgcRemoteObjects and reuse them 81 RgcRemoteObject *obj = g_new0 (RgcRemoteObject, 1); 82 obj->obj_name = g_strdup (obj_name); 75 83 76 84 while (list) { … … 78 86 g_assert (event); 79 87 80 (*(event->handler)) (obj, type, n_values, values, event->handler_data,88 (*(event->handler)) (obj, info_type, info_detail, n_values, values, event->handler_data, 81 89 event->c_marshaller, event->callback, event->user_data); 82 90 … … 128 136 129 137 138 static void 139 rgc_info_table_dump_foreach (gpointer key, 140 gpointer value, 141 gpointer user_data) 142 { 143 g_print ("\tkey \"%s\" value %p\n", (const gchar *) key, value); 144 GSList *list = (GSList *) value; 145 while (list) { 146 RgcInfoEvent *event = (RgcInfoEvent *) list->data; 147 148 g_print ("\t\thandler %p callback %p\n", event->handler, event->callback); 149 150 list = list->next; 151 } 152 } 130 153 131 154 132 155 void 156 rgc_info_table_dump (void) 157 { 158 g_print ("_rgc_info_table dump:\n"); 159 g_hash_table_foreach (_rgc_info_table, rgc_info_table_dump_foreach, NULL); 160 } 161 162 163 void 133 164 rgc_info_obj_list_cb (RgcRemoteObject *obj, 134 165 GValueArray *array, … … 138 169 gpointer user_data) 139 170 { 140 141 171 } -
trunk/rgc/src/client/rgc_info.h
r288 r289 1 1 typedef gboolean (*RgcInfoCallback) (RgcRemoteObject *obj, 2 2 const gchar *type, 3 const gchar *detail, 3 4 guint n_values, 4 GValue * values,5 GValue **values, 5 6 gpointer handler_data, 6 7 RgcCbMarshal c_marshaller, … … 27 28 void 28 29 rgc_info_append_cb (RgcRemoteObject *obj, 29 gchar *info_name, 30 const gchar *info_name, 31 const gchar *info_detail, 30 32 RgcInfoCallback handler, 31 33 gpointer handler_data, … … 46 48 void 47 49 rgc_info_cb_execute (const gchar *obj_name, 48 const gchar *type, 50 const gchar *info_type, 51 const gchar *info_detail, 49 52 guint n_values, 50 GValue * values);53 GValue **values); 51 54 52 55 void -
trunk/rgc/src/client/rgc_query.c
r288 r289 17 17 18 18 19 /*static void 19 static gboolean 20 20 rgc_query_server_info_cb (RgcRemoteObject *obj, 21 GValueArray *array, 22 gpointer cb_data, 21 const gchar *type, 22 const gchar *detail, 23 guint n_values, 24 GValue **values, 25 gpointer handler_data, 23 26 RgcCbMarshal c_marshaller, 24 27 GCallback callback, 25 28 gpointer user_data) 26 29 { 27 RgcQueryServerInfoCb cb = (RgcQueryServerInfoCb) c b_data; // ehm...30 RgcQueryServerInfoCb cb = (RgcQueryServerInfoCb) callback; 28 31 29 const gchar *server_name = g_value_get_string (g_value_array_get_nth (array, 0)); 30 const gchar *server_desc = g_value_get_string (g_value_array_get_nth (array, 1)); 32 g_return_val_if_fail (n_values == 2, FALSE); 33 34 const gchar *server_name = g_value_get_string (values[0]); 35 const gchar *server_desc = g_value_get_string (values[1]); 31 36 32 37 (*cb) (server_name, server_desc, user_data); 33 }*/ 38 39 return FALSE; 40 } 34 41 35 42 … … 38 45 39 46 void 40 rgc_query_server_info (RgcQueryServerInfoCb c b,41 gpointer data)47 rgc_query_server_info (RgcQueryServerInfoCb callback, 48 gpointer user_data) 42 49 { 43 50 /*event_append (RGC_PENDING_EVENT_QUERY_SERVER_INFO, G_CALLBACK(cb), data, … … 45 52 //rgc_info_append_cb (_rgc_internal, "QUERY_SERVER_INFO", rgc_query_server_info_cb, cb, NULL, NULL, data); 46 53 g_print ("STUB: rgc_query_server_info\n"); 54 55 rgc_info_append_cb (_rgc_internal, "QUERY_SERVER_INFO", "", rgc_query_server_info_cb, 56 NULL /*handler_data*/, NULL, G_CALLBACK (callback), user_data); 47 57 48 58 rgc_connection_client_query ("_RGC_INTERNAL", "QUERY_SERVER_INFO", ""); -
trunk/rgc/src/client/rgc_remote_object.c
r288 r289 28 28 rgc_remote_object_created_cb (RgcRemoteObject *obj, 29 29 const gchar *type, 30 const gchar *detail, 30 31 guint n_values, 31 GValue * values,32 GValue **values, 32 33 gpointer handler_data, 33 34 RgcCbMarshal c_marshaller, … … 40 41 g_return_val_if_fail (data->proposed_name, TRUE); 41 42 42 const gchar *real_name = g_value_get_string (values + 0);43 const gchar *class_name = g_value_get_string (values + 1);44 const gchar *proposed_name = g_value_get_string (values + 2);43 const gchar *real_name = g_value_get_string (values[0]); 44 const gchar *class_name = g_value_get_string (values[1]); 45 const gchar *proposed_name = g_value_get_string (values[2]); 45 46 46 47 g_debug("Someone created a new object \"%s\", \"%s\" of class \"%s\"\n", … … 231 232 event->proposed_name = g_strdup (obj_name); 232 233 233 rgc_info_append_cb (_rgc_objects, "object_created", rgc_remote_object_created_cb,234 rgc_info_append_cb (_rgc_objects, "object_created", "", rgc_remote_object_created_cb, 234 235 event, NULL, G_CALLBACK (callback), data); 235 236 236 rgc_connection_client_create_object (obj_name, class_name, n_properties, properties, array); 237 GValue **values = g_new0 (GValue*, n_properties); 238 guint i; 239 for (i = 0; i < n_properties; i++) 240 values[i] = array->values + i; 241 242 rgc_connection_client_create_object (obj_name, class_name, n_properties, properties, values); 243 244 g_free (values); 237 245 238 246 return TRUE; … … 303 311 GValueArray *array) 304 312 { 305 rgc_connection_client_set_data(rgc_obj->obj_name, n_properties, properties, array); 313 GValue **values = g_new0 (GValue*, n_properties); 314 guint i; 315 for (i = 0; i < n_properties; i++) 316 values[i] = array->values + i; 317 318 rgc_connection_client_set_data (rgc_obj->obj_name, n_properties, properties, values); 319 320 g_free (values); 306 321 } 307 322 … … 349 364 GValueArray *array) 350 365 { 351 rgc_connection_client_call_method(rgc_obj->obj_name, method_name, n_parameters, array); 366 GValue **values = g_new0 (GValue*, n_parameters); 367 guint i; 368 for (i = 0; i < n_parameters; i++) 369 values[i] = array->values + i; 370 371 rgc_connection_client_call_method(rgc_obj->obj_name, method_name, n_parameters, values); 372 373 g_free (values); 352 374 } 353 375 … … 371 393 372 394 373 /*static void 395 static gboolean 374 396 rgc_remote_object_notify_cb (RgcRemoteObject *obj, 375 GValueArray *array, 376 gpointer cb_data, 397 const gchar *type, 398 const gchar *detail, 399 guint n_values, 400 GValue **values, 401 gpointer handler_data, 377 402 RgcCbMarshal c_marshaller, 378 403 GCallback callback, 379 404 gpointer user_data) 380 405 { 381 RgcRemoteObjectNotifyFunc cb = (RgcRemoteObjectNotifyFunc) cb_data; // ehm... 382 383 const gchar *server_name = g_value_get_string (g_value_array_get_nth (array, 0)); 384 385 (*cb) (obj, server_name, g_value_array_get_nth (array, 1), user_data); 386 }*/ 406 RgcRemoteObjectNotifyFunc cb = (RgcRemoteObjectNotifyFunc) callback; 407 408 g_print ("cb %p obj %p detail %s value %p user_data %p\n", cb, obj, detail, values, user_data); 409 410 (*cb) (obj, detail, values[0], user_data); 411 412 /*const gchar *server_name = g_value_get_string (g_value_array_get_nth (array, 0)); 413 414 (*cb) (obj, server_name, g_value_array_get_nth (array, 1), user_data);*/ 415 416 return FALSE; 417 } 418 419 387 420 388 421 … … 393 426 gpointer user_data) 394 427 { 395 g_print ("STUB: rgc_remote_object_property_changed_notify\n"); 428 rgc_info_append_cb (rgc_obj, "_NOTIFY", property_name, rgc_remote_object_notify_cb, 429 NULL /*handler_data*/, NULL, G_CALLBACK (callback), user_data); 430 396 431 //rgc_info_append_cb (rgc_obj, "_NOTIFY", rgc_remote_object_notify_cb, callback, NULL, NULL, user_data); 397 432 //rgc_info_append_cb (rgc_obj, "_NOTIFY", rgc_remote_object_notify_cb, event, NULL, G_CALLBACK (callback), data); -
trunk/rgc/src/client/rgc_remote_signal.c
r152 r289 21 21 void 22 22 rgc_callback_call (RgcCallback *cb, 23 GValueArray *parameters) 23 guint n_parameters, 24 GValue **values) 24 25 { 25 GValue **param_values; 26 param_values = g_new0 (GValue*, 16); 27 gint i; 26 /* FIXME: validate parameters */ 28 27 29 /* FIXME: validate parameters */ 30 31 for (i = 0; i < parameters->n_values; i++) { 32 param_values[i] = g_value_array_get_nth (parameters, i); 33 } 34 35 (*cb->c_marshaller) (cb->obj, parameters->n_values, param_values, 28 (*cb->c_marshaller) (cb->obj, n_parameters, values, 36 29 cb->callback, cb->user_data); 37 38 g_free (param_values);39 30 } 40 31 -
trunk/rgc/src/client/rgc_remote_signal.h
r3 r289 13 13 void 14 14 rgc_callback_call (RgcCallback *cb, 15 GValueArray *parameters); 15 guint n_parameters, 16 GValue **values); 16 17 17 18 RgcCallback * -
trunk/rgc/src/common/rgc_utils.h
r288 r289 2 2 g_value_init_int (gint i); 3 3 4 inline GValue * 5 g_value_init_boolean (gint i); 4 6 5 7 inline GValue * -
trunk/rgc/src/connection/dbus/rgc_protocol_dbus_server.c
r286 r289 55 55 const gchar *signal_name, 56 56 guint parameters_n, 57 GValue Array*values);57 GValue **values); 58 58 59 59 static void … … 62 62 const gchar *info_type, 63 63 guint n_values, 64 GValue Array*values);64 GValue **values); 65 65 66 66 static void … … 356 356 const gchar *signal_name, 357 357 guint parameters_n, 358 GValue Array*values)358 GValue **values) 359 359 { 360 360 /*DbusMessage *mess = (DbusMessage *) dbus_message_cb_create (obj_name, signal_name, … … 373 373 const gchar *info_type, 374 374 guint n_values, 375 GValue Array*values)375 GValue **values) 376 376 { 377 377 /*DbusMessage *mess = (DbusMessage *) dbus_message_info_create (obj_name, info_type, -
trunk/rgc/src/connection/rbp/rbp_message.c
r285 r289 3 3 #include <string.h> 4 4 5 #include "../../common/rgc_utils.h" 5 6 #include "rbp_message.h" 6 7 #include "rbp_message_lowlevel.h" 7 8 8 9 9 /* FIXME: obj_name should be copied each time */ // FINIRE!!!!10 11 10 RbpMessageCall * 12 11 rbp_message_call_create (const gchar *obj_name, 13 const gchar *method ,12 const gchar *method_name, 14 13 guint n_parameters, 15 GValue Array*values)14 GValue **values) 16 15 { 17 16 RbpMessageCall *mess; … … 19 18 20 19 mess->message.type = RBP_CALL_METHOD; 21 mess->message.obj_name = g_strdup (obj_name);22 23 mess->method_name = g_strdup (method);20 mess->message.obj_name = (gchar *) obj_name; 21 22 mess->method_name = (gchar *) method_name; 24 23 mess->n_parameters = n_parameters; 25 24 mess->values = values; 26 25 27 return (mess);26 return mess; 28 27 } 29 28 … … 33 32 guint n_properties, 34 33 gchar **properties, 35 GValue Array*values)34 GValue **values) 36 35 { 37 36 RbpMessageData *mess; … … 39 38 40 39 mess->message.type = RBP_SET_DATA; 41 mess->message.obj_name = g_strdup (obj_name);40 mess->message.obj_name = (gchar *) obj_name; 42 41 43 42 mess->n_properties = n_properties; … … 45 44 mess->values = values; 46 45 47 return (mess);46 return mess; 48 47 } 49 48 … … 54 53 guint n_properties, 55 54 gchar **properties, 56 GValue Array*values)55 GValue **values) 57 56 { 58 57 RbpMessageNew *mess; … … 60 59 61 60 mess->message.type = RBP_NEW; 62 mess->message.obj_name = g_strdup (obj_name);63 64 mess->class_name = g_strdup (class_name);61 mess->message.obj_name = (gchar *) obj_name; 62 63 mess->class_name = (gchar *) class_name; 65 64 66 65 mess->n_properties = n_properties; 67 66 mess->properties = properties; 68 mess->values = values; // FIXME: we don't own "values", so we 69 // shouldn't destroy it later 70 71 return (mess); 67 mess->values = values; 68 69 return mess; 72 70 } 73 71 … … 81 79 82 80 mess->message.type = RBP_REF; 83 mess->message.obj_name = g_strdup (obj_name);81 mess->message.obj_name = (gchar *) obj_name; 84 82 85 83 mess->increase = increase; 86 84 87 return (mess);85 return mess; 88 86 } 89 87 … … 98 96 99 97 mess->message.type = RBP_QUERY; 100 mess->message.obj_name = g_strdup (obj_name);98 mess->message.obj_name = (gchar *) obj_name; 101 99 102 mess->query_type = g_strdup (query_type);103 mess->about = g_strdup (about);100 mess->query_type = (gchar *) query_type; 101 mess->about = (gchar *) about; 104 102 105 103 return mess; … … 111 109 const gchar *signal_name, 112 110 guint n_parameters, 113 GValue Array*values)111 GValue **values) 114 112 { 115 113 RbpMessageCallBack *mess; … … 117 115 118 116 mess->message.type = RBP_CALLBACK; 119 mess->message.obj_name = g_strdup(obj_name);120 121 mess->signal_name = g_strdup(signal_name);117 mess->message.obj_name = (gchar *) obj_name; 118 119 mess->signal_name = (gchar *) signal_name; 122 120 mess->n_parameters = n_parameters; 123 121 mess->values = values; 124 122 125 return (mess);123 return mess; 126 124 } 127 125 … … 130 128 rbp_message_info_create (const gchar *obj_name, 131 129 const gchar *info_type, 130 const gchar *info_detail, 132 131 guint n_values, 133 GValue Array*values)132 GValue **values) 134 133 { 135 134 RbpMessageInfo *mess; … … 137 136 138 137 mess->message.type = RBP_INFO; 139 mess->message.obj_name = g_strdup(obj_name); 140 141 mess->info_type = g_strdup(info_type); 138 mess->message.obj_name = (gchar *) obj_name; 139 140 mess->info_type = (gchar *) info_type; 141 mess->info_detail = (gchar *) info_detail; 142 142 mess->n_values = n_values; 143 143 mess->values = values; 144 144 145 return (mess); 146 } 147 148 145 return mess; 146 } 147 148 149 /* frees the message and its allocated members */ 149 150 void 150 151 rbp_message_destroy (RbpMessage *mess) 151 152 { 152 g_free (mess->obj_name); 153 g_free (mess); 154 } 155 156 157 /* frees the message only */ 158 void 159 rbp_message_destroy_with_contents (RbpMessage *mess) 160 { 161 guint i; 162 g_free (mess->obj_name); 153 163 154 164 switch (mess->type) { … … 156 166 RbpMessageCall *mess_call; 157 167 mess_call = (RbpMessageCall *) mess; 158 g_free(mess_call->method_name); 159 g_value_array_free(mess_call->values); 160 break; 168 g_free (mess_call->method_name); 169 for (i = 0; i < mess_call->n_parameters; i++) { 170 g_value_destroy (mess_call->values[i]); 171 } 172 g_free (mess_call->values); 173 break; 174 161 175 } case RBP_SET_DATA: { 162 176 RbpMessageData *mess_data; 163 177 mess_data = (RbpMessageData *) mess; 164 g_strfreev (mess_data->properties); 165 g_value_array_free(mess_data->values); 166 break; 178 for (i = 0; i < mess_data->n_properties; i++) { 179 g_free (mess_data->properties[i]); 180 g_value_destroy (mess_data->values[i]); 181 } 182 g_free (mess_data->properties); 183 g_free (mess_data->values); 184 break; 185 167 186 } case RBP_NEW: { 168 RbpMessageNew *mess_new;187 RbpMessageNew *mess_new; 169 188 mess_new = (RbpMessageNew *) mess; 170 g_free(mess_new->class_name); 171 g_strfreev(mess_new->properties); 172 g_value_array_free(mess_new->values); 173 break; 189 g_free (mess_new->class_name); 190 for (i = 0; i < mess_new->n_properties; i++) { 191 g_free (mess_new->properties[i]); 192 g_value_destroy (mess_new->values[i]); 193 } 194 g_free (mess_new->properties); 195 g_free (mess_new->values); 196 break; 197 174 198 } case RBP_REF: { 175 199 break; 200 176 201 } case RBP_QUERY: { 177 202 RbpMessageQuery *mess_query; 178 203 mess_query = (RbpMessageQuery *) mess; 179 g_free(mess_query->query_type); 180 g_free(mess_query->about); 181 break; 204 g_free (mess_query->query_type); 205 g_free (mess_query->about); 206 break; 207 182 208 } case RBP_CALLBACK: { 183 209 RbpMessageCallBack *mess_cb; 184 210 mess_cb = (RbpMessageCallBack *) mess; 185 g_free(mess_cb->signal_name); 186 g_value_array_free(mess_cb->values); 187 break; 211 g_free (mess_cb->signal_name); 212 for (i = 0; i < mess_cb->n_parameters; i++) { 213 g_value_destroy (mess_cb->values[i]); 214 } 215 g_free (mess_cb->values); 216 break; 217 188 218 } case RBP_INFO: { 189 219 RbpMessageInfo *mess_info; 190 220 mess_info = (RbpMessageInfo *) mess; 191 221 g_free(mess_info->info_type); 192 g_value_array_free(mess_info->values); 193 break; 222 g_free(mess_info->info_detail); 223 for (i = 0; i < mess_info->n_values; i++) { 224 g_value_destroy (mess_info->values[i]); 225 } 226 g_free (mess_info->values); 227 break; 228 194 229 } 195 230 default: 196 g_assert_not_reached ();231 g_assert_not_reached (); 197 232 } 198 233 g_free (mess); … … 211 246 gint i; 212 247 gchar *obj_name; 248 // gchar *str_tmp; 213 249 gshort a_short; 214 250 … … 224 260 pos = read_binary_to_short (mem, pos, &a_short); 225 261 mess_call->n_parameters = (gint) a_short; 226 mess_call->values = g_value_array_new(a_short + 1); 227 228 for (i = 0; i < mess_call->n_parameters; i++){ 262 263 if (mess_call->n_parameters > 0) 264 mess_call->values = g_new0 (GValue *, a_short); 265 266 for (i = 0; i < mess_call->n_parameters; i++) { 229 267 pos = read_binary_to_g_value (ptr, pos, &temp); 230 mess_call->values = g_value_array_append(mess_call->values, temp);268 mess_call->values[i] = temp; 231 269 } 232 270 … … 239 277 pos = read_binary_to_short (mem, pos, &a_short); 240 278 mess_data->n_properties = (gint) a_short; 241 mess_data->properties = g_new0 (gchar*, a_short + 1); 242 mess_data->values = g_value_array_new(a_short + 1); 243 244 for (i = 0; i < mess_data->n_properties; i++) { 279 280 if (mess_data->n_properties > 0) { 281 mess_data->properties = g_new0 (gchar*, a_short); 282 mess_data->values = g_new0 (GValue *, a_short); 283 } 284 285 for (i = 0; i < mess_data->n_properties; i++) 245 286 pos = read_binary_to_string (ptr, pos, &(mess_data->properties[i])); 246 }247 287 248 288 for (i = 0; i < mess_data->n_properties; i++) { 249 289 pos = read_binary_to_g_value (ptr, pos, &temp); 250 mess_data->values = g_value_array_append(mess_data->values, temp);290 mess_data->values[i] = temp; 251 291 } 252 292 … … 256 296 case RBP_NEW: { 257 297 RbpMessageNew *mess_new = g_new0 (RbpMessageNew, 1); 258 298 259 299 pos = read_binary_to_string (mem, pos, &(mess_new->class_name)); 260 300 pos = read_binary_to_short (mem, pos, &a_short); 261 301 262 302 mess_new->n_properties = (gint) a_short; 263 mess_new->properties = g_new0 (gchar*, a_short + 1); 264 mess_new->values = g_value_array_new(a_short + 1); 265 266 for (i = 0; i < mess_new->n_properties; i++) { 303 if (mess_new->n_properties > 0) { 304 mess_new->properties = g_new0 (gchar*, a_short); 305 mess_new->values = g_new0 (GValue *, a_short); 306 } 307 308 for (i = 0; i < mess_new->n_properties; i++) 267 309 pos = read_binary_to_string (ptr, pos, &(mess_new->properties[i])); 268 } 269 270 for (i = 0; i < mess_new->n_properties; i++){ 310 311 for (i = 0; i < mess_new->n_properties; i++){; 271 312 pos = read_binary_to_g_value (ptr, pos, &temp); 272 mess_new->values = g_value_array_append(mess_new->values, temp);313 mess_new->values[i] = temp; 273 314 } 274 315 … … 299 340 pos = read_binary_to_short (mem, pos, &a_short); 300 341 mess_cb->n_parameters = (gint) a_short; 301 mess_cb->values = g_value_array_new(a_short + 1); 342 343 if (mess_cb->n_parameters > 0) 344 mess_cb->values = g_new0 (GValue *, a_short); 302 345 303 346 for (i = 0; i < mess_cb->n_parameters; i++){ 304 347 pos = read_binary_to_g_value (ptr, pos, &temp); 305 mess_cb->values = g_value_array_append(mess_cb->values, temp); 306 g_free (temp); 348 mess_cb->values[i] = temp; 307 349 } 308 350 … … 314 356 315 357 pos = read_binary_to_string(mem, pos, &(mess_info->info_type)); 358 pos = read_binary_to_string(mem, pos, &(mess_info->info_detail)); 316 359 pos = read_binary_to_short (mem, pos, &a_short); 317 360 mess_info->n_values = (gint) a_short; 318 mess_info->values = g_value_array_new(a_short + 1); 361 362 if (mess_info->n_values > 0) 363 mess_info->values = g_new0 (GValue *, a_short); 319 364 320 365 for (i = 0; i < mess_info->n_values; i++){ 321 366 pos = read_binary_to_g_value (ptr, pos, &temp); 322 mess_info->values = g_value_array_append(mess_info->values, temp);367 mess_info->values[i] = temp; 323 368 } 324 369 … … 361 406 pos = write_short_to_binary (ptr, pos, (gshort) mess_call->n_parameters); 362 407 363 for (i = 0; i < mess_call->n_parameters; i++){ 364 pos = write_g_value_to_binary (ptr, pos, g_value_array_get_nth(mess_call->values, i)); 365 } 366 367 /*for (i = 0; i < mess_call->parameter_n; i++){ 368 pos = write_string_to_binary (ptr, pos, 369 g_value_array_get_nth (mess_data->properties, i)); 370 }*/ 408 for (i = 0; i < mess_call->n_parameters; i++) 409 pos = write_g_value_to_binary (ptr, pos, mess_call->values[i]); 410 371 411 break; 372 412 } case RBP_SET_DATA: { … … 374 414 pos = write_short_to_binary (ptr, pos, (gshort) mess_data->n_properties); 375 415 376 for (i = 0; i < mess_data->n_properties; i++) {416 for (i = 0; i < mess_data->n_properties; i++) 377 417 pos = write_string_to_binary (ptr, pos, mess_data->properties[i]); 378 } 379 380 for (i = 0; i < mess_data->n_properties; i++){ 381 pos = write_g_value_to_binary (ptr, pos, g_value_array_get_nth(mess_data->values, i)); 382 } 418 419 for (i = 0; i < mess_data->n_properties; i++) 420 pos = write_g_value_to_binary (ptr, pos, mess_data->values[i]); 421 383 422 break; 384 423 } case RBP_NEW: { … … 389 428 pos = write_short_to_binary (ptr, pos, mess_new->n_properties); 390 429 391 for (i = 0; i < mess_new->n_properties; i++) {430 for (i = 0; i < mess_new->n_properties; i++) 392 431 pos = write_string_to_binary (ptr, pos, mess_new->properties[i]); 393 } 394 395 for (i = 0; i < mess_new->n_properties; i++){ 396 pos = write_g_value_to_binary (ptr, pos, g_value_array_get_nth(mess_new->values, i)); 397 } 432 433 for (i = 0; i < mess_new->n_properties; i++) 434 pos = write_g_value_to_binary (ptr, pos, mess_new->values[i]); 435 398 436 break; 399 437 /*} case RBP_DESTROY: { … … 423 461 pos = write_short_to_binary (ptr, pos, (gshort) mess_cb->n_parameters); 424 462 425 for (i = 0; i < mess_cb->n_parameters; i++){ 426 pos = write_g_value_to_binary (ptr, pos, g_value_array_get_nth(mess_cb->values, i)); 427 } 428 429 /*for (i = 0; i < mess_call->parameter_n; i++){ 430 pos = write_string_to_binary (ptr, pos, 431 g_value_array_get_nth (mess_data->properties, i)); 432 }*/ 463 for (i = 0; i < mess_cb->n_parameters; i++) 464 pos = write_g_value_to_binary (ptr, pos, mess_cb->values[i]); 465 433 466 break; 434 467 } case RBP_INFO: { … … 437 470 438 471 pos = write_string_to_binary (ptr, pos, mess_info->info_type); 472 pos = write_string_to_binary (ptr, pos, mess_info->info_detail); 439 473 pos = write_short_to_binary (ptr, pos, (gshort) mess_info->n_values); 440 474 441 for (i = 0; i < mess_info->n_values; i++) {442 pos = write_g_value_to_binary (ptr, pos, g_value_array_get_nth(mess_info->values, i));443 } 475 for (i = 0; i < mess_info->n_values; i++) 476 pos = write_g_value_to_binary (ptr, pos, mess_info->values[i]); 477 444 478 break; 445 479 -
trunk/rgc/src/connection/rbp/rbp_message.h
r22 r289 24 24 guint type; 25 25 gchar *obj_name; 26 gboolean allocated; // gchar** and Values* must be freed 26 27 }; 27 28 … … 30 31 gchar *method_name; 31 32 guint n_parameters; 32 GValue Array*values;33 GValue **values; 33 34 }; 34 35 … … 37 38 guint n_properties; 38 39 gchar **properties; 39 GValue Array*values;40 GValue **values; 40 41 }; 41 42 … … 45 46 guint n_properties; 46 47 gchar **properties; 47 GValue Array*values;48 GValue **values; 48 49 }; 49 50 … … 63 64 gchar *signal_name; 64 65 guint n_parameters; 65 GValue Array*values;66 GValue **values; 66 67 }; 67 68 … … 69 70 RbpMessage message; 70 71 gchar *info_type; 72 gchar *info_detail; 71 73 guint n_values; 72 GValue Array*values;74 GValue **values; 73 75 }; 74 76 … … 76 78 RbpMessageCall * 77 79 rbp_message_call_create (const gchar *obj_name, 78 const gchar *method ,80 const gchar *method_name, 79 81 guint n_parameters, 80 GValue Array*values);82 GValue **values); 81 83 82 84 RbpMessageData * … … 84 86 guint n_properties, 85 87 gchar **properties, 86 GValue Array*values);88 GValue **values); 87 89 88 90 RbpMessageNew * … … 91 93 guint n_properties, 92 94 gchar **properties, 93 GValue Array*values);95 GValue **values); 94 96 95 97 RbpMessageRef * … … 106 108 const gchar *signal_name, 107 109 guint n_parameters, 108 GValue Array *parameters);110 GValue **values); 109 111 110 112 RbpMessageInfo * 111 113 rbp_message_info_create (const gchar *obj_name, 112 114 const gchar *info_type, 115 const gchar *info_detail, 113 116 guint n_values, 114 GValue Array*values);117 GValue **values); 115 118 116 119 // private … … 130 133 131 134 // private 132 /* Destroys a RbpMessage and frees all the memory associated with it. */133 135 void 134 136 rbp_message_destroy (RbpMessage *mess); 135 137 138 void 139 rbp_message_destroy_with_contents (RbpMessage *mess); 136 140 137 141 -
trunk/rgc/src/connection/rbp/rbp_message_execute_client.c
r283 r289 50 50 } 51 51 52 // g_print("<<< %s\n", rbp_message_to_string (mess));52 g_print("\033[1;31mCLIENT IN >>> %s\033[00m\n", rbp_message_to_string (mess)); 53 53 54 54 switch (mess->type) { 55 55 case RBP_CALLBACK: { 56 56 RbpMessageCallBack *mess_cb = (RbpMessageCallBack *) mess; 57 rgc_connection_client_callback (mess->obj_name,58 mess_cb->signal_name,59 mess_cb->n_parameters,60 mess_cb->values);57 rgc_connection_client_callback (mess->obj_name, 58 mess_cb->signal_name, 59 mess_cb->n_parameters, 60 mess_cb->values); 61 61 break; 62 62 } 63 63 case RBP_INFO: { 64 64 RbpMessageInfo *mess_info = (RbpMessageInfo *) mess; 65 rgc_connection_client_info(mess->obj_name, 66 mess_info->info_type, 67 mess_info->n_values, 68 mess_info->values); 65 rgc_connection_client_info (mess->obj_name, 66 mess_info->info_type, 67 mess_info->info_detail, 68 mess_info->n_values, 69 mess_info->values); 69 70 break; 70 71 } -
trunk/rgc/src/connection/rbp/rbp_message_execute_server.c
r286 r289 40 40 gpointer data) 41 41 { 42 g_print(" >>> %s\n", rbp_message_to_string (mess));42 g_print("\033[31mSERVER IN <<< %s\033[00m\n", rbp_message_to_string (mess)); 43 43 44 44 switch (mess->type) { -
trunk/rgc/src/connection/rbp/rbp_message_lowlevel.c
r285 r289 72 72 73 73 /* ... */ 74 /* FIXME: check ptr == NULL */75 74 inline gsize 76 75 write_string_to_binary (gchar *ptr, … … 78 77 gchar *string) 79 78 { 80 guint16 len = strlen (string); 79 guint16 len; 80 if (string) 81 len = strlen (string) + 1; 82 else 83 len = 0; 81 84 guint16 l = GINT16_TO_ORDER(len); 82 85 memcpy (ptr + pos, &l, sizeof (guint16)); 83 pos += sizeof (guint16); 84 85 memcpy (ptr + pos, string, len); 86 pos = pos + len + 1; 87 88 return (pos); 86 pos += sizeof (guint16); 87 88 if (string) { 89 memcpy (ptr + pos, string, len); 90 pos = pos + len; 91 } 92 93 return pos; 89 94 } 90 95 … … 202 207 /* ****************************************************** */ /* ? */ 203 208 guint16 val; 209 gchar *tmp = NULL; 204 210 memcpy (&val, ptr + pos, sizeof (guint16)); 205 211 guint16 len = GINT16_FROM_ORDER(val); 206 212 pos += sizeof (guint16); 207 213 208 gchar *tmp = g_new0 (gchar, len + 1); // we're losing memory 209 memcpy (tmp, ptr + pos, len); 210 pos += len + 1; 214 if (len) { 215 tmp = g_new0 (gchar, len); // we're losing memory 216 memcpy (tmp, ptr + pos, len); 217 pos += len; 218 } 211 219 212 220 *string = tmp; 213 return (pos);221 return pos; 214 222 } 215 223 -
trunk/rgc/src/connection/rbp/rbp_message_string.c
r22 r289 18 18 gchar *signal = NULL; 19 19 gchar *info = NULL; 20 gchar *detail = NULL; 20 21 gchar *class_name = NULL; 21 22 gchar *string = NULL; … … 35 36 36 37 for (i = 0; i < mess_call->n_parameters; i++) { 37 token = g_strdup_value_contents (g_value_array_get_nth(mess_call->values, i));38 token = g_strdup_value_contents (mess_call->values[i]); 38 39 new_string = g_strconcat (str_params, token, NULL); 39 40 g_free (str_params); … … 63 64 str_params = new_string; 64 65 65 token = g_strdup_value_contents ( g_value_array_get_nth(mess_data->values, i));66 token = g_strdup_value_contents (mess_data->values[i]); 66 67 new_string = g_strconcat (str_params, token, NULL); 67 68 g_free (str_params); … … 99 100 token = NULL; 100 101 101 token = g_strdup_value_contents ( g_value_array_get_nth(mess_new->values, i));102 token = g_strdup_value_contents (mess_new->values[i]); 102 103 new_string = g_strconcat (str_params, token, NULL); 103 104 g_free (token); … … 142 143 143 144 for (i = 0; i < mess_cb->n_parameters; i++) { 144 token = g_strdup_value_contents (g_value_array_get_nth(mess_cb->values, i));145 token = g_strdup_value_contents (mess_cb->values[i]); 145 146 new_string = g_strconcat (str_params, token, NULL); 146 147 g_free (str_params); … … 161 162 RbpMessageInfo *mess_info = (RbpMessageInfo *) mess; 162 163 info = mess_info->info_type; 164 detail = mess_info->info_detail; 163 165 164 166 str_params = g_strdup (""); 165 167 166 168 for (i = 0; i < mess_info->n_values; i++) { 167 token = g_strdup_value_contents (g_value_array_get_nth(mess_info->values, i));169 token = g_strdup_value_contents (mess_info->values[i]); 168 170 new_string = g_strconcat (str_params, token, NULL); 169 171 g_free (str_params); … … 178 180 } 179 181 180 string = g_strconcat ("info ", obj_name, " ", info, " (", str_params, ")", NULL);182 string = g_strconcat ("info ", obj_name, " ", info, " ", detail, " (", str_params, ")", NULL); 181 183 break; 182 184 } -
trunk/rgc/src/connection/rbp/rgc_protocol_rbp_client.c
r286 r289 76 76 guint parameters_n, 77 77 gchar **parameters, 78 GValue Array*values);78 GValue **values); 79 79 80 80 /*static void … … 92 92 const gchar *method_name, 93 93 guint parameters_n, 94 GValue Array*values);94 GValue **values); 95 95 96 96 static void … … 99 99 guint parameters_n, 100 100 gchar **parameters, 101 GValue Array*values);101 GValue **values); 102 102 103 103 static void … … 352 352 GError *error = NULL; 353 353 354 g_print (" <<< %s\n", rbp_message_to_string (mess));354 g_print ("\033[1;31mCLIENT OUT <<< %s\033[00m\n", rbp_message_to_string (mess)); 355 355 356 356 GIOStatus status; … … 384 384 guint parameters_n, 385 385 gchar **parameters, 386 GValue Array*values)386 GValue **values) 387 387 { 388 388 RbpMessage *mess = (RbpMessage *) rbp_message_new_create(obj_name, class_name, … … 412 412 const gchar *method_name, 413 413 guint parameters_n, 414 GValue Array*values)414 GValue **values) 415 415 { 416 416 RbpMessage *mess = (RbpMessage *) rbp_message_call_create(obj_name, method_name, … … 427 427 guint parameters_n, 428 428 gchar **parameters, 429 GValue Array*values)429 GValue **values) 430 430 { 431 431 RbpMessage *mess = (RbpMessage *) rbp_message_data_create(obj_name, parameters_n, -
trunk/rgc/src/connection/rbp/rgc_protocol_rbp_server.c
r286 r289 23 23 #include "../../../include/connection/rbp/rgc_protocol_rbp_server.h" 24 24 #include "../../../include/common/rgc_utils.h" 25 #include "../../common/rgc_utils.h" 25 26 #include "../rgc_protocol_server.h" 26 27 #include "rbp_message.h" 28 #include "rbp_message_string.h" 27 29 #include "rbp_message_execute_server.h" 28 30 #include "rgc_protocol_rbp_common.h" … … 82 84 const gchar *signal_name, 83 85 guint parameters_n, 84 GValue Array*values);86 GValue **values); 85 87 86 88 static void … … 95 97 const gchar *info_type, 96 98 guint n_values, 97 GValue Array*values);99 GValue **values); 98 100 99 101 static void … … 206 208 rgc_protocol_rbp_server_dispose (GObject *object) 207 209 { 208 g_print ("### rgc_protocol_rbp_server_dispose\n"); 210 g_print ("### rgc_protocol_rbp_server_dispose\n"); // FIXME: we sometimes get a segfault here (?????) 209 211 } 210 212 … … 356 358 priv->channels_cb_data = g_list_remove (priv->channels_cb_data, cb_data); 357 359 358 g_free (cb_data);360 // g_free (cb_data); // client->client_socket, already freed in rgc_protocol_rbp_server_stop() 359 361 } 360 362 … … 453 455 GIOStatus status; 454 456 457 g_print ("\033[31mSERVER OUT >>> %s\033[00m\n", rbp_message_to_string (mess)); 458 455 459 rbp_message_write(mess, &mem, &size); 460 //rgc_dump_binary (mem, size); 456 461 457 462 GList *temp = priv->channels_cb_data; … … 486 491 const gchar *signal_name, 487 492 guint parameters_n, 488 GValue Array*values)493 GValue **values) 489 494 { 490 495 RbpMessage *mess = (RbpMessage *) rbp_message_cb_create (obj_name, signal_name, … … 504 509 GValue *value) 505 510 { 506 GValueArray *array = g_value_array_new (2);507 GValue *val1 = g_value_init_string (g_strdup (property_name));508 array = g_value_array_append(array, val1); 509 array = g_value_array_append(array, value);510 511 RbpMessage *mess = (RbpMessage *) rbp_message_info_create (obj_name, "_NOTIFY", 2, array);511 // GValue *array = g_value_array_new (1); 512 /* GValue *val1 = g_value_init_string (g_strdup (property_name)); 513 array = g_value_array_append(array, val1);*/ 514 // array = g_value_array_append(array, value); 515 516 RbpMessage *mess = (RbpMessage *) rbp_message_info_create (obj_name, "_NOTIFY", property_name, 1, &value); 512 517 513 518 g_debug("server_property_changed... "); … … 523 528 const gchar *info_type, 524 529 guint n_values, 525 GValue Array*values)526 { 527 RbpMessage *mess = (RbpMessage *) rbp_message_info_create (obj_name, info_type, 530 GValue **values) 531 { 532 RbpMessage *mess = (RbpMessage *) rbp_message_info_create (obj_name, info_type, "", 528 533 n_values, values); 529 534 … … 540 545 const gchar *requested_name) 541 546 { 542 GValue Array *array = g_value_array_new(3);543 GValue *val1 = g_value_init_string (obj_name);544 GValue *val2 = g_value_init_string (class_name);545 GValue *val3 = g_value_init_string (requested_name);546 array = g_value_array_append(array, val1);547 array = g_value_array_append(array, val2);548 array = g_value_array_append(array, val3);549 550 RbpMessage *mess = (RbpMessage *) rbp_message_info_create ("_RGC_OBJECTS", "object_created", 3, array);547 GValue **values = g_new0 (GValue *, 3); 548 GValue *val1 = g_value_init_string (obj_name); 549 GValue *val2 = g_value_init_string (class_name); 550 GValue *val3 = g_value_init_string (requested_name); 551 values[0] = val1; 552 values[1] = val2; 553 values[2] = val3; 554 555 RbpMessage *mess = (RbpMessage *) rbp_message_info_create ("_RGC_OBJECTS", "object_created", "", 3, values); 551 556 rgc_protocol_rbp_server_send_message(RGC_PROTOCOL_RBP_SERVER(prot), mess); 552 557 rbp_message_destroy(mess); 553 558 554 /* g_value_array_free(array);555 g_free(val1); 556 g_free(val2);557 g_free(val3);*/ 559 guint i; 560 for (i = 0; i < 3; i++) 561 g_value_destroy (values[i]); 562 g_free (values); 558 563 } 559 564 -
trunk/rgc/src/connection/rgc_connection_client.c
r288 r289 66 66 guint n_parameters, 67 67 gchar **parameters, 68 GValue Array*values)68 GValue **values) 69 69 { 70 70 g_return_if_fail(protocol_client); … … 90 90 const gchar *method_name, 91 91 guint n_parameters, 92 GValue Array*values)92 GValue **values) 93 93 { 94 94 g_return_if_fail(protocol_client); … … 104 104 guint n_properties, 105 105 gchar **properties, 106 GValue Array*values)106 GValue **values) 107 107 { 108 108 g_return_if_fail(protocol_client); … … 143 143 const gchar *signal_name, 144 144 guint n_parameters, 145 GValue Array*values)145 GValue **values) 146 146 { 147 147 RgcCallback *cb = rgc_callback_lookup_by_name (obj_name, signal_name); 148 148 if (cb) 149 rgc_callback_call (cb, values);149 rgc_callback_call (cb, n_parameters, values); 150 150 else 151 151 g_print (" Callback for signal \"%s\" from object \"%s\" not registered\n", … … 157 157 rgc_connection_client_info (const gchar *obj_name, 158 158 const gchar *info_type, 159 const gchar *info_detail, 159 160 guint n_values, 160 GValue Array*values)161 GValue **values) 161 162 { 162 163 /*RgcInfoEvent *event = rgc_info_event_lookup_by_name (obj_name, info_type); … … 167 168 info_type, obj_name);*/ 168 169 169 rgc_info_cb_execute (obj_name, info_type, n_values, values->values);170 rgc_info_cb_execute (obj_name, info_type, info_detail, n_values, values); 170 171 } -
trunk/rgc/src/connection/rgc_connection_client.h
r283 r289 7 7 guint n_parameters, 8 8 gchar **parameters, 9 GValue Array*values);9 GValue **values); 10 10 11 11 /*void … … 16 16 const gchar *method_name, 17 17 guint n_parameters, 18 GValue Array*values);18 GValue **values); 19 19 20 20 … … 23 23 guint n_properties, 24 24 gchar **properties, 25 GValue Array*values);25 GValue **values); 26 26 27 27 void … … 41 41 const gchar *signal_name, 42 42 guint n_parameters, 43 GValue Array*values);43 GValue **values); 44 44 45 45 void 46 46 rgc_connection_client_info (const gchar *obj_name, 47 47 const gchar *info_type, 48 const gchar *info_detail, 48 49 guint n_values, 49 GValue Array*values);50 GValue **values); -
trunk/rgc/src/connection/rgc_connection_server.c
r286 r289 46 46 rgc_protocol_server_stop (prot); 47 47 // g_print ("prot %p unref\n", prot); 48 g_object_unref (G_OBJECT (prot)); 48 g_object_unref (G_OBJECT (prot)); // FIXME: we sometimes get a segfault here 49 49 // g_print ("next\n"); 50 50 temp = temp->next; … … 152 152 const gchar *signal_name, 153 153 guint n_parameters, 154 GValue Array*values)154 GValue **values) 155 155 { 156 156 GList *temp = protocol_list; … … 186 186 const gchar *info_type, 187 187 guint n_values, 188 GValue Array*values)188 GValue **values) 189 189 { 190 190 GList *temp = protocol_list; … … 206 206 guint n_parameters, 207 207 gchar **parameters, 208 GValue Array*values)208 GValue **values) 209 209 { 210 210 GParameter *param = g_new (GParameter, n_parameters); … … 213 213 for (i = 0; i < n_parameters; i++) { 214 214 param[i].name = parameters[i]; 215 param[i].value = *(g_value_array_get_nth (values, i));215 memcpy (&(param[i].value), values[i], sizeof (GValue)); 216 216 } 217 217 … … 248 248 const gchar *method_name, 249 249 guint n_parameters, 250 GValue Array *array)250 GValue **values) 251 251 { 252 252 GObject *obj = rgc_object_get_from_name (obj_name); … … 263 263 g_return_if_fail (method); 264 264 265 GValue **values = g_new(GValue*, n_parameters);265 /*GValue **values = g_new(GValue*, n_parameters); 266 266 guint i; 267 267 for (i = 0; i < n_parameters; i++) 268 values[i] = g_value_array_get_nth(array, i);268 values[i] = array[i];*/ 269 269 270 270 (*method->c_marshaller) (obj, method->n_params, values, … … 281 281 guint n_properties, 282 282 gchar **properties, 283 GValue Array*values)283 GValue **values) 284 284 { 285 285 GObject *obj = rgc_object_get_from_name (obj_name); … … 289 289 guint i; 290 290 for (i = 0; i < n_properties; i++) { 291 g_object_set_property (obj, properties[i], g_value_array_get_nth (values, i));291 g_object_set_property (obj, properties[i], values[i]); 292 292 g_debug ("Set property \"%s\" on object \"%s\"\n", properties[i], obj_name); 293 293 } … … 309 309 //rgc_info_server_info() // ????????????? 310 310 311 GValue *name = g_new0 (GValue, 1);311 /*GValue *name = g_new0 (GValue, 1); 312 312 GValue *desc = g_new0 (GValue, 1); 313 313 name = g_value_init (name, G_TYPE_STRING); 314 314 desc = g_value_init (desc, G_TYPE_STRING); 315 315 g_value_set_string (name, _rgc_server_name); 316 g_value_set_string (desc, _rgc_server_desc); 317 318 GValueArray *arr = g_value_array_new (2); 319 arr = g_value_array_append (arr, name); 320 arr = g_value_array_append (arr, desc); 321 322 rgc_connection_server_send_info ("_RGC_INTERNAL", "QUERY_SERVER_INFO", 323 arr->n_values, arr); 324 325 g_value_unset (name); 326 g_value_unset (desc); 316 g_value_set_string (desc, _rgc_server_desc);*/ 317 GValue *name = g_value_init_string (_rgc_server_name); 318 GValue *desc = g_value_init_string (_rgc_server_desc); 319 320 GValue **values = g_new0 (GValue *, 2); 321 values[0] = name; 322 values[1] = desc; 323 324 rgc_connection_server_send_info ("_RGC_INTERNAL", "QUERY_SERVER_INFO", 2, values); 325 326 g_value_destroy (name); 327 g_value_destroy (desc); 328 g_free (values); 327 329 328 330 -
trunk/rgc/src/connection/rgc_connection_server.h
r288 r289 29 29 const gchar *signal_name, 30 30 guint n_parameters, 31 GValue Array*values);31 GValue **values); 32 32 33 33 void … … 40 40 const gchar *info_type, 41 41 guint n_values, 42 GValue Array*values);42 GValue **values); 43 43 44 44 … … 50 50 guint n_parameters, 51 51 gchar **parameters, 52 GValue Array*values);52 GValue **values); 53 53 54 54 /*void … … 63 63 const gchar *method_name, 64 64 guint n_parameters, 65 GValue Array*values);65 GValue **values); 66 66 67 67 void … … 69 69 guint n_parameters, 70 70 gchar **parameters, 71 GValue Array*values);71 GValue **values); 72 72 73 73 void -
trunk/rgc/src/connection/rgc_protocol_client.c
r3 r289 115 115 guint parameters_n, 116 116 gchar **parameters, 117 GValue Array*values)117 GValue **values) 118 118 { 119 119 RgcProtocolClientClass *class = RGC_PROTOCOL_CLIENT_GET_CLASS(prot); … … 159 159 const gchar *method_name, 160 160 guint parameters_n, 161 GValue Array*values)161 GValue **values) 162 162 { 163 163 RgcProtocolClientClass *class = RGC_PROTOCOL_CLIENT_GET_CLASS(prot); … … 175 175 guint parameters_n, 176 176 gchar **parameters, 177 GValue Array*values)177 GValue **values) 178 178 { 179 179 RgcProtocolClientClass *class = RGC_PROTOCOL_CLIENT_GET_CLASS(prot); -
trunk/rgc/src/connection/rgc_protocol_client.h
r3 r289 11 11 guint parameters_n, 12 12 gchar **parameters, 13 GValue Array*values);13 GValue **values); 14 14 15 15 /*void … … 27 27 const gchar *method_name, 28 28 guint parameters_n, 29 GValue Array*values);29 GValue **values); 30 30 31 31 void … … 34 34 guint parameters_n, 35 35 gchar **parameters, 36 GValue Array*values);36 GValue **values); 37 37 38 38 void -
trunk/rgc/src/connection/rgc_protocol_server.c
r286 r289 97 97 const gchar *signal_name, 98 98 guint parameters_n, 99 GValue Array*values)99 GValue **values) 100 100 { 101 101 RgcProtocolServerClass *klass = RGC_PROTOCOL_SERVER_GET_CLASS (prot); … … 130 130 const gchar *info_type, 131 131 guint n_values, 132 GValue Array*values)132 GValue **values) 133 133 { 134 134 RgcProtocolServerClass *klass = RGC_PROTOCOL_SERVER_GET_CLASS (prot); -
trunk/rgc/src/connection/rgc_protocol_server.h
r286 r289 14 14 const gchar *signal_name, 15 15 guint parameters_n, 16 GValue Array*values);16 GValue **values); 17 17 18 18 void … … 27 27 const gchar *info_type, 28 28 guint n_values, 29 GValue Array*values);29 GValue **values); 30 30 31 31 -
trunk/rgc/src/server/rgc_signal.c
r283 r289 177 177 } 178 178 179 rgc_connection_server_send_signal(obj_name, signal_name, parameters->n_values, parameters); 179 GValue **values = g_new0 (GValue*, parameter_n); 180 guint i; 181 for (i = 0; i < parameter_n; i++) 182 values[i] = parameters->values + i; 183 184 rgc_connection_server_send_signal (obj_name, signal_name, parameter_n, values); 180 185 } 181 186 -
trunk/rgc/test/Makefile.am
r286 r289 1 1 AM_CFLAGS = @RGC_TEST_CFLAGS@ @CHECK_CFLAGS@ @GNET_CFLAGS@ 2 3 AM_LDFLAGS = -static 2 4 3 5 … … 7 9 perf_test \ 8 10 client_query \ 11 check_rbp \ 9 12 check_init \ 10 13 check_remote_obj \ … … 22 25 perf_test_SOURCES = \ 23 26 perf_test.c 27 28 client_query_SOURCES = \ 29 client_query.c 24 30 25 31 … … 39 45 @GNET_LIBS@ 40 46 41 42 client_query_SOURCES = \43 client_query.c44 45 47 client_query_LDADD = \ 46 48 ../src/librgc_client.la \ … … 49 51 50 52 53 TESTS_ENVIRONMENT = MALLOC_CHECK_=2 G_SLICE=debug-blocks 51 54 52 TESTS = check_ init check_remote_obj check_query55 TESTS = check_rbp check_init check_remote_obj check_query 53 56 57 58 check_rbp_SOURCES = \ 59 check_rbp.c 60 61 check_rbp_LDADD = \ 62 ../src/librgc_client.la \ 63 @RGC_TEST_LIBS@ \ 64 @GNET_LIBS@ \ 65 @CHECK_LIBS@ 54 66 55 67 check_init_SOURCES = \ … … 104 116 new_server.output \ 105 117 new_client_async.output 118 119 AM_CPPFLAGS = -
trunk/rgc/test/Makefile.in
r287 r289 34 34 host_triplet = @host@ 35 35 noinst_PROGRAMS = new_server$(EXEEXT) new_client_async$(EXEEXT) \ 36 perf_test$(EXEEXT) client_query$(EXEEXT) check_init$(EXEEXT) \ 36 perf_test$(EXEEXT) client_query$(EXEEXT) check_rbp$(EXEEXT) \ 37 check_init$(EXEEXT) check_remote_obj$(EXEEXT) \ 38 check_query$(EXEEXT) 39 TESTS = check_rbp$(EXEEXT) check_init$(EXEEXT) \ 37 40 check_remote_obj$(EXEEXT) check_query$(EXEEXT) 38 TESTS = check_init$(EXEEXT) check_remote_obj$(EXEEXT) \39 check_query$(EXEEXT)40 41 subdir = test 41 42 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in … … 67 68 check_query_DEPENDENCIES = ../src/librgc_server.la \ 68 69 ../src/librgc_client.la 70 am_check_rbp_OBJECTS = check_rbp.$(OBJEXT) 71 check_rbp_OBJECTS = $(am_check_rbp_OBJECTS) 72 check_rbp_DEPENDENCIES = ../src/librgc_client.la 69 73 am_check_remote_obj_OBJECTS = object1.$(OBJEXT) check_shared.$(OBJEXT) \ 70 74 check_remote_obj.$(OBJEXT) … … 97 101 $(LDFLAGS) -o $@ 98 102 SOURCES = $(check_init_SOURCES) $(check_query_SOURCES) \ 99 $(check_r emote_obj_SOURCES) $(client_query_SOURCES) \100 $( new_client_async_SOURCES) $(new_server_SOURCES) \101 $( perf_test_SOURCES)103 $(check_rbp_SOURCES) $(check_remote_obj_SOURCES) \ 104 $(client_query_SOURCES) $(new_client_async_SOURCES) \ 105 $(new_server_SOURCES) $(perf_test_SOURCES) 102 106 DIST_SOURCES = $(check_init_SOURCES) $(check_query_SOURCES) \ 103 $(check_r emote_obj_SOURCES) $(client_query_SOURCES) \104 $( new_client_async_SOURCES) $(new_server_SOURCES) \105 $( perf_test_SOURCES)107 $(check_rbp_SOURCES) $(check_remote_obj_SOURCES) \ 108 $(client_query_SOURCES) $(new_client_async_SOURCES) \ 109 $(new_server_SOURCES) $(perf_test_SOURCES) 106 110 ETAGS = etags 107 111 CTAGS = ctags … … 279 283 top_srcdir = @top_srcdir@ 280 284 AM_CFLAGS = @RGC_TEST_CFLAGS@ @CHECK_CFLAGS@ @GNET_CFLAGS@ 285 AM_LDFLAGS = -static 281 286 new_server_SOURCES = \ 282 287 object1.c \ … … 290 295 perf_test.c 291 296 297 client_query_SOURCES = \ 298 client_query.c 299 292 300 new_server_LDADD = \ 293 301 ../src/librgc_server.la \ … … 305 313 @GNET_LIBS@ 306 314 307 client_query_SOURCES = \308 client_query.c309 310 315 client_query_LDADD = \ 311 316 ../src/librgc_client.la \ 312 317 @RGC_TEST_LIBS@ \ 313 318 @GNET_LIBS@ 319 320 TESTS_ENVIRONMENT = MALLOC_CHECK_=2 G_SLICE=debug-blocks 321 check_rbp_SOURCES = \ 322 check_rbp.c 323 324 check_rbp_LDADD = \ 325 ../src/librgc_client.la \ 326 @RGC_TEST_LIBS@ \ 327 @GNET_LIBS@ \ 328 @CHECK_LIBS@ 314 329 315 330 check_init_SOURCES = \ … … 361 376 new_client_async.output 362 377 378 AM_CPPFLAGS = 363 379 all: all-am 364 380 … … 407 423 @rm -f check_query$(EXEEXT) 408 424 $(LINK) $(check_query_OBJECTS) $(check_query_LDADD) $(LIBS) 425 check_rbp$(EXEEXT): $(check_rbp_OBJECTS) $(check_rbp_DEPENDENCIES) 426 @rm -f check_rbp$(EXEEXT) 427 $(LINK) $(check_rbp_OBJECTS) $(check_rbp_LDADD) $(LIBS) 409 428 check_remote_obj$(EXEEXT): $(check_remote_obj_OBJECTS) $(check_remote_obj_DEPENDENCIES) 410 429 @rm -f check_remote_obj$(EXEEXT) … … 431 450 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init.Po@am__quote@ 432 451 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_query.Po@am__quote@ 452 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_rbp.Po@am__quote@ 433 453 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_remote_obj.Po@am__quote@ 434 454 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_shared.Po@am__quote@ -
trunk/rgc/test/check_query.c
r288 r289 50 50 //for (i = 0; i < N_QUERY; i++) { 51 51 rgc_query_server_info (server_info_cb, random_ptr); 52 rgc_info_table_dump (); 52 53 //} 53 54 } -
trunk/rgc/test/check_remote_obj.c
r288 r289 103 103 handler_id = g_signal_connect (G_OBJECT (server_obj), "notify::gain", G_CALLBACK (gain_changed_cb), &new_gain); 104 104 105 rgc_info_table_dump (); 106 105 107 GValue *value = g_value_init_float (new_gain); 106 108 rgc_remote_object_set (obj, "gain", value, NULL);
