diff libpurple/notify.c @ 15823:32c366eeeb99

sed -ie 's/gaim/purple/g'
author Sean Egan <seanegan@gmail.com>
date Mon, 19 Mar 2007 07:01:17 +0000
parents 5fe8042783c1
children 2ddffaf3613a be098f796b32
line wrap: on
line diff
--- a/libpurple/notify.c	Mon Mar 19 06:11:46 2007 +0000
+++ b/libpurple/notify.c	Mon Mar 19 07:01:17 2007 +0000
@@ -2,9 +2,9 @@
  * @file notify.c Notification API
  * @ingroup core
  *
- * gaim
+ * purple
  *
- * Gaim is the legal property of its developers, whose names are too numerous
+ * Purple is the legal property of its developers, whose names are too numerous
  * to list here.  Please refer to the COPYRIGHT file distributed with this
  * source distribution.
  *
@@ -24,49 +24,49 @@
  */
 #include "notify.h"
 
-static GaimNotifyUiOps *notify_ui_ops = NULL;
+static PurpleNotifyUiOps *notify_ui_ops = NULL;
 static GList *handles = NULL;
 
 typedef struct
 {
-	GaimNotifyType type;
+	PurpleNotifyType type;
 	void *handle;
 	void *ui_handle;
-	GaimNotifyCloseCallback cb;
+	PurpleNotifyCloseCallback cb;
 	gpointer cb_user_data;
-} GaimNotifyInfo;
+} PurpleNotifyInfo;
 
 /**
  * Definition of a user info entry
  */
-struct _GaimNotifyUserInfoEntry
+struct _PurpleNotifyUserInfoEntry
 {
 	char *label;
 	char *value;
-	GaimNotifyUserInfoEntryType type;
+	PurpleNotifyUserInfoEntryType type;
 };
 
-struct _GaimNotifyUserInfo
+struct _PurpleNotifyUserInfo
 {
 	GList *user_info_entries;
 };
 
 void *
