19
19
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
20
* Boston, MA 02111-1307, USA.
22
#ifndef __BUS_SERVER_H_
23
#define __BUS_SERVER_H_
33
/* define GOBJECT macros */
34
#define BUS_TYPE_SERVER \
35
(bus_server_get_type ())
36
#define BUS_SERVER(obj) \
37
(G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_SERVER, BusServer))
38
#define BUS_SERVER_CLASS(klass) \
39
(G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_SERVER, BusServerClass))
40
#define BUS_IS_SERVER(obj) \
41
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_SERVER))
42
#define BUS_IS_SERVER_CLASS(klass) \
43
(G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_SERVER))
44
#define BUS_SERVER_GET_CLASS(obj) \
45
(G_TYPE_INSTANCE_GET_CLASS ((obj), BUS_TYPE_SERVER, BusServerClass))
46
#define BUS_DEFAULT_SERVER \
47
(bus_server_get_default ())
51
typedef struct _BusServer BusServer;
52
typedef struct _BusServerClass BusServerClass;
57
/* instance members */
65
struct _BusServerClass {
66
IBusServerClass parent;
71
GType bus_server_get_type (void);
72
BusServer *bus_server_get_default (void);
73
gboolean bus_server_listen (BusServer *server);
74
void bus_server_run (BusServer *server);
75
void bus_server_quit (BusServer *server);
32
* Initialize GDBus server and write the server address to a file, which is (usually) in ~/.config/ibus/bus/.
33
* Note that the function does not call g_main_loop_run.
35
void bus_server_init (void);
40
* Enter the glib main loop. You have to call bus_server_init before calling this function.
42
void bus_server_run (void);
47
* Quit the glib main loop.
49
void bus_server_quit (void);
52
* bus_server_get_address:
53
* @returns: The server address, e.g. "unix:abstract=/tmp/dbus-aEUnr11L,guid=8b343aaa69eabb9b282dce6f4cdbb4aa"
55
* Get the server address. This function might return NULL if it is called before initializing the server by
56
* calling bus_server_init.
58
const gchar *bus_server_get_address (void);