dbus/test/test-utils.h
Simon McVittie dbd731491b tests: always use libdbus-internal for main loop, never dbus-glib
This gets rid of a potential circular dependency, which is annoying
when bootstrapping. It is nice to have the regression tests use
the shared libdbus, but we're about to make it possible to
do that anyway, even though some of them use internal symbols.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-02-20 20:49:32 +00:00

31 lines
1.3 KiB
C

#ifndef TEST_UTILS_H
#define TEST_UTILS_H
#include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus.h>
#include <dbus/dbus-mainloop.h>
#include <dbus/dbus-internals.h>
typedef DBusLoop TestMainContext;
TestMainContext *test_main_context_get (void);
TestMainContext *test_main_context_ref (TestMainContext *ctx);
void test_main_context_unref (TestMainContext *ctx);
void test_main_context_iterate (TestMainContext *ctx,
dbus_bool_t may_block);
dbus_bool_t test_connection_setup (TestMainContext *ctx,
DBusConnection *connection);
void test_connection_shutdown (TestMainContext *ctx,
DBusConnection *connection);
dbus_bool_t test_server_setup (TestMainContext *ctx,
DBusServer *server);
void test_server_shutdown (TestMainContext *ctx,
DBusServer *server);
void test_pending_call_store_reply (DBusPendingCall *pc,
void *data);
#endif