diff libpurple/prpl.h @ 19426:6395c2e96bc2

Attention API for nudges/buzzes/zaps of various protocols. (This API addition can now be committed since it we're in 2.2.0.) Patch also available at http://msimprpl.darkthoughts.net/attention3.diff. Closes #2662.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 25 Aug 2007 22:33:40 +0000
parents f12bf92d64ec
children 1b5e786d137a
line wrap: on
line diff
--- a/libpurple/prpl.h	Sat Aug 25 05:41:25 2007 +0000
+++ b/libpurple/prpl.h	Sat Aug 25 22:33:40 2007 +0000
@@ -30,6 +30,7 @@
 #define _PURPLE_PRPL_H_
 
 typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo;
+typedef struct _PurpleAttentionType PurpleAttentionType;
 
 /**************************************************************************/
 /** @name Basic Protocol Information                                      */
@@ -91,6 +92,14 @@
 	gboolean secret;
 };
 
+struct _PurpleAttentionType
+{
+	const char *icon_name;             /**< Icon to display (optional) */
+	const char *name;                  /**< Shown in GUI elements */
+	const char *incoming_description;  /**< Shown when sent */
+	const char *outgoing_description;  /**< Shown when receied */
+};
+
 /**
  * Protocol options
  *
@@ -332,8 +341,10 @@
 	/* room list serialize */
 	char *(*roomlist_room_serialize)(PurpleRoomlistRoom *room);
 
-	void (*_purple_reserved1)(void);
-	void (*_purple_reserved2)(void);
+	/* 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);
 };