2010-05-06 20:13:59 +02:00
|
|
|
/* GDBus - GLib D-Bus Library
|
|
|
|
*
|
2010-05-09 19:14:55 +02:00
|
|
|
* Copyright (C) 2008-2010 Red Hat, Inc.
|
2010-05-06 20:13:59 +02:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General
|
2014-01-23 12:58:29 +01:00
|
|
|
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2010-05-06 20:13:59 +02:00
|
|
|
*
|
|
|
|
* Author: David Zeuthen <davidz@redhat.com>
|
|
|
|
*/
|
|
|
|
|
2012-12-28 05:43:14 +01:00
|
|
|
#ifndef __G_DBUS_MESSAGE_H__
|
|
|
|
#define __G_DBUS_MESSAGE_H__
|
|
|
|
|
2010-06-06 22:20:21 +02:00
|
|
|
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
|
|
|
#error "Only <gio/gio.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2010-05-06 20:13:59 +02:00
|
|
|
#include <gio/giotypes.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2010-05-06 23:31:51 +02:00
|
|
|
#define G_TYPE_DBUS_MESSAGE (g_dbus_message_get_type ())
|
2010-05-06 20:13:59 +02:00
|
|
|
#define G_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage))
|
|
|
|
#define G_IS_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE))
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 23:31:51 +02:00
|
|
|
GType g_dbus_message_get_type (void) G_GNUC_CONST;
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new (void);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_signal (const gchar *path,
|
2010-05-20 16:51:00 +02:00
|
|
|
const gchar *interface_,
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *signal);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_method_call (const gchar *name,
|
|
|
|
const gchar *path,
|
2010-05-20 16:51:00 +02:00
|
|
|
const gchar *interface_,
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *method);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message,
|
|
|
|
const gchar *error_name,
|
|
|
|
const gchar *error_message_format,
|
|
|
|
...);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message,
|
|
|
|
const gchar *error_name,
|
|
|
|
const gchar *error_message_format,
|
|
|
|
va_list var_args);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message,
|
|
|
|
const gchar *error_name,
|
|
|
|
const gchar *error_message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
gchar *g_dbus_message_print (GDBusMessage *message,
|
|
|
|
guint indent);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-09-09 17:37:14 +02:00
|
|
|
gboolean g_dbus_message_get_locked (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-09-09 17:37:14 +02:00
|
|
|
void g_dbus_message_lock (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-09-09 17:37:14 +02:00
|
|
|
GDBusMessage *g_dbus_message_copy (GDBusMessage *message,
|
|
|
|
GError **error);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-08-04 19:32:19 +02:00
|
|
|
GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-08-04 19:32:19 +02:00
|
|
|
void g_dbus_message_set_byte_order (GDBusMessage *message,
|
|
|
|
GDBusMessageByteOrder byte_order);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 23:31:51 +02:00
|
|
|
GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 23:31:51 +02:00
|
|
|
void g_dbus_message_set_message_type (GDBusMessage *message,
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessageType type);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_flags (GDBusMessage *message,
|
|
|
|
GDBusMessageFlags flags);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
guint32 g_dbus_message_get_serial (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_serial (GDBusMessage *message,
|
|
|
|
guint32 serial);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GVariant *g_dbus_message_get_header (GDBusMessage *message,
|
|
|
|
GDBusMessageHeaderField header_field);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_header (GDBusMessage *message,
|
|
|
|
GDBusMessageHeaderField header_field,
|
|
|
|
GVariant *value);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
guchar *g_dbus_message_get_header_fields (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GVariant *g_dbus_message_get_body (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_body (GDBusMessage *message,
|
|
|
|
GVariant *body);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GUnixFDList *g_dbus_message_get_unix_fd_list (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_unix_fd_list (GDBusMessage *message,
|
|
|
|
GUnixFDList *fd_list);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
guint32 g_dbus_message_get_reply_serial (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_reply_serial (GDBusMessage *message,
|
|
|
|
guint32 value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_interface (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_interface (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_member (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_member (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_path (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_path (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_sender (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_sender (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_destination (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_destination (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_error_name (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_error_name (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_signature (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_signature (GDBusMessage *message,
|
|
|
|
const gchar *value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
guint32 g_dbus_message_get_num_unix_fds (GDBusMessage *message);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
void g_dbus_message_set_num_unix_fds (GDBusMessage *message,
|
|
|
|
guint32 value);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
const gchar *g_dbus_message_get_arg0 (GDBusMessage *message);
|
|
|
|
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
GDBusMessage *g_dbus_message_new_from_blob (guchar *blob,
|
|
|
|
gsize blob_len,
|
2010-05-13 20:01:41 +02:00
|
|
|
GDBusCapabilityFlags capabilities,
|
2010-05-06 20:13:59 +02:00
|
|
|
GError **error);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
gssize g_dbus_message_bytes_needed (guchar *blob,
|
|
|
|
gsize blob_len,
|
|
|
|
GError **error);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
guchar *g_dbus_message_to_blob (GDBusMessage *message,
|
|
|
|
gsize *out_size,
|
2010-05-13 20:01:41 +02:00
|
|
|
GDBusCapabilityFlags capabilities,
|
2010-05-06 20:13:59 +02:00
|
|
|
GError **error);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-05-06 20:13:59 +02:00
|
|
|
gboolean g_dbus_message_to_gerror (GDBusMessage *message,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __G_DBUS_MESSAGE_H__ */
|