dbus-message.h
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* dbus-message.h DBusMessage object
*
* Copyright (C) 2002, 2003, 2005 Red Hat Inc.
*
* SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later
*
* Licensed under the Academic Free License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
#endif
#ifndef DBUS_MESSAGE_H
#define DBUS_MESSAGE_H
#include <dbus/dbus-macros.h>
#include <dbus/dbus-types.h>
#include <dbus/dbus-arch-deps.h>
#include <dbus/dbus-memory.h>
#include <dbus/dbus-errors.h>
#include <stdarg.h>
DBUS_BEGIN_DECLS
typedef struct DBusMessage DBusMessage;
typedef struct DBusMessageIter DBusMessageIter;
struct DBusMessageIter
{
#if DBUS_SIZEOF_VOID_P > 8
void *dummy[16];
#else
void *dummy1;
void *dummy2;
dbus_uint32_t dummy3;
int dummy4;
int dummy5;
int dummy6;
int dummy7;
int dummy8;
int dummy9;
int dummy10;
int dummy11;
int pad1;
void *pad2;
void *pad3;
#endif
};
#if DBUS_SIZEOF_VOID_P > 8
#define DBUS_MESSAGE_ITER_INIT_CLOSED \
{ \
{ \
NULL, NULL, NULL, NULL, \
NULL, NULL, NULL, NULL, \
NULL, NULL, NULL, NULL, \
NULL, NULL, NULL, NULL \
} \
}
#else
#define DBUS_MESSAGE_ITER_INIT_CLOSED \
{ \
NULL, /* dummy1 */ \
NULL, /* dummy2 */ \
0, /* dummy3 */ \
0, /* dummy4 */ \
0, /* dummy5 */ \
0, /* dummy6 */ \
0, /* dummy7 */ \
0, /* dummy8 */ \
0, /* dummy9 */ \
0, /* dummy10 */ \
0, /* dummy11 */ \
0, /* pad1 */ \
NULL, /* pad2 */ \
NULL /* pad3 */ \
}
#endif
DBUS_EXPORT
DBusMessage* dbus_message_new (int message_type);
DBUS_EXPORT
DBusMessage* dbus_message_new_method_call (const char *bus_name,
const char *path,
const char *iface,
const char *method);
DBUS_EXPORT
DBusMessage* dbus_message_new_method_return (DBusMessage *method_call);
DBUS_EXPORT
DBusMessage* dbus_message_new_signal (const char *path,
const char *iface,
const char *name);
DBUS_EXPORT
DBusMessage* dbus_message_new_error (DBusMessage *reply_to,
const char *error_name,
const char *error_message);
DBUS_EXPORT
DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to,
const char *error_name,
const char *error_format,
...) _DBUS_GNUC_PRINTF (3, 4);
DBUS_EXPORT
DBusMessage* dbus_message_copy (const DBusMessage *message);
DBUS_EXPORT
DBusMessage* dbus_message_ref (DBusMessage *message);
DBUS_EXPORT
void dbus_message_unref (DBusMessage *message);
DBUS_EXPORT
int dbus_message_get_type (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_set_path (DBusMessage *message,
const char *object_path);
DBUS_EXPORT
const char* dbus_message_get_path (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_has_path (DBusMessage *message,
const char *object_path);
DBUS_EXPORT
dbus_bool_t dbus_message_set_interface (DBusMessage *message,
const char *iface);
DBUS_EXPORT
const char* dbus_message_get_interface (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_has_interface (DBusMessage *message,
const char *iface);
DBUS_EXPORT
dbus_bool_t dbus_message_set_member (DBusMessage *message,
const char *member);
DBUS_EXPORT
const char* dbus_message_get_member (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_has_member (DBusMessage *message,
const char *member);
DBUS_EXPORT
dbus_bool_t dbus_message_set_error_name (DBusMessage *message,
const char *name);
DBUS_EXPORT
const char* dbus_message_get_error_name (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_set_destination (DBusMessage *message,
const char *destination);
DBUS_EXPORT
const char* dbus_message_get_destination (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_set_sender (DBusMessage *message,
const char *sender);
DBUS_EXPORT
const char* dbus_message_get_sender (DBusMessage *message);
DBUS_EXPORT
const char* dbus_message_get_signature (DBusMessage *message);
DBUS_EXPORT
void dbus_message_set_no_reply (DBusMessage *message,
dbus_bool_t no_reply);
DBUS_EXPORT
dbus_bool_t dbus_message_get_no_reply (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_is_method_call (DBusMessage *message,
const char *iface,
const char *method);
DBUS_EXPORT
dbus_bool_t dbus_message_is_signal (DBusMessage *message,
const char *iface,
const char *signal_name);
DBUS_EXPORT
dbus_bool_t dbus_message_is_error (DBusMessage *message,
const char *error_name);
DBUS_EXPORT
dbus_bool_t dbus_message_has_destination (DBusMessage *message,
const char *bus_name);
DBUS_EXPORT
dbus_bool_t dbus_message_has_sender (DBusMessage *message,
const char *unique_bus_name);
DBUS_EXPORT
dbus_bool_t dbus_message_has_signature (DBusMessage *message,
const char *signature);
DBUS_EXPORT
dbus_uint32_t dbus_message_get_serial (DBusMessage *message);
DBUS_EXPORT
void dbus_message_set_serial (DBusMessage *message,
dbus_uint32_t serial);
DBUS_EXPORT
dbus_bool_t dbus_message_set_reply_serial (DBusMessage *message,
dbus_uint32_t reply_serial);
DBUS_EXPORT
dbus_uint32_t dbus_message_get_reply_serial (DBusMessage *message);
DBUS_EXPORT
void dbus_message_set_auto_start (DBusMessage *message,
dbus_bool_t auto_start);
DBUS_EXPORT
dbus_bool_t dbus_message_get_auto_start (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_get_path_decomposed (DBusMessage *message,
char ***path);
DBUS_EXPORT
const char *dbus_message_get_container_instance (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_set_container_instance (DBusMessage *message,
const char *object_path);
DBUS_EXPORT
dbus_bool_t dbus_message_append_args (DBusMessage *message,
int first_arg_type,
...);
DBUS_EXPORT
dbus_bool_t dbus_message_append_args_valist (DBusMessage *message,
int first_arg_type,
va_list var_args);
DBUS_EXPORT
dbus_bool_t dbus_message_get_args (DBusMessage *message,
DBusError *error,
int first_arg_type,
...);
DBUS_EXPORT
dbus_bool_t dbus_message_get_args_valist (DBusMessage *message,
DBusError *error,
int first_arg_type,
va_list var_args);
DBUS_EXPORT
dbus_bool_t dbus_message_contains_unix_fds (DBusMessage *message);
DBUS_EXPORT
void dbus_message_iter_init_closed (DBusMessageIter *iter);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_init (DBusMessage *message,
DBusMessageIter *iter);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_has_next (DBusMessageIter *iter);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_next (DBusMessageIter *iter);
DBUS_EXPORT
char* dbus_message_iter_get_signature (DBusMessageIter *iter);
DBUS_EXPORT
int dbus_message_iter_get_arg_type (DBusMessageIter *iter);
DBUS_EXPORT
int dbus_message_iter_get_element_type (DBusMessageIter *iter);
DBUS_EXPORT
void dbus_message_iter_recurse (DBusMessageIter *iter,
DBusMessageIter *sub);
DBUS_EXPORT
void dbus_message_iter_get_basic (DBusMessageIter *iter,
void *value);
DBUS_EXPORT
int dbus_message_iter_get_element_count(DBusMessageIter *iter);
#ifndef DBUS_DISABLE_DEPRECATED
/* This function returns the wire protocol size of the array in bytes,
* you do not want to know that probably
*/
DBUS_EXPORT
DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter);
#endif
DBUS_EXPORT
void dbus_message_iter_get_fixed_array (DBusMessageIter *iter,
void *value,
int *n_elements);
DBUS_EXPORT
void dbus_message_iter_init_append (DBusMessage *message,
DBusMessageIter *iter);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter *iter,
int type,
const void *value);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter,
int element_type,
const void *value,
int n_elements);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_open_container (DBusMessageIter *iter,
int type,
const char *contained_signature,
DBusMessageIter *sub);
DBUS_EXPORT
dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter,
DBusMessageIter *sub);
DBUS_EXPORT
void dbus_message_iter_abandon_container (DBusMessageIter *iter,
DBusMessageIter *sub);
DBUS_EXPORT
void dbus_message_iter_abandon_container_if_open (DBusMessageIter *iter,
DBusMessageIter *sub);
DBUS_EXPORT
void dbus_message_lock (DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_set_error_from_message (DBusError *error,
DBusMessage *message);
DBUS_EXPORT
dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t *slot_p);
DBUS_EXPORT
void dbus_message_free_data_slot (dbus_int32_t *slot_p);
DBUS_EXPORT
dbus_bool_t dbus_message_set_data (DBusMessage *message,
dbus_int32_t slot,
void *data,
DBusFreeFunction free_data_func);
DBUS_EXPORT
void* dbus_message_get_data (DBusMessage *message,
dbus_int32_t slot);
DBUS_EXPORT
int dbus_message_type_from_string (const char *type_str);
DBUS_EXPORT
const char* dbus_message_type_to_string (int type);
DBUS_EXPORT
dbus_bool_t dbus_message_marshal (DBusMessage *msg,
char **marshalled_data_p,
int *len_p);
DBUS_EXPORT
DBusMessage* dbus_message_demarshal (const char *str,
int len,
DBusError *error);
DBUS_EXPORT
int dbus_message_demarshal_bytes_needed (const char *str,
int len);
DBUS_EXPORT
void dbus_message_set_allow_interactive_authorization (DBusMessage *message,
dbus_bool_t allow);
DBUS_EXPORT
dbus_bool_t dbus_message_get_allow_interactive_authorization (
DBusMessage *message);
static inline void
dbus_clear_message (DBusMessage **pointer_to_message)
{
_dbus_clear_pointer_impl (DBusMessage, pointer_to_message,
dbus_message_unref);
}
DBUS_END_DECLS
#endif /* DBUS_MESSAGE_H */
DBUS_DEPRECATED
#define DBUS_DEPRECATED
Tells the compiler to warn about a function or type if it's used.
Definition dbus-macros.h:60
DBUS_BEGIN_DECLS
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
Definition dbus-macros.h:36
DBUS_END_DECLS
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.
Definition dbus-macros.h:37
DBusFreeFunction
void(* DBusFreeFunction)(void *memory)
The type of a function which frees a block of memory.
Definition dbus-memory.h:65
dbus_message_iter_init_closed
void dbus_message_iter_init_closed(DBusMessageIter *iter)
Initialize iter as if with DBUS_MESSAGE_ITER_INIT_CLOSED.
Definition dbus-message.c:755
dbus_message_set_serial
void dbus_message_set_serial(DBusMessage *message, dbus_uint32_t serial)
Sets the serial number of a message.
Definition dbus-message.c:301
dbus_message_has_destination
dbus_bool_t dbus_message_has_destination(DBusMessage *message, const char *name)
Checks whether the message was sent to the given name.
Definition dbus-message.c:3953
dbus_message_set_interface
dbus_bool_t dbus_message_set_interface(DBusMessage *message, const char *iface)
Sets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the interface...
Definition dbus-message.c:3461
dbus_message_has_interface
dbus_bool_t dbus_message_has_interface(DBusMessage *message, const char *iface)
Checks if the message has an interface.
Definition dbus-message.c:3512
dbus_message_set_no_reply
void dbus_message_set_no_reply(DBusMessage *message, dbus_bool_t no_reply)
Sets a flag indicating that the message does not want a reply; if this flag is set,...
Definition dbus-message.c:3247
dbus_message_append_args_valist
dbus_bool_t dbus_message_append_args_valist(DBusMessage *message, int first_arg_type, va_list var_args)
Like dbus_message_append_args() but takes a va_list for use by language bindings.
Definition dbus-message.c:1875
dbus_message_get_sender
const char * dbus_message_get_sender(DBusMessage *message)
Gets the unique name of the connection which originated this message, or NULL if unknown or inapplica...
Definition dbus-message.c:3773
dbus_message_set_auto_start
void dbus_message_set_auto_start(DBusMessage *message, dbus_bool_t auto_start)
Sets a flag indicating that an owner for the destination name will be automatically started before th...
Definition dbus-message.c:3289
dbus_message_iter_append_basic
dbus_bool_t dbus_message_iter_append_basic(DBusMessageIter *iter, int type, const void *value)
Appends a basic-typed value to the message.
Definition dbus-message.c:2771
dbus_message_get_path
const char * dbus_message_get_path(DBusMessage *message)
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitt...
Definition dbus-message.c:3359
dbus_message_get_interface
const char * dbus_message_get_interface(DBusMessage *message)
Gets the interface this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitted...
Definition dbus-message.c:3490
dbus_message_free_data_slot
DBUS_EXPORT void dbus_message_free_data_slot(dbus_int32_t *slot_p)
Deallocates a global ID for message data slots.
Definition dbus-message.c:4968
dbus_message_set_data
DBUS_EXPORT dbus_bool_t dbus_message_set_data(DBusMessage *message, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func)
Stores a pointer on a DBusMessage, along with an optional function to be used for freeing the data wh...
Definition dbus-message.c:4989
dbus_message_new_error
DBusMessage * dbus_message_new_error(DBusMessage *reply_to, const char *error_name, const char *error_message)
Creates a new message that is an error reply to another message.
Definition dbus-message.c:1515
dbus_message_type_to_string
DBUS_EXPORT const char * dbus_message_type_to_string(int type)
Utility function to convert a D-Bus message type into a machine-readable string (not translated).
Definition dbus-message.c:5081
dbus_message_has_sender
dbus_bool_t dbus_message_has_sender(DBusMessage *message, const char *name)
Checks whether the message has the given unique name as its sender.
Definition dbus-message.c:3988
dbus_message_get_serial
dbus_uint32_t dbus_message_get_serial(DBusMessage *message)
Returns the serial of a message or 0 if none has been specified.
Definition dbus-message.c:1168
dbus_message_set_member
dbus_bool_t dbus_message_set_member(DBusMessage *message, const char *member)
Sets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE...
Definition dbus-message.c:3549
dbus_message_marshal
DBUS_EXPORT dbus_bool_t dbus_message_marshal(DBusMessage *msg, char **marshalled_data_p, int *len_p)
Turn a DBusMessage into the marshalled form as described in the D-Bus specification.
Definition dbus-message.c:5111
dbus_message_iter_get_basic
void dbus_message_iter_get_basic(DBusMessageIter *iter, void *value)
Reads a basic-typed value from the message iterator.
Definition dbus-message.c:2369
dbus_message_get_type
int dbus_message_get_type(DBusMessage *message)
Gets the type of a message.
Definition dbus-message.c:1767
dbus_message_copy
DBusMessage * dbus_message_copy(const DBusMessage *message)
Creates a new message that is an exact replica of the message specified, except that its refcount is ...
Definition dbus-message.c:1632
dbus_message_get_error_name
const char * dbus_message_get_error_name(DBusMessage *message)
Gets the error name (DBUS_MESSAGE_TYPE_ERROR only) or NULL if none.
Definition dbus-message.c:3660
dbus_message_iter_next
dbus_bool_t dbus_message_iter_next(DBusMessageIter *iter)
Moves the iterator to the next field, if any.
Definition dbus-message.c:2186
dbus_message_append_args
dbus_bool_t dbus_message_append_args(DBusMessage *message, int first_arg_type,...)
Appends fields to a message given a variable argument list.
Definition dbus-message.c:1843
dbus_message_iter_get_arg_type
int dbus_message_iter_get_arg_type(DBusMessageIter *iter)
Returns the argument type of the argument that the message iterator points to.
Definition dbus-message.c:2211
dbus_message_get_no_reply
dbus_bool_t dbus_message_get_no_reply(DBusMessage *message)
Returns TRUE if the message does not expect a reply.
Definition dbus-message.c:3266
dbus_message_demarshal_bytes_needed
DBUS_EXPORT int dbus_message_demarshal_bytes_needed(const char *str, int len)
Returns the number of bytes required to be in the buffer to demarshal a D-Bus message.
Definition dbus-message.c:5240
dbus_message_new_signal
DBusMessage * dbus_message_new_signal(const char *path, const char *iface, const char *name)
Constructs a new message representing a signal emission.
Definition dbus-message.c:1469
dbus_message_iter_append_fixed_array
dbus_bool_t dbus_message_iter_append_fixed_array(DBusMessageIter *iter, int element_type, const void *value, int n_elements)
Appends a block of fixed-length values to an array.
Definition dbus-message.c:2922
dbus_message_iter_abandon_container
void dbus_message_iter_abandon_container(DBusMessageIter *iter, DBusMessageIter *sub)
Abandons creation of a contained-typed value and frees resources created by dbus_message_iter_open_co...
Definition dbus-message.c:3123
dbus_message_new_error_printf
DBusMessage * dbus_message_new_error_printf(DBusMessage *reply_to, const char *error_name, const char *error_format,...)
Creates a new message that is an error reply to another message, allowing you to use printf formattin...
Definition dbus-message.c:1587
dbus_message_is_error
dbus_bool_t dbus_message_is_error(DBusMessage *message, const char *error_name)
Checks whether the message is an error reply with the given error name.
Definition dbus-message.c:3920
dbus_message_contains_unix_fds
dbus_bool_t dbus_message_contains_unix_fds(DBusMessage *message)
Checks whether a message contains unix fds.
Definition dbus-message.c:4088
dbus_message_iter_recurse
void dbus_message_iter_recurse(DBusMessageIter *iter, DBusMessageIter *sub)
Recurses into a container value when reading values from a message, initializing a sub-iterator to us...
Definition dbus-message.c:2267
dbus_message_ref
DBusMessage * dbus_message_ref(DBusMessage *message)
Increments the reference count of a DBusMessage.
Definition dbus-message.c:1712
dbus_message_get_auto_start
dbus_bool_t dbus_message_get_auto_start(DBusMessage *message)
Returns TRUE if the message will cause an owner for destination name to be auto-started.
Definition dbus-message.c:3308
dbus_message_iter_get_element_type
int dbus_message_iter_get_element_type(DBusMessageIter *iter)
Returns the element type of the array that the message iterator points to.
Definition dbus-message.c:2230
dbus_message_set_error_name
dbus_bool_t dbus_message_set_error_name(DBusMessage *message, const char *error_name)
Sets the name of the error (DBUS_MESSAGE_TYPE_ERROR).
Definition dbus-message.c:3634
dbus_message_has_signature
dbus_bool_t dbus_message_has_signature(DBusMessage *message, const char *signature)
Checks whether the message has the given signature; see dbus_message_get_signature() for more details...
Definition dbus-message.c:4017
dbus_message_iter_open_container
dbus_bool_t dbus_message_iter_open_container(DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub)
Appends a container-typed value to the message.
Definition dbus-message.c:2986
dbus_message_get_reply_serial
dbus_uint32_t dbus_message_get_reply_serial(DBusMessage *message)
Returns the serial that the message is a reply to or 0 if none.
Definition dbus-message.c:1208
dbus_message_new_method_return
DBusMessage * dbus_message_new_method_return(DBusMessage *method_call)
Constructs a message that is a reply to a method call.
Definition dbus-message.c:1418
dbus_message_new_method_call
DBusMessage * dbus_message_new_method_call(const char *destination, const char *path, const char *iface, const char *method)
Constructs a new message to invoke a method on a remote object.
Definition dbus-message.c:1378
dbus_message_iter_init
dbus_bool_t dbus_message_iter_init(DBusMessage *message, DBusMessageIter *iter)
Initializes a DBusMessageIter for reading the arguments of the message passed in.
Definition dbus-message.c:2136
dbus_message_set_sender
dbus_bool_t dbus_message_set_sender(DBusMessage *message, const char *sender)
Sets the message sender.
Definition dbus-message.c:3742
dbus_message_iter_abandon_container_if_open
void dbus_message_iter_abandon_container_if_open(DBusMessageIter *iter, DBusMessageIter *sub)
Abandons creation of a contained-typed value and frees resources created by dbus_message_iter_open_co...
Definition dbus-message.c:3182
dbus_message_get_destination
const char * dbus_message_get_destination(DBusMessage *message)
Gets the destination of a message or NULL if there is none set.
Definition dbus-message.c:3713
dbus_message_set_path
dbus_bool_t dbus_message_set_path(DBusMessage *message, const char *object_path)
Sets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or the one a s...
Definition dbus-message.c:3330
dbus_message_iter_has_next
dbus_bool_t dbus_message_iter_has_next(DBusMessageIter *iter)
Checks if an iterator has any more fields.
Definition dbus-message.c:2167
dbus_message_get_args_valist
dbus_bool_t dbus_message_get_args_valist(DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args)
Like dbus_message_get_args but takes a va_list for use by language bindings.
Definition dbus-message.c:2061
dbus_message_iter_get_signature
char * dbus_message_iter_get_signature(DBusMessageIter *iter)
Returns the current signature of a message iterator.
Definition dbus-message.c:2292
dbus_message_unref
void dbus_message_unref(DBusMessage *message)
Decrements the reference count of a DBusMessage, freeing the message if the count reaches 0.
Definition dbus-message.c:1735
dbus_message_iter_get_array_len
int dbus_message_iter_get_array_len(DBusMessageIter *iter)
Returns the number of bytes in the array as marshaled in the wire protocol.
Definition dbus-message.c:2458
dbus_message_new
DBusMessage * dbus_message_new(int message_type)
Constructs a new message of the given message type.
Definition dbus-message.c:1334
dbus_set_error_from_message
dbus_bool_t dbus_set_error_from_message(DBusError *error, DBusMessage *message)
Sets a DBusError based on the contents of the given message.
Definition dbus-message.c:4059
dbus_message_type_from_string
DBUS_EXPORT int dbus_message_type_from_string(const char *type_str)
Utility function to convert a machine-readable (not translated) string into a D-Bus message type.
Definition dbus-message.c:5053
dbus_message_iter_get_element_count
int dbus_message_iter_get_element_count(DBusMessageIter *iter)
Returns the number of elements in the array-typed value pointed to by the iterator.
Definition dbus-message.c:2414
dbus_message_set_destination
dbus_bool_t dbus_message_set_destination(DBusMessage *message, const char *destination)
Sets the message's destination.
Definition dbus-message.c:3688
dbus_message_has_path
dbus_bool_t dbus_message_has_path(DBusMessage *message, const char *path)
Checks if the message has a particular object path.
Definition dbus-message.c:3383
dbus_message_lock
DBUS_EXPORT void dbus_message_lock(DBusMessage *message)
Locks a message.
Definition dbus-message.c:431
dbus_message_has_member
dbus_bool_t dbus_message_has_member(DBusMessage *message, const char *member)
Checks if the message has an interface member.
Definition dbus-message.c:3598
dbus_message_get_args
dbus_bool_t dbus_message_get_args(DBusMessage *message, DBusError *error, int first_arg_type,...)
Gets arguments from a message given a variable argument list.
Definition dbus-message.c:2032
dbus_message_is_method_call
dbus_bool_t dbus_message_is_method_call(DBusMessage *message, const char *iface, const char *method)
Checks whether the message is a method call with the given interface and member fields.
Definition dbus-message.c:3865
dbus_message_iter_get_fixed_array
void dbus_message_iter_get_fixed_array(DBusMessageIter *iter, void *value, int *n_elements)
Reads a block of fixed-length values from the message iterator.
Definition dbus-message.c:2503
dbus_message_set_allow_interactive_authorization
DBUS_EXPORT void dbus_message_set_allow_interactive_authorization(DBusMessage *message, dbus_bool_t allow)
Sets a flag indicating that the caller of the method is prepared to wait for interactive authorizatio...
Definition dbus-message.c:5300
dbus_message_get_allow_interactive_authorization
DBUS_EXPORT dbus_bool_t dbus_message_get_allow_interactive_authorization(DBusMessage *message)
Returns whether the flag controlled by dbus_message_set_allow_interactive_authorization() has been se...
Definition dbus-message.c:5318
dbus_message_set_reply_serial
dbus_bool_t dbus_message_set_reply_serial(DBusMessage *message, dbus_uint32_t reply_serial)
Sets the reply serial of a message (the serial of the message this is a reply to).
Definition dbus-message.c:1184
dbus_message_is_signal
dbus_bool_t dbus_message_is_signal(DBusMessage *message, const char *iface, const char *signal_name)
Checks whether the message is a signal with the given interface and member fields.
Definition dbus-message.c:3893
dbus_message_get_signature
const char * dbus_message_get_signature(DBusMessage *message)
Gets the type signature of the message, i.e.
Definition dbus-message.c:3806
dbus_message_set_container_instance
dbus_bool_t dbus_message_set_container_instance(DBusMessage *message, const char *object_path)
Sets the container instance this message was sent from.
Definition dbus-message.c:4110
dbus_message_iter_close_container
dbus_bool_t dbus_message_iter_close_container(DBusMessageIter *iter, DBusMessageIter *sub)
Closes a container-typed value appended to the message; may write out more information to the message...
Definition dbus-message.c:3089
dbus_message_demarshal
DBUS_EXPORT DBusMessage * dbus_message_demarshal(const char *str, int len, DBusError *error)
Demarshal a D-Bus message from the format described in the D-Bus specification.
Definition dbus-message.c:5173
dbus_message_get_path_decomposed
dbus_bool_t dbus_message_get_path_decomposed(DBusMessage *message, char ***path)
Gets the object path this message is being sent to (for DBUS_MESSAGE_TYPE_METHOD_CALL) or being emitt...
Definition dbus-message.c:3427
dbus_message_get_member
const char * dbus_message_get_member(DBusMessage *message)
Gets the interface member being invoked (DBUS_MESSAGE_TYPE_METHOD_CALL) or emitted (DBUS_MESSAGE_TYPE...
Definition dbus-message.c:3576
dbus_message_iter_init_append
void dbus_message_iter_init_append(DBusMessage *message, DBusMessageIter *iter)
Initializes a DBusMessageIter for appending arguments to the end of a message.
Definition dbus-message.c:2533
dbus_message_get_data
DBUS_EXPORT void * dbus_message_get_data(DBusMessage *message, dbus_int32_t slot)
Retrieves data previously set with dbus_message_set_data().
Definition dbus-message.c:5025
dbus_message_allocate_data_slot
DBUS_EXPORT dbus_bool_t dbus_message_allocate_data_slot(dbus_int32_t *slot_p)
Allocates an integer ID to be used for storing application-specific data on any DBusMessage.
Definition dbus-message.c:4950
dbus_message_get_container_instance
const char * dbus_message_get_container_instance(DBusMessage *message)
Gets the container instance this message was sent from, or NULL if none.
Definition dbus-message.c:4136
dbus_uint32_t
unsigned int dbus_uint32_t
A 32-bit unsigned integer on all platforms.
Definition dbus-arch-deps.h:45
dbus_int32_t
int dbus_int32_t
A 32-bit signed integer on all platforms.
Definition dbus-arch-deps.h:44
dbus_bool_t
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
Definition dbus-types.h:37
DBusError
Object representing an exception.
Definition dbus-errors.h:51
DBusMessageIter
DBusMessageIter struct; contains no public fields.
Definition dbus-message.h:64
DBusMessageIter::dummy8
int dummy8
Don't use this.
Definition dbus-message.h:75
DBusMessageIter::dummy11
int dummy11
Don't use this.
Definition dbus-message.h:78
DBusMessageIter::dummy4
int dummy4
Don't use this.
Definition dbus-message.h:71
DBusMessageIter::pad1
int pad1
Don't use this.
Definition dbus-message.h:79
DBusMessageIter::dummy5
int dummy5
Don't use this.
Definition dbus-message.h:72
DBusMessageIter::pad2
void * pad2
Don't use this.
Definition dbus-message.h:80
DBusMessageIter::dummy1
void * dummy1
Don't use this.
Definition dbus-message.h:68
DBusMessageIter::dummy2
void * dummy2
Don't use this.
Definition dbus-message.h:69
DBusMessageIter::dummy6
int dummy6
Don't use this.
Definition dbus-message.h:73
DBusMessageIter::dummy3
dbus_uint32_t dummy3
Don't use this.
Definition dbus-message.h:70
DBusMessageIter::dummy7
int dummy7
Don't use this.
Definition dbus-message.h:74
DBusMessageIter::dummy10
int dummy10
Don't use this.
Definition dbus-message.h:77
DBusMessageIter::dummy9
int dummy9
Don't use this.
Definition dbus-message.h:76
DBusMessageIter::pad3
void * pad3
Don't use this.
Definition dbus-message.h:81
DBusMessage
Internals of DBusMessage.
Definition dbus-message-private.h:102