dbus/test/glib/Makefile.am
Colin Walters 949436ffac 2005-06-17 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
	spew warnings if we get malformed remote signals.

	* glib/dbus-gobject.c (propsig_iterate): New function.
	(lookup_object_info): New function, extracted from
	lookup_object_and_method.
	(introspect_properties, introspect_signals): Delete; these
	are merged into write_interface.
	(write_interface): Write out signals and properties here;
	dump the org.gtk.object stuff and use the interface given
	in the introspection data blob.  Also fix up property XML.
	(lookup_values): New function.
	(introspect_interfaces): Gather a mapping from interface to a
	list of its methods, signals, and properties, then write out
	each interface.
	(lookup_object_and_method): Use lookup_object_info.
	(struct DBusGSignalClosure): Add interface.
	(dbus_g_signal_closure_new): Add interface. Don't dup signame;
	we can just use the constant data.
	(dbus_g_signal_closure_finalize): Don't free signal name.
	(signal_emitter_marshaller): Use interface from signal closure.
	(export_signals): Only export signals mentioned in introspection
	blob.
	(dbus_g_connection_register_g_object): Warn if we have no
	introspection data for an object.
	(funcsig_equal): Remove unused variable.
	(dbus_g_object_register_marshaller): Take varargs instead of
	list.
	(dbus_g_object_register_marshaller_array): New function,
	extracted from old dbus_g_object_register_marshaller.

	* glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
	signals and property data.
	(write_quoted_string): New function, extracted from generate_glue.
	(generate_glue): Write signals and properties to introspection
	blob.

	* dbus/dbus-glib.h (struct DBusGObjectInfo): Include
	exported_signals and exported_properties.
	(dbus_g_object_register_marshaller): Update prototype.
	(dbus_g_object_register_marshaller_array): Prototype.

	* test/glib/test-dbus-glib.c: Extend testing to cover new signals.

	* test/glib/test-service-glib.c: Add new test signals and method
	to emit them.

	* test/glib/test-service-glib.xml: Add some test signals.

	* test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
	and my-object-marshal.h
	(test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
	my-object-marshal.c.
	(my-object-marshal.c, my-object-marshal.h): Implement.

	* test/glib/.cvsignore: Update.

	* doc/TODO: Remove two GLib TODO items fixed by this
	patch.
2005-06-17 14:29:48 +00:00

80 lines
2.6 KiB
Makefile

INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDBUS_COMPILATION
## 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= \
my-object-marshal.c \
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
BUILT_SOURCES = test-service-glib-glue.h test-service-glib-bindings.h my-object-marshal.c my-object-marshal.h
test_service_glib_SOURCES= \
my-object-marshal.c \
test-service-glib.c
test-service-glib-glue.h: test-service-glib.xml $(top_builddir)/glib/dbus-binding-tool
$(top_builddir)/glib/dbus-binding-tool --prefix=my_object --mode=glib-server --output=test-service-glib-glue.h $(srcdir)/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 --prefix=my_object --mode=glib-client --output=test-service-glib-bindings.h $(srcdir)/test-service-glib.xml
my-object-marshal.c: Makefile my-object-marshal.list
@GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header --body > my-object-marshal.c
my-object-marshal.h: Makefile my-object-marshal.list
@GLIB_GENMARSHAL@ --prefix=my_object_marshal $(srcdir)/my-object-marshal.list --header > my-object-marshal.h
CLEANFILES = $(BUILT_SOURCES)
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