dbus/test/glib test-dbus-glib.c,1.15,1.16 Makefile.am,1.10,1.11
Colin Walters
walters at freedesktop.org
Wed Mar 9 09:09:13 PST 2005
- Previous message: dbus/mono Arguments.cs, 1.9, 1.10 Bus.cs, 1.1, 1.2 Connection.cs,
1.12, 1.13 Handler.cs, 1.7, 1.8 Message.cs, 1.10,
1.11 ProxyBuilder.cs, 1.5, 1.6 Service.cs, 1.10, 1.11
- Next message: dbus/glib dbus-gvalue.h, 1.3, 1.4 dbus-gvalue.c, 1.7,
1.8 dbus-gproxy.c, 1.23, 1.24 dbus-binding-tool-glib.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/dbus/dbus/test/glib
In directory gabe:/tmp/cvs-serv11593/test/glib
Modified Files:
test-dbus-glib.c Makefile.am
Log Message:
2005-03-09 Colin Walters <walters at verbum.org>
* glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
to this are generated for client-side wrappers. Invokes a
D-BUS method and returns reply values.
* glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
function; writes signature string for argument direction.
(write_args_for_direction): Change to pass input values directly
instead of via address, and fix indentation.
(generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
make generated wrappers inlineable.
* dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
note about using dbus_type_is_fixed.
* dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
dbus/dbus-signature.c as dbus_type_is_fixed.
All callers updated.
* dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
* dbus/dbus-signature.h: Prototype.
* glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
error printf code.
* test/glib/test-dbus-glib.c (main): Be sure to clear error as
appropriate instead of just freeing it.
(main): Free returned strings using g_free.
* test/glib/Makefile.am (test-service-glib-glue.h)
(test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
* glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
simply maps a simple D-BUS type to GType.
(dbus_dbus_type_to_gtype): Function which maps D-BUS type to
GType.
(dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
initialize the value with it.
(dbus_gvalue_binding_type_from_type): Unused, delete.
(dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
various types instead of unmarshalling to value data directly.
Remove can_convert boolean.
(dbus_gvalue_marshal): Remove duplicate initialization; switch to
returning directly instead of using can_convert boolean.
(dbus_gvalue_store): New function; not related to D-BUS per-se.
Stores a GValue in a pointer to a value of its corresponding C
type.
* glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
add dbus_gvalue_store.
Index: test-dbus-glib.c
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/test-dbus-glib.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- test-dbus-glib.c 2 Mar 2005 04:15:43 -0000 1.15
+++ test-dbus-glib.c 9 Mar 2005 17:09:11 -0000 1.16
@@ -267,7 +267,7 @@
lose ("ThrowError call unexpectedly succeeded!");
g_print ("ThrowError failed (as expected) returned error: %s\n", error->message);
- g_error_free (error);
+ g_clear_error (&error);
v_STRING = "foobar";
call = dbus_g_proxy_begin_call (proxy, "Uppercase",
@@ -313,12 +313,13 @@
lose ("(wrapped) ThrowError call unexpectedly succeeded!");
g_print ("(wrapped) ThrowError failed (as expected) returned error: %s\n", error->message);
- g_error_free (error);
+ g_clear_error (&error);
if (!org_freedesktop_DBus_Tests_MyObject_uppercase (proxy, "foobar", &v_STRING_2, &error))
lose_gerror ("Failed to complete (wrapped) Uppercase call", error);
if (strcmp ("FOOBAR", v_STRING_2) != 0)
lose ("(wrapped) Uppercase call returned unexpected string %s", v_STRING_2);
+ g_free (v_STRING_2);
if (!org_freedesktop_DBus_Tests_MyObject_many_args (proxy, 26, "bazwhee", G_PI,
&v_DOUBLE_2, &v_STRING_2, &error))
@@ -330,6 +331,7 @@
if (strcmp ("BAZWHEE", v_STRING_2) != 0)
lose ("(wrapped) ManyArgs call returned unexpected string %s", v_STRING_2);
+ g_free (v_STRING_2);
g_object_unref (G_OBJECT (proxy));
Index: Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Makefile.am 2 Mar 2005 04:15:43 -0000 1.10
+++ Makefile.am 9 Mar 2005 17:09:11 -0000 1.11
@@ -44,10 +44,10 @@
BUILT_SOURCES = test-service-glib-glue.h test-service-glib-bindings.h
-test-service-glib-glue.h: test-service-glib.xml
+test-service-glib-glue.h: test-service-glib.xml $(top_builddir)/glib/dbus-binding-tool
$(top_builddir)/glib/dbus-binding-tool --mode=glib-server --output=test-service-glib-glue.h test-service-glib.xml
-test-service-glib-bindings.h: test-service-glib.xml
+test-service-glib-bindings.h: test-service-glib.xml $(top_builddir)/glib/dbus-binding-tool
$(top_builddir)/glib/dbus-binding-tool --mode=glib-client --output=test-service-glib-bindings.h test-service-glib.xml
CLEANFILES = test-service-glib-glue.h test-service-glib-bindings.h
- Previous message: dbus/mono Arguments.cs, 1.9, 1.10 Bus.cs, 1.1, 1.2 Connection.cs,
1.12, 1.13 Handler.cs, 1.7, 1.8 Message.cs, 1.10,
1.11 ProxyBuilder.cs, 1.5, 1.6 Service.cs, 1.10, 1.11
- Next message: dbus/glib dbus-gvalue.h, 1.3, 1.4 dbus-gvalue.c, 1.7,
1.8 dbus-gproxy.c, 1.23, 1.24 dbus-binding-tool-glib.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dbus-commit
mailing list