summaryrefslogtreecommitdiff
path: root/tests/dconf-mock.h
blob: b3bdcba6fc22b5447d955e1b4dabb2bd4ee18a12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __dconf_mock_h__
#define __dconf_mock_h__

#include "../gvdb/gvdb-reader.h"
#include <gio/gio.h>

typedef GVariant *   (* DConfMockDBusSyncCallHandler)                   (GBusType             bus_type,
                                                                         const gchar         *bus_name,
                                                                         const gchar         *object_path,
                                                                         const gchar         *interface_name,
                                                                         const gchar         *method_name,
                                                                         GVariant            *parameters,
                                                                         const GVariantType  *expected_type,
                                                                         GError             **error);

extern DConfMockDBusSyncCallHandler                         dconf_mock_dbus_sync_call_handler;
extern GQueue                                               dconf_mock_dbus_outstanding_call_handles;

void                    dconf_mock_dbus_async_reply                     (GVariant    *reply,
                                                                         GError      *error);
void                    dconf_mock_dbus_assert_no_async                 (void);

void                    dconf_mock_shm_reset                            (void);
gint                    dconf_mock_shm_flag                             (const gchar *name);
void                    dconf_mock_shm_assert_log                       (const gchar *expected_log);

GvdbTable *             dconf_mock_gvdb_table_new                       (void);
void                    dconf_mock_gvdb_table_insert                    (GvdbTable   *table,
                                                                         const gchar *name,
                                                                         GVariant    *value,
                                                                         GvdbTable   *subtable);
void                    dconf_mock_gvdb_table_invalidate                (GvdbTable   *table);
void                    dconf_mock_gvdb_install                         (const gchar *filename,
                                                                         GvdbTable   *table);
GvdbTable *             dconf_mock_gvdb_table_ref                       (GvdbTable   *table);

#endif