00001
00028 #ifndef _PURPLE_DBUS_SERVER_H_
00029 #define _PURPLE_DBUS_SERVER_H_
00030
00031 #include "value.h"
00032
00033
00034 G_BEGIN_DECLS
00035
00048 typedef struct _PurpleDBusType PurpleDBusType;
00049
00050 struct _PurpleDBusType {
00051 PurpleDBusType *parent;
00052 };
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #define PURPLE_DBUS_TYPE(type) (&PURPLE_DBUS_TYPE_##type)
00067
00068
00069 #define PURPLE_DBUS_DECLARE_TYPE(type) \
00070 extern PurpleDBusType PURPLE_DBUS_TYPE_##type;
00071
00072 #define PURPLE_DBUS_DEFINE_TYPE(type) \
00073 PurpleDBusType PURPLE_DBUS_TYPE_##type = { NULL };
00074
00075 #define PURPLE_DBUS_DEFINE_INHERITING_TYPE(type, parent) \
00076 PurpleDBusType PURPLE_DBUS_TYPE_##type = { PURPLE_DBUS_TYPE(parent) };
00077
00078 #define PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin) \
00079 if (purple_dbus_get_init_error() != NULL) \
00080 { \
00081 gchar *title; \
00082 title = g_strdup_printf("Unable to Load %s Plugin", plugin->info->name); \
00083 purple_notify_error(NULL, title, \
00084 _("Purple's D-BUS server is not running for the reason listed below"), \
00085 _(purple_dbus_get_init_error())); \
00086 g_free(title); \
00087 return FALSE; \
00088 }
00089
00117 void purple_dbus_init_ids(void);
00118
00125 void purple_dbus_register_pointer(gpointer node, PurpleDBusType *type);
00126
00133 void purple_dbus_unregister_pointer(gpointer node);
00134
00135
00136
00146 void purple_dbus_signal_emit_purple(const char *name, int num_values,
00147 PurpleValue **values, va_list vargs);
00148
00163 const char *purple_dbus_get_init_error(void);
00164
00170 void *purple_dbus_get_handle(void);
00171
00177 gboolean purple_dbus_is_owner(void);
00178
00183 void purple_dbus_init(void);
00184
00188 void purple_dbus_uninit(void);
00189
00200 #define DBUS_EXPORT
00201
00202
00203
00204
00205
00206
00207
00208 #include "dbus-types.h"
00209
00210 G_END_DECLS
00211
00212 #endif