Work around test failure in gdbus-names
[platform/upstream/glib.git] / gio / gdbusmessage.h
1 /* GDBus - GLib D-Bus Library
2  *
3  * Copyright (C) 2008-2010 Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17  *
18  * Author: David Zeuthen <davidz@redhat.com>
19  */
20
21 #ifndef __G_DBUS_MESSAGE_H__
22 #define __G_DBUS_MESSAGE_H__
23
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
26 #endif
27
28 #include <gio/giotypes.h>
29
30 G_BEGIN_DECLS
31
32 #define G_TYPE_DBUS_MESSAGE         (g_dbus_message_get_type ())
33 #define G_DBUS_MESSAGE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage))
34 #define G_IS_DBUS_MESSAGE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE))
35
36 GLIB_AVAILABLE_IN_ALL
37 GType                     g_dbus_message_get_type           (void) G_GNUC_CONST;
38 GLIB_AVAILABLE_IN_ALL
39 GDBusMessage             *g_dbus_message_new                (void);
40 GLIB_AVAILABLE_IN_ALL
41 GDBusMessage             *g_dbus_message_new_signal         (const gchar              *path,
42                                                              const gchar              *interface_,
43                                                              const gchar              *signal);
44 GLIB_AVAILABLE_IN_ALL
45 GDBusMessage             *g_dbus_message_new_method_call    (const gchar              *name,
46                                                              const gchar              *path,
47                                                              const gchar              *interface_,
48                                                              const gchar              *method);
49 GLIB_AVAILABLE_IN_ALL
50 GDBusMessage             *g_dbus_message_new_method_reply   (GDBusMessage             *method_call_message);
51 GLIB_AVAILABLE_IN_ALL
52 GDBusMessage             *g_dbus_message_new_method_error   (GDBusMessage             *method_call_message,
53                                                              const gchar              *error_name,
54                                                              const gchar              *error_message_format,
55                                                              ...);
56 GLIB_AVAILABLE_IN_ALL
57 GDBusMessage             *g_dbus_message_new_method_error_valist (GDBusMessage             *method_call_message,
58                                                                   const gchar              *error_name,
59                                                                   const gchar              *error_message_format,
60                                                                   va_list                   var_args);
61 GLIB_AVAILABLE_IN_ALL
62 GDBusMessage             *g_dbus_message_new_method_error_literal (GDBusMessage             *method_call_message,
63                                                                    const gchar              *error_name,
64                                                                    const gchar              *error_message);
65 GLIB_AVAILABLE_IN_ALL
66 gchar                    *g_dbus_message_print              (GDBusMessage             *message,
67                                                              guint                     indent);
68 GLIB_AVAILABLE_IN_ALL
69 gboolean                  g_dbus_message_get_locked         (GDBusMessage             *message);
70 GLIB_AVAILABLE_IN_ALL
71 void                      g_dbus_message_lock               (GDBusMessage             *message);
72 GLIB_AVAILABLE_IN_ALL
73 GDBusMessage             *g_dbus_message_copy               (GDBusMessage             *message,
74                                                              GError                  **error);
75 GLIB_AVAILABLE_IN_ALL
76 GDBusMessageByteOrder     g_dbus_message_get_byte_order     (GDBusMessage             *message);
77 GLIB_AVAILABLE_IN_ALL
78 void                      g_dbus_message_set_byte_order     (GDBusMessage             *message,
79                                                              GDBusMessageByteOrder     byte_order);
80
81 GLIB_AVAILABLE_IN_ALL
82 GDBusMessageType          g_dbus_message_get_message_type   (GDBusMessage             *message);
83 GLIB_AVAILABLE_IN_ALL
84 void                      g_dbus_message_set_message_type   (GDBusMessage             *message,
85                                                              GDBusMessageType          type);
86 GLIB_AVAILABLE_IN_ALL
87 GDBusMessageFlags         g_dbus_message_get_flags          (GDBusMessage             *message);
88 GLIB_AVAILABLE_IN_ALL
89 void                      g_dbus_message_set_flags          (GDBusMessage             *message,
90                                                              GDBusMessageFlags         flags);
91 GLIB_AVAILABLE_IN_ALL
92 guint32                   g_dbus_message_get_serial         (GDBusMessage             *message);
93 GLIB_AVAILABLE_IN_ALL
94 void                      g_dbus_message_set_serial         (GDBusMessage             *message,
95                                                              guint32                   serial);
96 GLIB_AVAILABLE_IN_ALL
97 GVariant                 *g_dbus_message_get_header         (GDBusMessage             *message,
98                                                              GDBusMessageHeaderField   header_field);
99 GLIB_AVAILABLE_IN_ALL
100 void                      g_dbus_message_set_header         (GDBusMessage             *message,
101                                                              GDBusMessageHeaderField   header_field,
102                                                              GVariant                 *value);
103 GLIB_AVAILABLE_IN_ALL
104 guchar                   *g_dbus_message_get_header_fields  (GDBusMessage             *message);
105 GLIB_AVAILABLE_IN_ALL
106 GVariant                 *g_dbus_message_get_body           (GDBusMessage             *message);
107 GLIB_AVAILABLE_IN_ALL
108 void                      g_dbus_message_set_body           (GDBusMessage             *message,
109                                                              GVariant                 *body);
110 GLIB_AVAILABLE_IN_ALL
111 GUnixFDList              *g_dbus_message_get_unix_fd_list   (GDBusMessage             *message);
112 GLIB_AVAILABLE_IN_ALL
113 void                      g_dbus_message_set_unix_fd_list   (GDBusMessage             *message,
114                                                              GUnixFDList              *fd_list);
115
116 GLIB_AVAILABLE_IN_ALL
117 guint32                   g_dbus_message_get_reply_serial   (GDBusMessage             *message);
118 GLIB_AVAILABLE_IN_ALL
119 void                      g_dbus_message_set_reply_serial   (GDBusMessage             *message,
120                                                              guint32                   value);
121
122 GLIB_AVAILABLE_IN_ALL
123 const gchar              *g_dbus_message_get_interface      (GDBusMessage             *message);
124 GLIB_AVAILABLE_IN_ALL
125 void                      g_dbus_message_set_interface      (GDBusMessage             *message,
126                                                              const gchar              *value);
127
128 GLIB_AVAILABLE_IN_ALL
129 const gchar              *g_dbus_message_get_member         (GDBusMessage             *message);
130 GLIB_AVAILABLE_IN_ALL
131 void                      g_dbus_message_set_member         (GDBusMessage             *message,
132                                                              const gchar              *value);
133
134 GLIB_AVAILABLE_IN_ALL
135 const gchar              *g_dbus_message_get_path           (GDBusMessage             *message);
136 GLIB_AVAILABLE_IN_ALL
137 void                      g_dbus_message_set_path           (GDBusMessage             *message,
138                                                              const gchar              *value);
139
140 GLIB_AVAILABLE_IN_ALL
141 const gchar              *g_dbus_message_get_sender         (GDBusMessage             *message);
142 GLIB_AVAILABLE_IN_ALL
143 void                      g_dbus_message_set_sender         (GDBusMessage             *message,
144                                                              const gchar              *value);
145
146 GLIB_AVAILABLE_IN_ALL
147 const gchar              *g_dbus_message_get_destination    (GDBusMessage             *message);
148 GLIB_AVAILABLE_IN_ALL
149 void                      g_dbus_message_set_destination    (GDBusMessage             *message,
150                                                              const gchar              *value);
151
152 GLIB_AVAILABLE_IN_ALL
153 const gchar              *g_dbus_message_get_error_name     (GDBusMessage             *message);
154 GLIB_AVAILABLE_IN_ALL
155 void                      g_dbus_message_set_error_name     (GDBusMessage             *message,
156                                                              const gchar              *value);
157
158 GLIB_AVAILABLE_IN_ALL
159 const gchar              *g_dbus_message_get_signature      (GDBusMessage             *message);
160 GLIB_AVAILABLE_IN_ALL
161 void                      g_dbus_message_set_signature      (GDBusMessage             *message,
162                                                              const gchar              *value);
163
164 GLIB_AVAILABLE_IN_ALL
165 guint32                   g_dbus_message_get_num_unix_fds   (GDBusMessage             *message);
166 GLIB_AVAILABLE_IN_ALL
167 void                      g_dbus_message_set_num_unix_fds   (GDBusMessage             *message,
168                                                              guint32                   value);
169
170 GLIB_AVAILABLE_IN_ALL
171 const gchar              *g_dbus_message_get_arg0           (GDBusMessage             *message);
172
173
174 GLIB_AVAILABLE_IN_ALL
175 GDBusMessage             *g_dbus_message_new_from_blob      (guchar                   *blob,
176                                                              gsize                     blob_len,
177                                                              GDBusCapabilityFlags      capabilities,
178                                                              GError                  **error);
179
180 GLIB_AVAILABLE_IN_ALL
181 gssize                    g_dbus_message_bytes_needed       (guchar                   *blob,
182                                                              gsize                     blob_len,
183                                                              GError                  **error);
184
185 GLIB_AVAILABLE_IN_ALL
186 guchar                   *g_dbus_message_to_blob            (GDBusMessage             *message,
187                                                              gsize                    *out_size,
188                                                              GDBusCapabilityFlags      capabilities,
189                                                              GError                  **error);
190
191 GLIB_AVAILABLE_IN_ALL
192 gboolean                  g_dbus_message_to_gerror          (GDBusMessage             *message,
193                                                              GError                  **error);
194
195 G_END_DECLS
196
197 #endif /* __G_DBUS_MESSAGE_H__ */