1 /* GDBus - GLib D-Bus Library
3 * Copyright (C) 2008-2010 Red Hat, Inc.
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.
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.
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/>.
18 * Author: David Zeuthen <davidz@redhat.com>
21 #ifndef __G_DBUS_MESSAGE_H__
22 #define __G_DBUS_MESSAGE_H__
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
28 #include <gio/giotypes.h>
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))
37 GType g_dbus_message_get_type (void) G_GNUC_CONST;
39 GDBusMessage *g_dbus_message_new (void);
41 GDBusMessage *g_dbus_message_new_signal (const gchar *path,
42 const gchar *interface_,
45 GDBusMessage *g_dbus_message_new_method_call (const gchar *name,
47 const gchar *interface_,
50 GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message);
52 GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message,
53 const gchar *error_name,
54 const gchar *error_message_format,
57 GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message,
58 const gchar *error_name,
59 const gchar *error_message_format,
62 GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message,
63 const gchar *error_name,
64 const gchar *error_message);
66 gchar *g_dbus_message_print (GDBusMessage *message,
69 gboolean g_dbus_message_get_locked (GDBusMessage *message);
71 void g_dbus_message_lock (GDBusMessage *message);
73 GDBusMessage *g_dbus_message_copy (GDBusMessage *message,
76 GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message);
78 void g_dbus_message_set_byte_order (GDBusMessage *message,
79 GDBusMessageByteOrder byte_order);
82 GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message);
84 void g_dbus_message_set_message_type (GDBusMessage *message,
85 GDBusMessageType type);
87 GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message);
89 void g_dbus_message_set_flags (GDBusMessage *message,
90 GDBusMessageFlags flags);
92 guint32 g_dbus_message_get_serial (GDBusMessage *message);
94 void g_dbus_message_set_serial (GDBusMessage *message,
97 GVariant *g_dbus_message_get_header (GDBusMessage *message,
98 GDBusMessageHeaderField header_field);
100 void g_dbus_message_set_header (GDBusMessage *message,
101 GDBusMessageHeaderField header_field,
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,
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);
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,
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,
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,
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,
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,
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,
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,
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,
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,
170 GLIB_AVAILABLE_IN_ALL
171 const gchar *g_dbus_message_get_arg0 (GDBusMessage *message);
174 GLIB_AVAILABLE_IN_ALL
175 GDBusMessage *g_dbus_message_new_from_blob (guchar *blob,
177 GDBusCapabilityFlags capabilities,
180 GLIB_AVAILABLE_IN_ALL
181 gssize g_dbus_message_bytes_needed (guchar *blob,
185 GLIB_AVAILABLE_IN_ALL
186 guchar *g_dbus_message_to_blob (GDBusMessage *message,
188 GDBusCapabilityFlags capabilities,
191 GLIB_AVAILABLE_IN_ALL
192 gboolean g_dbus_message_to_gerror (GDBusMessage *message,
197 #endif /* __G_DBUS_MESSAGE_H__ */