mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-06-06 22:58:21 +02:00
* 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.
71 lines
2 KiB
Makefile
71 lines
2 KiB
Makefile
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS)
|
|
|
|
## note that TESTS has special meaning (stuff to use in make check)
|
|
## so if adding tests not to be run in make check, don't add them to
|
|
## TESTS
|
|
if DBUS_BUILD_TESTS
|
|
TESTS_ENVIRONMENT=DBUS_TOP_BUILDDIR=$(ABSOLUTE_TOP_BUILDDIR)
|
|
TESTS=run-test.sh
|
|
else
|
|
TESTS=
|
|
endif
|
|
|
|
EXTRA_DIST=run-test.sh test-service-glib.xml
|
|
|
|
if DBUS_BUILD_TESTS
|
|
|
|
if HAVE_GLIB_THREADS
|
|
THREAD_APPS=test-thread-server test-thread-client test-profile
|
|
|
|
test_thread_server_SOURCES= \
|
|
test-thread-server.c \
|
|
test-thread.h
|
|
|
|
test_thread_server_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
|
|
test_thread_client_SOURCES= \
|
|
test-thread-client.c \
|
|
test-thread.h
|
|
|
|
test_thread_client_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
endif
|
|
|
|
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
|
|
## build even when not doing "make check"
|
|
noinst_PROGRAMS= test-dbus-glib test-service-glib $(THREAD_APPS)
|
|
|
|
test_dbus_glib_SOURCES= \
|
|
test-dbus-glib.c
|
|
|
|
test_dbus_glib_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(top_builddir)/glib/libdbus-glib-1.la $(top_builddir)/glib/libdbus-gtool.la
|
|
|
|
test_service_glib_SOURCES= \
|
|
test-service-glib.c
|
|
|
|
BUILT_SOURCES = test-service-glib-glue.h test-service-glib-bindings.h
|
|
|
|
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 $(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
|
|
|
|
test_service_glib_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
|
|
|
|
else
|
|
### not building tests
|
|
|
|
if HAVE_GLIB_THREADS
|
|
noinst_PROGRAMS=test-profile
|
|
endif
|
|
|
|
endif
|
|
|
|
if HAVE_GLIB_THREADS
|
|
test_profile_SOURCES= \
|
|
test-profile.c
|
|
|
|
test_profile_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la
|
|
endif
|