28#ifndef _PURPLE_DBUS_BINDINGS_H_
29#define _PURPLE_DBUS_BINDINGS_H_
32#include <dbus/dbus-glib-lowlevel.h>
39gint purple_dbus_pointer_to_id(gconstpointer node);
41gint purple_dbus_pointer_to_id_error(gconstpointer ptr, DBusError *error);
42gpointer purple_dbus_id_to_pointer_error(gint
id,
PurpleDBusType *type,
43 const char *
typename, DBusError *error);
45#define NULLIFY(id) id = empty_to_null(id)
47#define CHECK_ERROR(error) if (dbus_error_is_set(error)) return NULL;
49#define PURPLE_DBUS_ID_TO_POINTER(ptr, id, type, error) \
51 ptr = (type*) purple_dbus_id_to_pointer_error \
52 (id, PURPLE_DBUS_TYPE(type), #type, error); \
57#define PURPLE_DBUS_POINTER_TO_ID(id, ptr, error) \
59 id = purple_dbus_pointer_to_id_error(ptr,error); \
65purple_dbus_message_get_args (DBusMessage *message,
70purple_dbus_message_get_args_valist (DBusMessage *message,
76purple_dbus_message_iter_get_args (DBusMessageIter *iter,
82purple_dbus_message_iter_get_args_valist (DBusMessageIter *iter,
87dbus_int32_t* purple_dbusify_GList(GList *list, gboolean free_memory,
89dbus_int32_t* purple_dbusify_GSList(GSList *list, gboolean free_memory,
91gpointer* purple_GList_to_array(GList *list, gboolean free_memory,
93gpointer* purple_GSList_to_array(GSList *list, gboolean free_memory,
95GHashTable *purple_dbus_iter_hash_table(DBusMessageIter *iter, DBusError *error);
97const char* empty_to_null(
const char *str);
98const char* null_to_empty(
const char *s);
102 const char *parameters;
103 DBusMessage* (*handler)(DBusMessage *request, DBusError *error);
108DBusConnection *purple_dbus_get_connection(
void);
typedefG_BEGIN_DECLS struct _PurpleDBusType PurpleDBusType
Types of pointers are identified by the ADDRESS of a PurpleDbusType object.