summaryrefslogtreecommitdiff
path: root/engine/dconf-engine.h
blob: e3d8b402ee483aefbfb0ef5e10484b69b1d824a1 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef _dconf_engine_h_
#define _dconf_engine_h_

#include <glib.h>

typedef struct _DConfEngine DConfEngine;
typedef struct _DConfEngineResetList DConfEngineResetList;

typedef enum
{
  DCONF_ENGINE_READ_NORMAL,
  DCONF_ENGINE_READ_SET,
  DCONF_ENGINE_READ_RESET
} DConfEngineReadType;

typedef struct
{
  gint         bus_type;
  const gchar *destination;
  const gchar *object_path;
  const gchar *interface;
  const gchar *method;
  GVariant    *body;
} DConfEngineMessage;



typedef GVariant *    (*DConfEngineServiceFunc)                         (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message);

DConfEngine *           dconf_engine_new                                (DConfEngineServiceFunc   service_func);
void                    dconf_engine_unref                              (DConfEngine             *engine);
DConfEngine *           dconf_engine_ref                                (DConfEngine             *engine);

GVariant *              dconf_engine_read                               (DConfEngine             *engine,
                                                                         const gchar             *key,
                                                                         const GVariantType      *required_type,
                                                                         DConfEngineReadType      type);
gchar **                dconf_engine_list                               (DConfEngine             *engine,
                                                                         const gchar             *path,
                                                                         DConfEngineResetList    *resets);

void                    dconf_engine_get_service_info                   (DConfEngine             *engine,
                                                                         const gchar            **bus_type,
                                                                         const gchar            **destination,
                                                                         const gchar            **object_path);
gboolean                dconf_engine_is_writable                        (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message,
                                                                         const gchar             *name);
gboolean                dconf_engine_write                              (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message,
                                                                         const gchar             *key,
                                                                         GVariant                *value);
gboolean                dconf_engine_write_tree                         (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message,
                                                                         GTree                   *tree);
void                    dconf_engine_watch                              (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message,
                                                                         const gchar             *name);
void                    dconf_engine_unwatch                            (DConfEngine             *engine,
                                                                         DConfEngineMessage      *message,
                                                                         const gchar             *name);
void                    dconf_engine_decode_notify                      (DConfEngine             *engine,
                                                                         const gchar            **prefix,
                                                                         const gchar           ***keys,
                                                                         GVariant                *body);

void                    dconf_engine_reset_list_init                    (DConfEngineResetList    *resets,
                                                                         const gchar * const     *list);
void                    dconf_engine_reset_list_add                     (DConfEngineResetList    *resets,
                                                                         const gchar             *item);
void                    dconf_engine_reset_list_clear                   (DConfEngineResetList    *resets);

#endif /* _dconf_engine_h_ */