-gaim_notify_message(void *handle, GaimNotifyMsgType type,
+purple_notify_message(void *handle, PurpleNotifyMsgType type,
 					const char *title, const char *primary,
-					const char *secondary, GaimNotifyCloseCallback cb, gpointer user_data)
+					const char *secondary, PurpleNotifyCloseCallback cb, gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_val_if_fail(primary != NULL, NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_message != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_MESSAGE;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_MESSAGE;
 		info->handle    = handle;
 		info->ui_handle = ops->notify_message(type, title, primary,
 											  secondary);
@@ -96,19 +96,19 @@
 }
 
 void *
-gaim_notify_email(void *handle, const char *subject, const char *from,
-				  const char *to, const char *url, GaimNotifyCloseCallback cb,
+purple_notify_email(void *handle, const char *subject, const char *from,
+				  const char *to, const char *url, PurpleNotifyCloseCallback cb,
 				  gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_email != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_EMAIL;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_EMAIL;
 		info->handle    = handle;
 		info->ui_handle = ops->notify_email(handle, subject, from, to, url);
 		info->cb = cb;
@@ -136,17 +136,17 @@
 }
 
 void *
-gaim_notify_emails(void *handle, size_t count, gboolean detailed,
+purple_notify_emails(void *handle, size_t count, gboolean detailed,
 				   const char **subjects, const char **froms,
 				   const char **tos, const char **urls,
-				   GaimNotifyCloseCallback cb, gpointer user_data)
+				   PurpleNotifyCloseCallback cb, gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_val_if_fail(count != 0, NULL);
 
 	if (count == 1) {
-		return gaim_notify_email(handle,
+		return purple_notify_email(handle,
 								 (subjects == NULL ? NULL : *subjects),
 								 (froms    == NULL ? NULL : *froms),
 								 (tos      == NULL ? NULL : *tos),
@@ -154,13 +154,13 @@
 								 cb, user_data);
 	}
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_emails != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_EMAILS;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_EMAILS;
 		info->handle    = handle;
 		info->ui_handle = ops->notify_emails(handle, count, detailed, subjects,
 											 froms, tos, urls);
@@ -190,21 +190,21 @@
 }
 
 void *
-gaim_notify_formatted(void *handle, const char *title, const char *primary,
+purple_notify_formatted(void *handle, const char *title, const char *primary,
 					  const char *secondary, const char *text,
-					  GaimNotifyCloseCallback cb, gpointer user_data)
+					  PurpleNotifyCloseCallback cb, gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_val_if_fail(primary != NULL, NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_formatted != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_FORMATTED;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_FORMATTED;
 		info->handle    = handle;
 		info->ui_handle = ops->notify_formatted(title, primary, secondary, text);
 		info->cb = cb;
@@ -233,20 +233,20 @@
 }
 
 void *
-gaim_notify_searchresults(GaimConnection *gc, const char *title,
+purple_notify_searchresults(PurpleConnection *gc, const char *title,
 						  const char *primary, const char *secondary,
-						  GaimNotifySearchResults *results, GaimNotifyCloseCallback cb,
+						  PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb,
 						  gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_searchresults != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_SEARCHRESULTS;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_SEARCHRESULTS;
 		info->handle    = gc;
 		info->ui_handle = ops->notify_searchresults(gc, title, primary,
 													secondary, results, user_data);
@@ -276,14 +276,14 @@
 }
 
 void
-gaim_notify_searchresults_free(GaimNotifySearchResults *results)
+purple_notify_searchresults_free(PurpleNotifySearchResults *results)
 {
 	GList *l;
 
 	g_return_if_fail(results != NULL);
 
 	for (l = results->buttons; l; l = g_list_delete_link(l, l)) {
-		GaimNotifySearchButton *button = l->data;
+		PurpleNotifySearchButton *button = l->data;
 		g_free(button->label);
 		g_free(button);
 	}
@@ -295,7 +295,7 @@
 	}
 
 	for (l = results->columns; l; l = g_list_delete_link(l, l)) {
-		GaimNotifySearchColumn *column = l->data;
+		PurpleNotifySearchColumn *column = l->data;
 		g_free(column->title);
 		g_free(column);
 	}
@@ -304,13 +304,13 @@
 }
 
 void
-gaim_notify_searchresults_new_rows(GaimConnection *gc,
-		GaimNotifySearchResults *results,
+purple_notify_searchresults_new_rows(PurpleConnection *gc,
+		PurpleNotifySearchResults *results,
 		void *data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_searchresults != NULL) {
 		ops->notify_searchresults_new_rows(gc, results, data);
@@ -318,16 +318,16 @@
 }
 
 void
-gaim_notify_searchresults_button_add(GaimNotifySearchResults *results,
-									 GaimNotifySearchButtonType type,
-									 GaimNotifySearchResultsCallback cb)
+purple_notify_searchresults_button_add(PurpleNotifySearchResults *results,
+									 PurpleNotifySearchButtonType type,
+									 PurpleNotifySearchResultsCallback cb)
 {
-	GaimNotifySearchButton *button;
+	PurpleNotifySearchButton *button;
 
 	g_return_if_fail(results != NULL);
 	g_return_if_fail(cb != NULL);
 
-	button = g_new0(GaimNotifySearchButton, 1);
+	button = g_new0(PurpleNotifySearchButton, 1);
 	button->callback = cb;
 	button->type = type;
 
@@ -336,36 +336,36 @@
 
 
 void
-gaim_notify_searchresults_button_add_labeled(GaimNotifySearchResults *results,
+purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results,
                                              const char *label,
-                                             GaimNotifySearchResultsCallback cb) {
-	GaimNotifySearchButton *button;
+                                             PurpleNotifySearchResultsCallback cb) {
+	PurpleNotifySearchButton *button;
 
 	g_return_if_fail(results != NULL);
 	g_return_if_fail(cb != NULL);
 	g_return_if_fail(label != NULL);
 	g_return_if_fail(*label != '\0');
 
-	button = g_new0(GaimNotifySearchButton, 1);
+	button = g_new0(PurpleNotifySearchButton, 1);
 	button->callback = cb;
-	button->type = GAIM_NOTIFY_BUTTON_LABELED;
+	button->type = PURPLE_NOTIFY_BUTTON_LABELED;
 	button->label = g_strdup(label);
 
 	results->buttons = g_list_append(results->buttons, button);
 }
 
 
-GaimNotifySearchResults *
-gaim_notify_searchresults_new()
+PurpleNotifySearchResults *
+purple_notify_searchresults_new()
 {
-	GaimNotifySearchResults *rs = g_new0(GaimNotifySearchResults, 1);
+	PurpleNotifySearchResults *rs = g_new0(PurpleNotifySearchResults, 1);
 
 	return rs;
 }
 
 void
-gaim_notify_searchresults_column_add(GaimNotifySearchResults *results,
-									 GaimNotifySearchColumn *column)
+purple_notify_searchresults_column_add(PurpleNotifySearchResults *results,
+									 PurpleNotifySearchColumn *column)
 {
 	g_return_if_fail(results != NULL);
 	g_return_if_fail(column  != NULL);
@@ -373,7 +373,7 @@
 	results->columns = g_list_append(results->columns, column);
 }
 
-void gaim_notify_searchresults_row_add(GaimNotifySearchResults *results,
+void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
 									   GList *row)
 {
 	g_return_if_fail(results != NULL);
@@ -382,21 +382,21 @@
 	results->rows = g_list_append(results->rows, row);
 }
 
-GaimNotifySearchColumn *
-gaim_notify_searchresults_column_new(const char *title)
+PurpleNotifySearchColumn *
+purple_notify_searchresults_column_new(const char *title)
 {
-	GaimNotifySearchColumn *sc;
+	PurpleNotifySearchColumn *sc;
 
 	g_return_val_if_fail(title != NULL, NULL);
 
-	sc = g_new0(GaimNotifySearchColumn, 1);
+	sc = g_new0(PurpleNotifySearchColumn, 1);
 	sc->title = g_strdup(title);
 
 	return sc;
 }
 
 guint
-gaim_notify_searchresults_get_columns_count(GaimNotifySearchResults *results)
+purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results)
 {
 	g_return_val_if_fail(results != NULL, 0);
 
@@ -404,7 +404,7 @@
 }
 
 guint
-gaim_notify_searchresults_get_rows_count(GaimNotifySearchResults *results)
+purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results)
 {
 	g_return_val_if_fail(results != NULL, 0);
 
@@ -412,16 +412,16 @@
 }
 
 char *
-gaim_notify_searchresults_column_get_title(GaimNotifySearchResults *results,
+purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results,
 										   unsigned int column_id)
 {
 	g_return_val_if_fail(results != NULL, NULL);
 
-	return ((GaimNotifySearchColumn *)g_list_nth_data(results->columns, column_id))->title;
+	return ((PurpleNotifySearchColumn *)g_list_nth_data(results->columns, column_id))->title;
 }
 
 GList *
-gaim_notify_searchresults_row_get(GaimNotifySearchResults *results,
+purple_notify_searchresults_row_get(PurpleNotifySearchResults *results,
 								  unsigned int row_id)
 {
 	g_return_val_if_fail(results != NULL, NULL);
@@ -430,24 +430,24 @@
 }
 
 void *
-gaim_notify_userinfo(GaimConnection *gc, const char *who,
-						   GaimNotifyUserInfo *user_info, GaimNotifyCloseCallback cb, gpointer user_data)
+purple_notify_userinfo(PurpleConnection *gc, const char *who,
+						   PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, gpointer user_data)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_val_if_fail(who != NULL, NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_userinfo != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_USERINFO;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_USERINFO;
 		info->handle    = gc;
 
-		gaim_signal_emit(gaim_notify_get_handle(), "displaying-userinfo",
-						 gaim_connection_get_account(gc), who, user_info);
+		purple_signal_emit(purple_notify_get_handle(), "displaying-userinfo",
+						 purple_connection_get_account(gc), who, user_info);
 
 		info->ui_handle = ops->notify_userinfo(gc, who, user_info);
 		info->cb = cb;
@@ -475,21 +475,21 @@
 	return NULL;
 }
 
-GaimNotifyUserInfoEntry *
-gaim_notify_user_info_entry_new(const char *label, const char *value)
+PurpleNotifyUserInfoEntry *
+purple_notify_user_info_entry_new(const char *label, const char *value)
 {
-	GaimNotifyUserInfoEntry *user_info_entry;
+	PurpleNotifyUserInfoEntry *user_info_entry;
 	
-	user_info_entry = g_new0(GaimNotifyUserInfoEntry, 1);
+	user_info_entry = g_new0(PurpleNotifyUserInfoEntry, 1);
 	user_info_entry->label = g_strdup(label);
 	user_info_entry->value = g_strdup(value);
-	user_info_entry->type = GAIM_NOTIFY_USER_INFO_ENTRY_PAIR;
+	user_info_entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR;
 
 	return user_info_entry;
 }
 
 static void
-gaim_notify_user_info_entry_destroy(GaimNotifyUserInfoEntry *user_info_entry)
+purple_notify_user_info_entry_destroy(PurpleNotifyUserInfoEntry *user_info_entry)
 {
 	g_return_if_fail(user_info_entry != NULL);
 	
@@ -498,33 +498,33 @@
 	g_free(user_info_entry);
 }
 
-GaimNotifyUserInfo *
-gaim_notify_user_info_new()
+PurpleNotifyUserInfo *
+purple_notify_user_info_new()
 {
-	GaimNotifyUserInfo *user_info;
+	PurpleNotifyUserInfo *user_info;
 	
-	user_info = g_new0(GaimNotifyUserInfo, 1);
+	user_info = g_new0(PurpleNotifyUserInfo, 1);
 	user_info->user_info_entries = NULL;
 	
 	return user_info;
 }
 
 void
-gaim_notify_user_info_destroy(GaimNotifyUserInfo *user_info)
+purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info)
 {
 	GList *l;
 
 	for (l = user_info->user_info_entries; l != NULL; l = l->next) {
-		GaimNotifyUserInfoEntry *user_info_entry = l->data;
+		PurpleNotifyUserInfoEntry *user_info_entry = l->data;
 		
-		gaim_notify_user_info_entry_destroy(user_info_entry);
+		purple_notify_user_info_entry_destroy(user_info_entry);
 	}
 	
 	g_list_free(user_info->user_info_entries);
 }
 
 GList *
-gaim_notify_user_info_get_entries(GaimNotifyUserInfo *user_info)
+purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info)
 {
 	g_return_val_if_fail(user_info != NULL, NULL);
 
@@ -532,7 +532,7 @@
 }
 
 char *
-gaim_notify_user_info_get_text_with_newline(GaimNotifyUserInfo *user_info, const char *newline)
+purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline)
 {
 	GList *l;
 	GString *text;
@@ -540,9 +540,9 @@
 	text = g_string_new("");
 
 	for (l = user_info->user_info_entries; l != NULL; l = l->next) {
-		GaimNotifyUserInfoEntry *user_info_entry = l->data;
+		PurpleNotifyUserInfoEntry *user_info_entry = l->data;
 		/* Add a newline before a section header */
-		if (user_info_entry->type == GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER)
+		if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER)
 			g_string_append(text, newline);
 
 		/* Handle the label/value pair itself */
@@ -555,16 +555,16 @@
 			g_string_append(text, user_info_entry->value);			
 
 		/* Display a section break as a horizontal line */
-		if (user_info_entry->type == GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK)
+		if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK)
 			g_string_append(text, "<HR>");
 
 		/* Don't insert a new line before or after a section break; <HR> does that for us */
-		if ((user_info_entry->type != GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK) &&
-			(l->next && ((((GaimNotifyUserInfoEntry *)(l->next->data))->type != GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK))))
+		if ((user_info_entry->type != PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK) &&
+			(l->next && ((((PurpleNotifyUserInfoEntry *)(l->next->data))->type != PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK))))
 			g_string_append(text, newline);
 		
 		/* Add an extra newline after a section header */
-		if (user_info_entry->type == GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER)
+		if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER)
 			g_string_append(text, newline);
 	}
 
