changeset 26332:2efdd76f5dc0

Fix compilation errors and add padding to UI ops. My bad...
author Paul Aurich <paul@darkrain42.org>
date Sun, 29 Mar 2009 20:54:30 +0000
parents a5010188c01e
children 31e05bafd7a3
files libpurple/disco.c libpurple/disco.h libpurple/protocols/jabber/disco.c
diffstat 3 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/disco.c	Sun Mar 29 19:43:32 2009 +0000
+++ b/libpurple/disco.c	Sun Mar 29 20:54:30 2009 +0000
@@ -255,3 +255,8 @@
 {
 	ops = ui_ops;
 }
+
+PurpleDiscoUiOps *purple_disco_get_ui_ops(void)
+{
+	return ops;
+}
--- a/libpurple/disco.h	Sun Mar 29 19:43:32 2009 +0000
+++ b/libpurple/disco.h	Sun Mar 29 20:54:30 2009 +0000
@@ -71,11 +71,11 @@
 	PURPLE_DISCO_SERVICE_TYPE_ICQ,
 	PURPLE_DISCO_SERVICE_TYPE_IRC,
 	PURPLE_DISCO_SERVICE_TYPE_MAIL,
-	PURPLE_DISCO_SERVICE_TYPE_MSN
+	PURPLE_DISCO_SERVICE_TYPE_MSN,
 	PURPLE_DISCO_SERVICE_TYPE_USER,
 	PURPLE_DISCO_SERVICE_TYPE_QQ,
 	PURPLE_DISCO_SERVICE_TYPE_XMPP,
-	PURPLE_DISCO_SERVICE_TYPE_YAHOO,
+	PURPLE_DISCO_SERVICE_TYPE_YAHOO
 } PurpleDiscoServiceType;
 
 /**
@@ -99,11 +99,19 @@
 };
 
 struct _PurpleDiscoUiOps {
-	void (*dialog_show_with_account)(PurpleAccount* account); /**< Force the ui to pop up a dialog */
-	void (*create)(PurpleDiscoList *list); /**< Init ui resources */
-	void (*destroy)(PurpleDiscoList *list); /**< Free ui resources */
+	/** Ask the UI to display a dialog for the specified account.
+	 */
+	void (*dialog_show_with_account)(PurpleAccount* account);
+	void (*create)(PurpleDiscoList *list); /**< Sets UI-specific data on a disco list */
+	void (*destroy)(PurpleDiscoList *list); /**< Free UI-specific data on the disco list */
 	void (*add_service)(PurpleDiscoList *list, PurpleDiscoService *service, PurpleDiscoService *parent); /**< Add service to dialog */
 	void (*in_progress)(PurpleDiscoList *list, gboolean in_progress); /**< Set progress to dialog */
+
+	/* Padding */
+	void (*_purple_reserved1)(void);
+	void (*_purple_reserved2)(void);
+	void (*_purple_reserved3)(void);
+	void (*_purple_reserved4)(void);
 };
 
 #ifdef __cplusplus
@@ -197,6 +205,13 @@
 void purple_disco_set_ui_ops(PurpleDiscoUiOps *ui_ops);
 
 /**
+ * Returns the service discovery UI operations structure.
+ *
+ * @return A filled-out PurpleDiscoUiOps structure.
+ */
+PurpleDiscoUiOps *purple_disco_get_ui_ops(void);
+
+/**
  * Register service
  * @param gc Connection
  * @param service The service that will be registered
--- a/libpurple/protocols/jabber/disco.c	Sun Mar 29 19:43:32 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Sun Mar 29 20:54:30 2009 +0000
@@ -580,7 +580,7 @@
 	else if (!strcasecmp(str, "conference"))
 		return PURPLE_DISCO_SERVICE_CAT_MUC;
 
-	return PURPLE_DISCO_SERVICE_CAT_NONE;
+	return PURPLE_DISCO_SERVICE_CAT_OTHER;
 }
 
 static PurpleDiscoServiceType