20
20
* Author: David Zeuthen <davidz@redhat.com>
23
#ifndef __G_DBUS_CONNECTION_H__
24
#define __G_DBUS_CONNECTION_H__
23
26
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24
27
#error "Only <gio/gio.h> can be included directly."
27
#ifndef __G_DBUS_CONNECTION_H__
28
#define __G_DBUS_CONNECTION_H__
30
30
#include <gio/giotypes.h>
35
35
#define G_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_CONNECTION, GDBusConnection))
36
36
#define G_IS_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_CONNECTION))
38
39
GType g_dbus_connection_get_type (void) G_GNUC_CONST;
40
41
/* ---------------------------------------------------------------------------------------------------- */
42
44
void g_bus_get (GBusType bus_type,
43
45
GCancellable *cancellable,
44
46
GAsyncReadyCallback callback,
45
47
gpointer user_data);
46
49
GDBusConnection *g_bus_get_finish (GAsyncResult *res,
48
52
GDBusConnection *g_bus_get_sync (GBusType bus_type,
49
53
GCancellable *cancellable,
52
56
/* ---------------------------------------------------------------------------------------------------- */
54
59
void g_dbus_connection_new (GIOStream *stream,
56
61
GDBusConnectionFlags flags,
58
63
GCancellable *cancellable,
59
64
GAsyncReadyCallback callback,
60
65
gpointer user_data);
61
67
GDBusConnection *g_dbus_connection_new_finish (GAsyncResult *res,
63
70
GDBusConnection *g_dbus_connection_new_sync (GIOStream *stream,
65
72
GDBusConnectionFlags flags,
67
74
GCancellable *cancellable,
70
78
void g_dbus_connection_new_for_address (const gchar *address,
71
79
GDBusConnectionFlags flags,
72
80
GDBusAuthObserver *observer,
73
81
GCancellable *cancellable,
74
82
GAsyncReadyCallback callback,
75
83
gpointer user_data);
76
85
GDBusConnection *g_dbus_connection_new_for_address_finish (GAsyncResult *res,
78
88
GDBusConnection *g_dbus_connection_new_for_address_sync (const gchar *address,
79
89
GDBusConnectionFlags flags,
80
90
GDBusAuthObserver *observer,
84
94
/* ---------------------------------------------------------------------------------------------------- */
86
97
void g_dbus_connection_start_message_processing (GDBusConnection *connection);
87
99
gboolean g_dbus_connection_is_closed (GDBusConnection *connection);
100
GLIB_AVAILABLE_IN_ALL
88
101
GIOStream *g_dbus_connection_get_stream (GDBusConnection *connection);
102
GLIB_AVAILABLE_IN_ALL
89
103
const gchar *g_dbus_connection_get_guid (GDBusConnection *connection);
104
GLIB_AVAILABLE_IN_ALL
90
105
const gchar *g_dbus_connection_get_unique_name (GDBusConnection *connection);
106
GLIB_AVAILABLE_IN_ALL
91
107
GCredentials *g_dbus_connection_get_peer_credentials (GDBusConnection *connection);
109
GLIB_AVAILABLE_IN_2_34
110
guint32 g_dbus_connection_get_last_serial (GDBusConnection *connection);
112
GLIB_AVAILABLE_IN_ALL
92
113
gboolean g_dbus_connection_get_exit_on_close (GDBusConnection *connection);
114
GLIB_AVAILABLE_IN_ALL
93
115
void g_dbus_connection_set_exit_on_close (GDBusConnection *connection,
94
116
gboolean exit_on_close);
117
GLIB_AVAILABLE_IN_ALL
95
118
GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection);
97
120
/* ---------------------------------------------------------------------------------------------------- */
122
GLIB_AVAILABLE_IN_ALL
99
123
void g_dbus_connection_close (GDBusConnection *connection,
100
124
GCancellable *cancellable,
101
125
GAsyncReadyCallback callback,
102
126
gpointer user_data);
127
GLIB_AVAILABLE_IN_ALL
103
128
gboolean g_dbus_connection_close_finish (GDBusConnection *connection,
104
129
GAsyncResult *res,
131
GLIB_AVAILABLE_IN_ALL
106
132
gboolean g_dbus_connection_close_sync (GDBusConnection *connection,
107
133
GCancellable *cancellable,
110
136
/* ---------------------------------------------------------------------------------------------------- */
138
GLIB_AVAILABLE_IN_ALL
112
139
void g_dbus_connection_flush (GDBusConnection *connection,
113
140
GCancellable *cancellable,
114
141
GAsyncReadyCallback callback,
115
142
gpointer user_data);
143
GLIB_AVAILABLE_IN_ALL
116
144
gboolean g_dbus_connection_flush_finish (GDBusConnection *connection,
117
145
GAsyncResult *res,
147
GLIB_AVAILABLE_IN_ALL
119
148
gboolean g_dbus_connection_flush_sync (GDBusConnection *connection,
120
149
GCancellable *cancellable,
123
152
/* ---------------------------------------------------------------------------------------------------- */
154
GLIB_AVAILABLE_IN_ALL
125
155
gboolean g_dbus_connection_send_message (GDBusConnection *connection,
126
156
GDBusMessage *message,
127
157
GDBusSendMessageFlags flags,
128
158
volatile guint32 *out_serial,
160
GLIB_AVAILABLE_IN_ALL
130
161
void g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
131
162
GDBusMessage *message,
132
163
GDBusSendMessageFlags flags,
135
166
GCancellable *cancellable,
136
167
GAsyncReadyCallback callback,
137
168
gpointer user_data);
169
GLIB_AVAILABLE_IN_ALL
138
170
GDBusMessage *g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection,
139
171
GAsyncResult *res,
173
GLIB_AVAILABLE_IN_ALL
141
174
GDBusMessage *g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection,
142
175
GDBusMessage *message,
143
176
GDBusSendMessageFlags flags,
149
182
/* ---------------------------------------------------------------------------------------------------- */
184
GLIB_AVAILABLE_IN_ALL
151
185
gboolean g_dbus_connection_emit_signal (GDBusConnection *connection,
152
186
const gchar *destination_bus_name,
153
187
const gchar *object_path,
167
202
GCancellable *cancellable,
168
203
GAsyncReadyCallback callback,
169
204
gpointer user_data);
205
GLIB_AVAILABLE_IN_ALL
170
206
GVariant *g_dbus_connection_call_finish (GDBusConnection *connection,
171
207
GAsyncResult *res,
209
GLIB_AVAILABLE_IN_ALL
173
210
GVariant *g_dbus_connection_call_sync (GDBusConnection *connection,
174
211
const gchar *bus_name,
175
212
const gchar *object_path,
579
622
gboolean incoming,
580
623
gpointer user_data);
625
GLIB_AVAILABLE_IN_ALL
582
626
guint g_dbus_connection_add_filter (GDBusConnection *connection,
583
627
GDBusMessageFilterFunction filter_function,
584
628
gpointer user_data,
585
629
GDestroyNotify user_data_free_func);
631
GLIB_AVAILABLE_IN_ALL
587
632
void g_dbus_connection_remove_filter (GDBusConnection *connection,
588
633
guint filter_id);