@@ -573,7 +573,7 @@
 
 
 gchar *
-gaim_notify_user_info_entry_get_label(GaimNotifyUserInfoEntry *user_info_entry)
+purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry)
 {
 	g_return_val_if_fail(user_info_entry != NULL, NULL);
 
@@ -581,7 +581,7 @@
 }
 
 void
-gaim_notify_user_info_entry_set_label(GaimNotifyUserInfoEntry *user_info_entry, const char *label)
+purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label)
 {
 	g_return_if_fail(user_info_entry != NULL);
 
@@ -590,7 +590,7 @@
 }
 
 gchar *
-gaim_notify_user_info_entry_get_value(GaimNotifyUserInfoEntry *user_info_entry)
+purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry)
 {
 	g_return_val_if_fail(user_info_entry != NULL, NULL);
 	
@@ -598,7 +598,7 @@
 }
 
 void
-gaim_notify_user_info_entry_set_value(GaimNotifyUserInfoEntry *user_info_entry, const char *value)
+purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value)
 {
 	g_return_if_fail(user_info_entry != NULL);
 
@@ -606,16 +606,16 @@
 	user_info_entry->value = g_strdup(value);
 }
 
-GaimNotifyUserInfoEntryType
-gaim_notify_user_info_entry_get_type(GaimNotifyUserInfoEntry *user_info_entry)
+PurpleNotifyUserInfoEntryType
+purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry)
 {
-	g_return_val_if_fail(user_info_entry != NULL, GAIM_NOTIFY_USER_INFO_ENTRY_PAIR);
+	g_return_val_if_fail(user_info_entry != NULL, PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR);
 
 	return user_info_entry->type;
 }
 
 void
-gaim_notify_user_info_entry_set_type(GaimNotifyUserInfoEntry *user_info_entry, GaimNotifyUserInfoEntryType type)
+purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, PurpleNotifyUserInfoEntryType type)
 {
 	g_return_if_fail(user_info_entry != NULL);
 
@@ -623,25 +623,25 @@
 }
 
 void
-gaim_notify_user_info_add_pair(GaimNotifyUserInfo *user_info, const char *label, const char *value)
+purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value)
 {
-	GaimNotifyUserInfoEntry *entry;
+	PurpleNotifyUserInfoEntry *entry;
 	
-	entry = gaim_notify_user_info_entry_new(label, value);
+	entry = purple_notify_user_info_entry_new(label, value);
 	user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry);
 }
 
 void
-gaim_notify_user_info_prepend_pair(GaimNotifyUserInfo *user_info, const char *label, const char *value)
+purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value)
 {
-	GaimNotifyUserInfoEntry *entry;
+	PurpleNotifyUserInfoEntry *entry;
 
-	entry = gaim_notify_user_info_entry_new(label, value);
+	entry = purple_notify_user_info_entry_new(label, value);
 	user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry);
 }
 
 void
-gaim_notify_user_info_remove_entry(GaimNotifyUserInfo *user_info, GaimNotifyUserInfoEntry *entry)
+purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *entry)
 {
 	g_return_if_fail(user_info != NULL);
 	g_return_if_fail(entry != NULL);
@@ -650,48 +650,48 @@
 }
 
 void
-gaim_notify_user_info_add_section_header(GaimNotifyUserInfo *user_info, const char *label)
+purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label)
 {
-	GaimNotifyUserInfoEntry *entry;
+	PurpleNotifyUserInfoEntry *entry;
 	
-	entry = gaim_notify_user_info_entry_new(label, NULL);
-	entry->type = GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER;
+	entry = purple_notify_user_info_entry_new(label, NULL);
+	entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER;
 
 	user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry);
 }
 
 void
-gaim_notify_user_info_add_section_break(GaimNotifyUserInfo *user_info)
+purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info)
 {
-	GaimNotifyUserInfoEntry *entry;
+	PurpleNotifyUserInfoEntry *entry;
 	
-	entry = gaim_notify_user_info_entry_new(NULL, NULL);
-	entry->type = GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK;
+	entry = purple_notify_user_info_entry_new(NULL, NULL);
+	entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK;
 
 	user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry);
 }
 
 void
-gaim_notify_user_info_remove_last_item(GaimNotifyUserInfo *user_info)
+purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info)
 {
 	user_info->user_info_entries = g_list_remove(user_info->user_info_entries,
 												 g_list_last(user_info->user_info_entries)->data);
 }
 
 void *
-gaim_notify_uri(void *handle, const char *uri)
+purple_notify_uri(void *handle, const char *uri)
 {
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_val_if_fail(uri != NULL, NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	if (ops != NULL && ops->notify_uri != NULL) {
-		GaimNotifyInfo *info;
+		PurpleNotifyInfo *info;
 
-		info            = g_new0(GaimNotifyInfo, 1);
-		info->type      = GAIM_NOTIFY_URI;
+		info            = g_new0(PurpleNotifyInfo, 1);
+		info->type      = PURPLE_NOTIFY_URI;
 		info->handle    = handle;
 		info->ui_handle = ops->notify_uri(uri);
 
@@ -711,17 +711,17 @@
 }
 
 void
-gaim_notify_close(GaimNotifyType type, void *ui_handle)
+purple_notify_close(PurpleNotifyType type, void *ui_handle)
 {
 	GList *l;
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_if_fail(ui_handle != NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	for (l = handles; l != NULL; l = l->next) {
-		GaimNotifyInfo *info = l->data;
+		PurpleNotifyInfo *info = l->data;
 
 		if (info->ui_handle == ui_handle) {
 			handles = g_list_remove(handles, info);
@@ -740,17 +740,17 @@
 }
 
 void
-gaim_notify_close_with_handle(void *handle)
+purple_notify_close_with_handle(void *handle)
 {
 	GList *l, *l_next;
-	GaimNotifyUiOps *ops;
+	PurpleNotifyUiOps *ops;
 
 	g_return_if_fail(handle != NULL);
 
-	ops = gaim_notify_get_ui_ops();
+	ops = purple_notify_get_ui_ops();
 
 	for (l = handles; l != NULL; l = l_next) {
-		GaimNotifyInfo *info = l->data;
+		PurpleNotifyInfo *info = l->data;
 
 		l_next = l->next;
 
@@ -769,19 +769,19 @@
 }
 
 void
-gaim_notify_set_ui_ops(GaimNotifyUiOps *ops)
+purple_notify_set_ui_ops(PurpleNotifyUiOps *ops)
 {
 	notify_ui_ops = ops;
 }
 
-GaimNotifyUiOps *
-gaim_notify_get_ui_ops(void)
+PurpleNotifyUiOps *
+purple_notify_get_ui_ops(void)
 {
 	return notify_ui_ops;
 }
 
 void *
-gaim_notify_get_handle(void)
+purple_notify_get_handle(void)
 {
 	static int handle;
 
@@ -789,21 +789,21 @@
 }
 
 void
-gaim_notify_init(void)
+purple_notify_init(void)
 {
-	gpointer handle = gaim_notify_get_handle();
+	gpointer handle = purple_notify_get_handle();
 
-	gaim_signal_register(handle, "displaying-userinfo",
-						 gaim_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3,
-						 gaim_value_new(GAIM_TYPE_SUBTYPE,
-										GAIM_SUBTYPE_ACCOUNT),
-						 gaim_value_new(GAIM_TYPE_STRING),
-						 gaim_value_new(GAIM_TYPE_SUBTYPE,
-										GAIM_SUBTYPE_USERINFO));
+	purple_signal_register(handle, "displaying-userinfo",
+						 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3,
+						 purple_value_new(PURPLE_TYPE_SUBTYPE,
+										PURPLE_SUBTYPE_ACCOUNT),
+						 purple_value_new(PURPLE_TYPE_STRING),
+						 purple_value_new(PURPLE_TYPE_SUBTYPE,
+										PURPLE_SUBTYPE_USERINFO));
 }
 
 void
-gaim_notify_uninit(void)
+purple_notify_uninit(void)
 {
-	gaim_signals_unregister_by_instance(gaim_notify_get_handle());
+	purple_signals_unregister_by_instance(purple_notify_get_handle());
 }