00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _PURPLE_DBUS_SERVER_H_
00030 #define _PURPLE_DBUS_SERVER_H_
00031
00032 #include "value.h"
00033
00034
00035 G_BEGIN_DECLS
00036
00049 typedef struct _PurpleDBusType PurpleDBusType;
00050
00051 struct _PurpleDBusType {
00052 PurpleDBusType *parent;
00053 };
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #define PURPLE_DBUS_TYPE(type) (&PURPLE_DBUS_TYPE_##type)
00068
00069
00070 #define PURPLE_DBUS_DECLARE_TYPE(type) \
00071 extern PurpleDBusType PURPLE_DBUS_TYPE_##type;
00072
00073 #define PURPLE_DBUS_DEFINE_TYPE(type) \
00074 PurpleDBusType PURPLE_DBUS_TYPE_##type = { NULL };
00075
00076 #define PURPLE_DBUS_DEFINE_INHERITING_TYPE(type, parent) \
00077 PurpleDBusType PURPLE_DBUS_TYPE_##type = { PURPLE_DBUS_TYPE(parent) };
00078
00079 #define PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin) \
00080 if (purple_dbus_get_init_error() != NULL) \
00081 { \
00082 gchar *title; \
00083 title = g_strdup_printf("Unable to Load %s Plugin", plugin->info->name); \
00084 purple_notify_error(NULL, title, \
00085 _("Purple's D-BUS server is not running for the reason listed below"), \
00086 _(purple_dbus_get_init_error())); \
00087 g_free(title); \
00088 return FALSE; \
00089 }
00090
00118 void purple_dbus_init_ids(void);
00119
00126 void purple_dbus_register_pointer(gpointer node, PurpleDBusType *type);
00127
00134 void purple_dbus_unregister_pointer(gpointer node);
00135
00136
00137
00147 void purple_dbus_signal_emit_purple(const char *name, int num_values,
00148 PurpleValue **values, va_list vargs);
00149
00164 const char *purple_dbus_get_init_error(void);
00165
00171 void *purple_dbus_get_handle(void);
00172
00178 gboolean purple_dbus_is_owner(void);
00179
00184 void purple_dbus_init(void);
00185
00189 void purple_dbus_uninit(void);
00190
00201 #define DBUS_EXPORT
00202
00203
00204
00205
00206
00207
00208
00209 #include "dbus-types.h"
00210
00211 G_END_DECLS
00212
00213 #endif