00001
00027 #ifndef _PURPLE_DBUS_SERVER_H_
00028 #define _PURPLE_DBUS_SERVER_H_
00029
00030 #include "value.h"
00031
00032
00033 G_BEGIN_DECLS
00034
00047 typedef struct _PurpleDBusType PurpleDBusType;
00048
00049 struct _PurpleDBusType {
00050 PurpleDBusType *parent;
00051 };
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #define PURPLE_DBUS_TYPE(type) (&PURPLE_DBUS_TYPE_##type)
00066
00067
00068 #define PURPLE_DBUS_DECLARE_TYPE(type) \
00069 extern PurpleDBusType PURPLE_DBUS_TYPE_##type;
00070
00071 #define PURPLE_DBUS_DEFINE_TYPE(type) \
00072 PurpleDBusType PURPLE_DBUS_TYPE_##type = { NULL };
00073
00074 #define PURPLE_DBUS_DEFINE_INHERITING_TYPE(type, parent) \
00075 PurpleDBusType PURPLE_DBUS_TYPE_##type = { PURPLE_DBUS_TYPE(parent) };
00076
00077 #define PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin) \
00078 if (purple_dbus_get_init_error() != NULL) \
00079 { \
00080 gchar *title; \
00081 title = g_strdup_printf("Unable to Load %s Plugin", plugin->info->name); \
00082 purple_notify_error(NULL, title, \
00083 _("Purple's D-BUS server is not running for the reason listed below"), \
00084 _(purple_dbus_get_init_error())); \
00085 g_free(title); \
00086 return FALSE; \
00087 }
00088
00116 void purple_dbus_init_ids(void);
00117
00124 void purple_dbus_register_pointer(gpointer node, PurpleDBusType *type);
00125
00132 void purple_dbus_unregister_pointer(gpointer node);
00133
00134
00135
00145 void purple_dbus_signal_emit_purple(const char *name, int num_values,
00146 PurpleValue **values, va_list vargs);
00147
00162 const char *purple_dbus_get_init_error(void);
00163
00169 void *purple_dbus_get_handle(void);
00170
00175 void purple_dbus_init(void);
00176
00180 void purple_dbus_uninit(void);
00181
00192 #define DBUS_EXPORT
00193
00194
00195
00196
00197
00198
00199
00200 #include "dbus-types.h"
00201
00202 G_END_DECLS
00203
00204 #endif