summaryrefslogtreecommitdiff
path: root/libpurple/prpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpurple/prpl.h')
-rw-r--r--libpurple/prpl.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/libpurple/prpl.h b/libpurple/prpl.h
index a1ff780cbe..20f0e1408c 100644
--- a/libpurple/prpl.h
+++ b/libpurple/prpl.h
@@ -63,6 +63,7 @@ typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec;
#include "conversation.h"
#include "ft.h"
#include "imgstore.h"
+#include "media.h"
#include "notify.h"
#include "proxy.h"
#include "plugin.h"
@@ -350,11 +351,19 @@ struct _PurplePluginProtocolInfo
/* Attention API for sending & receiving zaps/nudges/buzzes etc. */
gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
GList *(*attention_types)(PurpleAccount *acct);
-
- void (*_purple_reserved3)(void);
- void (*_purple_reserved4)(void);
+#ifdef USE_FARSIGHT
+ PurpleMedia *(*initiate_media)(PurpleConnection *conn, const char *who, PurpleMediaStreamType type);
+#else
+ void (*initiate_media)(void)
+#endif
+ /* Make sure you do not try to dereference anything past struct_size! */
+ int struct_size;
};
+#define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
+ ((G_STRUCT_OFFSET(PurpleProtocolPluginInfo, member) < prpl->struct_size) && \
+ prpl->member != NULL)
+
#define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL)