[folks] tests: Fix build errors in gtestdbus.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] tests: Fix build errors in gtestdbus.c
- Date: Sun, 16 Feb 2014 23:53:07 +0000 (UTC)
commit 362de38b3ff0bed45f7554cf0ae59a7ebce83bf1
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Feb 16 17:17:25 2014 +0000
tests: Fix build errors in gtestdbus.c
This changes the pristine GLib-copied version of the file to something
which compiles locally, and renames it to FolksTestDBus.
tests/lib/Makefile.am | 3 +-
tests/lib/folks-test-dbus.vapi | 50 ++
tests/lib/gioenums.h | 1763 ----------------------------------------
tests/lib/giotypes.h | 535 ------------
tests/lib/gtestdbus.c | 226 +++---
tests/lib/gtestdbus.h | 62 +-
6 files changed, 210 insertions(+), 2429 deletions(-)
---
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index a42c8c6..233a754 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -43,7 +43,6 @@ libfolks_test_la_SOURCES = \
haze-remove-directory.c \
gtestdbus.c \
gtestdbus.h \
- gioenums.h \
test-case.vala \
test-case-helper.c \
test-utils.vala \
@@ -84,12 +83,14 @@ libfolks_test_la_VALAFLAGS = \
$(ERROR_VALAFLAGS) \
--vapidir=$(abs_top_srcdir)/folks \
--vapidir=$(abs_top_builddir)/folks \
+ --vapidir=$(abs_top_srcdir)/tests/lib \
--pkg gobject-2.0 \
--pkg gio-2.0 \
--pkg gee-0.8 \
--pkg dbus-glib-1 \
--pkg folks \
--pkg build-conf \
+ --pkg folks-test-dbus \
--library folks-test \
--vapi folks-test.vapi \
-H folks-test.h \
diff --git a/tests/lib/folks-test-dbus.vapi b/tests/lib/folks-test-dbus.vapi
new file mode 100644
index 0000000..59989f0
--- /dev/null
+++ b/tests/lib/folks-test-dbus.vapi
@@ -0,0 +1,50 @@
+/*
+ * folks-test-dbus.vapi — a tweaked copy of GTestDBus wrapped in Vala
+ *
+ * Copyright © 2014 Philip Withnall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Authors:
+ * Philip Withnall <philip tecnocode co uk>
+ */
+
+[CCode (gir_namespace = "Folks", gir_version = "0.6")]
+namespace Folks
+{
+ [CCode (cheader_filename = "gtestdbus.h", cprefix = "FOLKS_TEST_DBUS_")]
+ [Flags]
+ public enum TestDBusFlags {
+ NONE
+ }
+
+ [CCode (cheader_filename = "gtestdbus.h")]
+ public class TestDBus : GLib.Object
+ {
+ [CCode (has_construct_function = false)]
+ public TestDBus (Folks.TestDBusFlags flags);
+ public void add_service_dir (string path);
+ public void down ();
+ public unowned string get_bus_address ();
+ public Folks.TestDBusFlags get_flags ();
+ public void stop ();
+ public static void unset ();
+ public void up ();
+ public Folks.TestDBusFlags flags { get; construct; }
+ }
+}
+
+/* vim:set ft=vala: */
diff --git a/tests/lib/gtestdbus.c b/tests/lib/gtestdbus.c
index 17a9496..a59a514 100644
--- a/tests/lib/gtestdbus.c
+++ b/tests/lib/gtestdbus.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include <gstdio.h>
+#include <glib/gstdio.h>
#ifdef G_OS_UNIX
#include <unistd.h>
#endif
@@ -33,19 +33,33 @@
#endif
#include <glib.h>
+#include <gio/gio.h>
-#include "gdbusconnection.h"
-#include "gdbusprivate.h"
-#include "gfile.h"
-#include "gioenumtypes.h"
#include "gtestdbus.h"
-#include "glibintl.h"
-
#ifdef G_OS_WIN32
#include <windows.h>
#endif
+GType
+folks_test_dbus_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GFlagsValue values[] = {
+ { FOLKS_TEST_DBUS_NONE, "FOLKS_TEST_DBUS_NONE", "none" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_flags_register_static (g_intern_static_string ("FolksTestDBusFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
/* -------------------------------------------------------------------------- */
/* Utility: Wait until object has a single ref */
@@ -139,7 +153,7 @@ _g_test_watcher_add_pid (GPid pid)
}
static void
-_g_test_watcher_remove_pid (GPid pid)
+_folks_test_watcher_remove_pid (GPid pid)
{
/* No need to unassign the process from the job object as the process
will be killed anyway */
@@ -289,7 +303,7 @@ watcher_send_command (const gchar *command)
/* This could be interesting to expose in public API */
static void
-_g_test_watcher_add_pid (GPid pid)
+_folks_test_watcher_add_pid (GPid pid)
{
gchar *command;
@@ -299,7 +313,7 @@ _g_test_watcher_add_pid (GPid pid)
}
static void
-_g_test_watcher_remove_pid (GPid pid)
+_folks_test_watcher_remove_pid (GPid pid)
{
gchar *command;
@@ -311,28 +325,28 @@ _g_test_watcher_remove_pid (GPid pid)
#endif
/* -------------------------------------------------------------------------- */
-/* GTestDBus object implementation */
+/* FolksTestDBus object implementation */
/**
- * SECTION:gtestdbus
+ * SECTION:folkstestdbus
* @short_description: D-Bus testing helper
* @include: gio/gio.h
*
* A helper class for testing code which uses D-Bus without touching the user's
* session bus.
*
- * Note that #GTestDBus modifies the user’s environment, calling setenv().
- * This is not thread-safe, so all #GTestDBus calls should be completed before
+ * Note that #FolksTestDBus modifies the user’s environment, calling setenv().
+ * This is not thread-safe, so all #FolksTestDBus calls should be completed before
* threads are spawned, or should have appropriate locking to ensure no access
- * conflicts to environment variables shared between #GTestDBus and other
+ * conflicts to environment variables shared between #FolksTestDBus and other
* threads.
*
- * ## Creating unit tests using GTestDBus
+ * ## Creating unit tests using FolksTestDBus
*
* Testing of D-Bus services can be tricky because normally we only ever run
* D-Bus services over an existing instance of the D-Bus daemon thus we
* usually don't activate D-Bus services that are not yet installed into the
- * target system. The #GTestDBus object makes this easier for us by taking care
+ * target system. The #FolksTestDBus object makes this easier for us by taking care
* of the lower level tasks such as running a private D-Bus daemon and looking
* up uninstalled services in customizable locations, typically in your source
* code tree.
@@ -358,7 +372,7 @@ _g_test_watcher_remove_pid (GPid pid)
* -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\"
* ]|
* Once you have a service definition file which is local to your source tree,
- * you can proceed to set up a GTest fixture using the #GTestDBus scaffolding.
+ * you can proceed to set up a GTest fixture using the #FolksTestDBus scaffolding.
*
* An example of a test fixture for D-Bus services can be found
* here:
@@ -374,7 +388,7 @@ _g_test_watcher_remove_pid (GPid pid)
*
* Most of the time we can work around these obstacles using the
* environment. Since the environment is inherited by the D-Bus daemon
- * created by #GTestDBus and then in turn inherited by any services the
+ * created by #FolksTestDBus and then in turn inherited by any services the
* D-Bus daemon activates, using the setup routine for your fixture is
* a practical place to help sandbox your runtime environment. For the
* rather typical GSettings case we can work around this by setting
@@ -392,30 +406,30 @@ _g_test_watcher_remove_pid (GPid pid)
* ]|
*/
-typedef struct _GTestDBusClass GTestDBusClass;
-typedef struct _GTestDBusPrivate GTestDBusPrivate;
+typedef struct _FolksTestDBusClass FolksTestDBusClass;
+typedef struct _FolksTestDBusPrivate FolksTestDBusPrivate;
/**
- * GTestDBus:
+ * FolksTestDBus:
*
- * The #GTestDBus structure contains only private data and
+ * The #FolksTestDBus structure contains only private data and
* should only be accessed using the provided API.
*
* Since: 2.34
*/
-struct _GTestDBus {
+struct _FolksTestDBus {
GObject parent;
- GTestDBusPrivate *priv;
+ FolksTestDBusPrivate *priv;
};
-struct _GTestDBusClass {
+struct _FolksTestDBusClass {
GObjectClass parent_class;
};
-struct _GTestDBusPrivate
+struct _FolksTestDBusPrivate
{
- GTestDBusFlags flags;
+ FolksTestDBusFlags flags;
GPtrArray *service_dirs;
GPid bus_pid;
gchar *bus_address;
@@ -428,49 +442,49 @@ enum
PROP_FLAGS,
};
-G_DEFINE_TYPE_WITH_PRIVATE (GTestDBus, g_test_dbus, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (FolksTestDBus, folks_test_dbus, G_TYPE_OBJECT)
static void
-g_test_dbus_init (GTestDBus *self)
+folks_test_dbus_init (FolksTestDBus *self)
{
- self->priv = g_test_dbus_get_instance_private (self);
+ self->priv = folks_test_dbus_get_instance_private (self);
self->priv->service_dirs = g_ptr_array_new_with_free_func (g_free);
}
static void
-g_test_dbus_dispose (GObject *object)
+folks_test_dbus_dispose (GObject *object)
{
- GTestDBus *self = (GTestDBus *) object;
+ FolksTestDBus *self = (FolksTestDBus *) object;
if (self->priv->up)
- g_test_dbus_down (self);
+ folks_test_dbus_down (self);
- G_OBJECT_CLASS (g_test_dbus_parent_class)->dispose (object);
+ G_OBJECT_CLASS (folks_test_dbus_parent_class)->dispose (object);
}
static void
-g_test_dbus_finalize (GObject *object)
+folks_test_dbus_finalize (GObject *object)
{
- GTestDBus *self = (GTestDBus *) object;
+ FolksTestDBus *self = (FolksTestDBus *) object;
g_ptr_array_unref (self->priv->service_dirs);
g_free (self->priv->bus_address);
- G_OBJECT_CLASS (g_test_dbus_parent_class)->finalize (object);
+ G_OBJECT_CLASS (folks_test_dbus_parent_class)->finalize (object);
}
static void
-g_test_dbus_get_property (GObject *object,
+folks_test_dbus_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- GTestDBus *self = (GTestDBus *) object;
+ FolksTestDBus *self = (FolksTestDBus *) object;
switch (property_id)
{
case PROP_FLAGS:
- g_value_set_flags (value, g_test_dbus_get_flags (self));
+ g_value_set_flags (value, folks_test_dbus_get_flags (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -479,12 +493,12 @@ g_test_dbus_get_property (GObject *object,
}
static void
-g_test_dbus_set_property (GObject *object,
+folks_test_dbus_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- GTestDBus *self = (GTestDBus *) object;
+ FolksTestDBus *self = (FolksTestDBus *) object;
switch (property_id)
{
@@ -498,34 +512,34 @@ g_test_dbus_set_property (GObject *object,
}
static void
-g_test_dbus_class_init (GTestDBusClass *klass)
+folks_test_dbus_class_init (FolksTestDBusClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->dispose = g_test_dbus_dispose;
- object_class->finalize = g_test_dbus_finalize;
- object_class->get_property = g_test_dbus_get_property;
- object_class->set_property = g_test_dbus_set_property;
+ object_class->dispose = folks_test_dbus_dispose;
+ object_class->finalize = folks_test_dbus_finalize;
+ object_class->get_property = folks_test_dbus_get_property;
+ object_class->set_property = folks_test_dbus_set_property;
/**
- * GTestDBus:flags:
+ * FolksTestDBus:flags:
*
- * #GTestDBusFlags specifying the behaviour of the D-Bus session.
+ * #FolksTestDBusFlags specifying the behaviour of the D-Bus session.
*
* Since: 2.34
*/
g_object_class_install_property (object_class, PROP_FLAGS,
g_param_spec_flags ("flags",
- P_("D-Bus session flags"),
- P_("Flags specifying the behaviour of the D-Bus session"),
- G_TYPE_TEST_DBUS_FLAGS, G_TEST_DBUS_NONE,
+ "D-Bus session flags",
+ "Flags specifying the behaviour of the D-Bus session",
+ FOLKS_TYPE_TEST_DBUS_FLAGS, FOLKS_TEST_DBUS_NONE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
}
static gchar *
-write_config_file (GTestDBus *self)
+write_config_file (FolksTestDBus *self)
{
GString *contents;
gint fd;
@@ -577,7 +591,7 @@ write_config_file (GTestDBus *self)
}
static void
-start_daemon (GTestDBus *self)
+start_daemon (FolksTestDBus *self)
{
const gchar *argv[] = {"dbus-daemon", "--print-address", "--config-file=foo", NULL};
gchar *config_path;
@@ -613,7 +627,7 @@ start_daemon (GTestDBus *self)
&error);
g_assert_no_error (error);
- _g_test_watcher_add_pid (self->priv->bus_pid);
+ _folks_test_watcher_add_pid (self->priv->bus_pid);
/* Read bus address from daemon' stdout */
channel = g_io_channel_unix_new (stdout_fd);
@@ -649,7 +663,7 @@ start_daemon (GTestDBus *self)
}
static void
-stop_daemon (GTestDBus *self)
+stop_daemon (FolksTestDBus *self)
{
#ifdef G_OS_WIN32
if (!TerminateProcess (self->priv->bus_pid, 0))
@@ -657,7 +671,7 @@ stop_daemon (GTestDBus *self)
#else
kill (self->priv->bus_pid, SIGTERM);
#endif
- _g_test_watcher_remove_pid (self->priv->bus_pid);
+ _folks_test_watcher_remove_pid (self->priv->bus_pid);
g_spawn_close_pid (self->priv->bus_pid);
self->priv->bus_pid = 0;
@@ -666,140 +680,140 @@ stop_daemon (GTestDBus *self)
}
/**
- * g_test_dbus_new:
- * @flags: a #GTestDBusFlags
+ * folks_test_dbus_new:
+ * @flags: a #FolksTestDBusFlags
*
- * Create a new #GTestDBus object.
+ * Create a new #FolksTestDBus object.
*
- * Returns: (transfer full): a new #GTestDBus.
+ * Returns: (transfer full): a new #FolksTestDBus.
*/
-GTestDBus *
-g_test_dbus_new (GTestDBusFlags flags)
+FolksTestDBus *
+folks_test_dbus_new (FolksTestDBusFlags flags)
{
- return g_object_new (G_TYPE_TEST_DBUS,
+ return g_object_new (FOLKS_TYPE_TEST_DBUS,
"flags", flags,
NULL);
}
/**
- * g_test_dbus_get_flags:
- * @self: a #GTestDBus
+ * folks_test_dbus_get_flags:
+ * @self: a #FolksTestDBus
*
- * Get the flags of the #GTestDBus object.
+ * Get the flags of the #FolksTestDBus object.
*
- * Returns: the value of #GTestDBus:flags property
+ * Returns: the value of #FolksTestDBus:flags property
*/
-GTestDBusFlags
-g_test_dbus_get_flags (GTestDBus *self)
+FolksTestDBusFlags
+folks_test_dbus_get_flags (FolksTestDBus *self)
{
- g_return_val_if_fail (G_IS_TEST_DBUS (self), G_TEST_DBUS_NONE);
+ g_return_val_if_fail (FOLKS_IS_TEST_DBUS (self), FOLKS_TEST_DBUS_NONE);
return self->priv->flags;
}
/**
- * g_test_dbus_get_bus_address:
- * @self: a #GTestDBus
+ * folks_test_dbus_get_bus_address:
+ * @self: a #FolksTestDBus
*
- * Get the address on which dbus-daemon is running. If g_test_dbus_up() has not
+ * Get the address on which dbus-daemon is running. If folks_test_dbus_up() has not
* been called yet, %NULL is returned. This can be used with
* g_dbus_connection_new_for_address().
*
* Returns: (allow-none): the address of the bus, or %NULL.
*/
const gchar *
-g_test_dbus_get_bus_address (GTestDBus *self)
+folks_test_dbus_get_bus_address (FolksTestDBus *self)
{
- g_return_val_if_fail (G_IS_TEST_DBUS (self), NULL);
+ g_return_val_if_fail (FOLKS_IS_TEST_DBUS (self), NULL);
return self->priv->bus_address;
}
/**
- * g_test_dbus_add_service_dir:
- * @self: a #GTestDBus
+ * folks_test_dbus_add_service_dir:
+ * @self: a #FolksTestDBus
* @path: path to a directory containing .service files
*
* Add a path where dbus-daemon will look up .service files. This can't be
- * called after g_test_dbus_up().
+ * called after folks_test_dbus_up().
*/
void
-g_test_dbus_add_service_dir (GTestDBus *self,
+folks_test_dbus_add_service_dir (FolksTestDBus *self,
const gchar *path)
{
- g_return_if_fail (G_IS_TEST_DBUS (self));
+ g_return_if_fail (FOLKS_IS_TEST_DBUS (self));
g_return_if_fail (self->priv->bus_address == NULL);
g_ptr_array_add (self->priv->service_dirs, g_strdup (path));
}
/**
- * g_test_dbus_up:
- * @self: a #GTestDBus
+ * folks_test_dbus_up:
+ * @self: a #FolksTestDBus
*
* Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this
* call, it is safe for unit tests to start sending messages on the session bus.
*
* If this function is called from setup callback of g_test_add(),
- * g_test_dbus_down() must be called in its teardown callback.
+ * folks_test_dbus_down() must be called in its teardown callback.
*
- * If this function is called from unit test's main(), then g_test_dbus_down()
+ * If this function is called from unit test's main(), then folks_test_dbus_down()
* must be called after g_test_run().
*/
void
-g_test_dbus_up (GTestDBus *self)
+folks_test_dbus_up (FolksTestDBus *self)
{
- g_return_if_fail (G_IS_TEST_DBUS (self));
+ g_return_if_fail (FOLKS_IS_TEST_DBUS (self));
g_return_if_fail (self->priv->bus_address == NULL);
g_return_if_fail (!self->priv->up);
start_daemon (self);
- g_test_dbus_unset ();
+ folks_test_dbus_unset ();
g_setenv ("DBUS_SESSION_BUS_ADDRESS", self->priv->bus_address, TRUE);
self->priv->up = TRUE;
}
/**
- * g_test_dbus_stop:
- * @self: a #GTestDBus
+ * folks_test_dbus_stop:
+ * @self: a #FolksTestDBus
*
- * Stop the session bus started by g_test_dbus_up().
+ * Stop the session bus started by folks_test_dbus_up().
*
- * Unlike g_test_dbus_down(), this won't verify the #GDBusConnection
+ * Unlike folks_test_dbus_down(), this won't verify the #GDBusConnection
* singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit
* tests wanting to verify behaviour after the session bus has been stopped
- * can use this function but should still call g_test_dbus_down() when done.
+ * can use this function but should still call folks_test_dbus_down() when done.
*/
void
-g_test_dbus_stop (GTestDBus *self)
+folks_test_dbus_stop (FolksTestDBus *self)
{
- g_return_if_fail (G_IS_TEST_DBUS (self));
+ g_return_if_fail (FOLKS_IS_TEST_DBUS (self));
g_return_if_fail (self->priv->bus_address != NULL);
stop_daemon (self);
}
/**
- * g_test_dbus_down:
- * @self: a #GTestDBus
+ * folks_test_dbus_down:
+ * @self: a #FolksTestDBus
*
- * Stop the session bus started by g_test_dbus_up().
+ * Stop the session bus started by folks_test_dbus_up().
*
* This will wait for the singleton returned by g_bus_get() or g_bus_get_sync()
* is destroyed. This is done to ensure that the next unit test won't get a
* leaked singleton from this test.
*/
void
-g_test_dbus_down (GTestDBus *self)
+folks_test_dbus_down (FolksTestDBus *self)
{
GDBusConnection *connection;
- g_return_if_fail (G_IS_TEST_DBUS (self));
+ g_return_if_fail (FOLKS_IS_TEST_DBUS (self));
g_return_if_fail (self->priv->up);
- connection = _g_bus_get_singleton_if_exists (G_BUS_TYPE_SESSION);
+ connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (connection != NULL)
g_dbus_connection_set_exit_on_close (connection, FALSE);
@@ -809,22 +823,22 @@ g_test_dbus_down (GTestDBus *self)
if (connection != NULL)
_g_object_dispose_and_wait_weak_notify (connection);
- g_test_dbus_unset ();
+ folks_test_dbus_unset ();
self->priv->up = FALSE;
}
/**
- * g_test_dbus_unset:
+ * folks_test_dbus_unset:
*
* Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test
* won't use user's session bus.
*
* This is useful for unit tests that want to verify behaviour when no session
* bus is running. It is not necessary to call this if unit test already calls
- * g_test_dbus_up() before acquiring the session bus.
+ * folks_test_dbus_up() before acquiring the session bus.
*/
void
-g_test_dbus_unset (void)
+folks_test_dbus_unset (void)
{
g_unsetenv ("DISPLAY");
g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
diff --git a/tests/lib/gtestdbus.h b/tests/lib/gtestdbus.h
index 0e82e33..22aa6ef 100644
--- a/tests/lib/gtestdbus.h
+++ b/tests/lib/gtestdbus.h
@@ -20,53 +20,67 @@
* Xavier Claessens <xavier claessens collabora co uk>
*/
-#ifndef __G_TEST_DBUS_H__
-#define __G_TEST_DBUS_H__
+#ifndef __FOLKS_TEST_DBUS_H__
+#define __FOLKS_TEST_DBUS_H__
-#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
-#error "Only <gio/gio.h> can be included directly."
-#endif
-
-#include <gio/giotypes.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
-#define G_TYPE_TEST_DBUS \
- (g_test_dbus_get_type ())
-#define G_TEST_DBUS(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TEST_DBUS, \
- GTestDBus))
-#define G_IS_TEST_DBUS(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TEST_DBUS))
+/**
+ * FolksTestDBusFlags:
+ * @FOLKS_TEST_DBUS_NONE: No flags.
+ *
+ * Flags to define future #FolksTestDBus behaviour.
+ *
+ * Since: 2.34
+ */
+typedef enum /*< flags >*/ {
+ FOLKS_TEST_DBUS_NONE = 0
+} FolksTestDBusFlags;
+
+#define FOLKS_TYPE_TEST_DBUS_FLAGS (folks_test_dbus_flags_get_type ())
+GType folks_test_dbus_flags_get_type (void) G_GNUC_CONST;
+
+typedef struct _FolksTestDBus FolksTestDBus;
+
+
+#define FOLKS_TYPE_TEST_DBUS \
+ (folks_test_dbus_get_type ())
+#define FOLKS_TEST_DBUS(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_TEST_DBUS, \
+ FolksTestDBus))
+#define FOLKS_IS_TEST_DBUS(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_TEST_DBUS))
GLIB_AVAILABLE_IN_2_34
-GType g_test_dbus_get_type (void) G_GNUC_CONST;
+GType folks_test_dbus_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_34
-GTestDBus * g_test_dbus_new (GTestDBusFlags flags);
+FolksTestDBus * folks_test_dbus_new (FolksTestDBusFlags flags);
GLIB_AVAILABLE_IN_2_34
-GTestDBusFlags g_test_dbus_get_flags (GTestDBus *self);
+FolksTestDBusFlags folks_test_dbus_get_flags (FolksTestDBus *self);
GLIB_AVAILABLE_IN_2_34
-const gchar * g_test_dbus_get_bus_address (GTestDBus *self);
+const gchar * folks_test_dbus_get_bus_address (FolksTestDBus *self);
GLIB_AVAILABLE_IN_2_34
-void g_test_dbus_add_service_dir (GTestDBus *self,
+void folks_test_dbus_add_service_dir (FolksTestDBus *self,
const gchar *path);
GLIB_AVAILABLE_IN_2_34
-void g_test_dbus_up (GTestDBus *self);
+void folks_test_dbus_up (FolksTestDBus *self);
GLIB_AVAILABLE_IN_2_34
-void g_test_dbus_stop (GTestDBus *self);
+void folks_test_dbus_stop (FolksTestDBus *self);
GLIB_AVAILABLE_IN_2_34
-void g_test_dbus_down (GTestDBus *self);
+void folks_test_dbus_down (FolksTestDBus *self);
GLIB_AVAILABLE_IN_2_34
-void g_test_dbus_unset (void);
+void folks_test_dbus_unset (void);
G_END_DECLS
-#endif /* __G_TEST_DBUS_H__ */
+#endif /* __FOLKS_TEST_DBUS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]