/soc/2012/tomkiewicz/gg: b1bef9a92b4c: Gadu-Gadu: rename purple....

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Thu Jul 5 13:31:52 EDT 2012


Changeset: b1bef9a92b4c13d31241abb46b08905a6d3df866
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-06-30 11:57 +0200
Branch:	 soc.2012.gg
URL: http://hg.pidgin.im/soc/2012/tomkiewicz/gg/rev/b1bef9a92b4c

Description:

Gadu-Gadu: rename purple.(c|h) to purplew.(c|h) - purple wrappers

diffstat:

 libpurple/protocols/gg/Makefile.am |   4 ++--
 libpurple/protocols/gg/account.c   |   8 ++++----
 libpurple/protocols/gg/gg.c        |   6 +++---
 libpurple/protocols/gg/purple.c    |  22 +++++++++++-----------
 libpurple/protocols/gg/purple.h    |  23 ++++++++++++-----------
 5 files changed, 32 insertions(+), 31 deletions(-)

diffs (190 lines):

diff --git a/libpurple/protocols/gg/Makefile.am b/libpurple/protocols/gg/Makefile.am
--- a/libpurple/protocols/gg/Makefile.am
+++ b/libpurple/protocols/gg/Makefile.am
@@ -64,8 +64,8 @@
 	account.c \
 	deprecated.h \
 	deprecated.c \
-	purple.h \
-	purple.c
+	purplew.h \
+	purplew.c
 
 AM_CFLAGS = $(st)
 
diff --git a/libpurple/protocols/gg/account.c b/libpurple/protocols/gg/account.c
--- a/libpurple/protocols/gg/account.c
+++ b/libpurple/protocols/gg/account.c
@@ -5,7 +5,7 @@
 #include <request.h>
 
 #include "deprecated.h"
-#include "purple.h"
+#include "purplew.h"
 #include "utils.h"
 
 /*******************************************************************************
@@ -19,7 +19,7 @@
 	void *user_data;
 	
 	struct gg_http *h;
-	ggp_purple_request_processing_handle *req_processing;
+	ggp_purplew_request_processing_handle *req_processing;
 	guint inpa;
 } ggp_account_token_reqdata;
 
@@ -45,7 +45,7 @@
 	
 	if (reqdata->req_processing)
 	{
-		ggp_purple_request_processing_done(reqdata->req_processing);
+		ggp_purplew_request_processing_done(reqdata->req_processing);
 		reqdata->req_processing = NULL;
 	}
 	reqdata->callback(reqdata->gc, token, reqdata->user_data);
@@ -83,7 +83,7 @@
 	reqdata->gc = gc;
 	reqdata->user_data = user_data;
 	reqdata->h = h;
-	reqdata->req_processing = ggp_purple_request_processing(gc, NULL, reqdata, ggp_account_token_request_cancel);
+	reqdata->req_processing = ggp_purplew_request_processing(gc, NULL, reqdata, ggp_account_token_request_cancel);
 	reqdata->inpa = purple_input_add(h->fd, PURPLE_INPUT_READ, ggp_account_token_handler, reqdata);
 }
 
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -47,7 +47,7 @@
 #include "resolver-purple.h"
 #include "account.h"
 #include "deprecated.h"
-#include "purple.h"
+#include "purplew.h"
 
 /* Prototypes */
 static void ggp_set_status(PurpleAccount *account, PurpleStatus *status);
@@ -357,7 +357,7 @@
 
 	if (req->http_req->state != GG_STATE_DONE)
 	{
-		req->inpa = ggp_purple_http_input_add(req->http_req,
+		req->inpa = ggp_purplew_http_input_add(req->http_req,
 			ggp_callback_change_passwd_handler, req);
 		return;
 	}
@@ -454,7 +454,7 @@
 		req->new_password = g_strdup(p1);
 		req->account = account;
 		
-		req->inpa = ggp_purple_http_input_add(h,
+		req->inpa = ggp_purplew_http_input_add(h,
 			ggp_callback_change_passwd_handler, req);
 	}
 	
diff --git a/libpurple/protocols/gg/purple.c b/libpurple/protocols/gg/purplew.c
rename from libpurple/protocols/gg/purple.c
rename to libpurple/protocols/gg/purplew.c
--- a/libpurple/protocols/gg/purple.c
+++ b/libpurple/protocols/gg/purplew.c
@@ -1,8 +1,8 @@
-#include "purple.h"
+#include "purplew.h"
 
 #include <request.h>
 
-guint ggp_purple_http_input_add(struct gg_http *http_req,
+guint ggp_purplew_http_input_add(struct gg_http *http_req,
 	PurpleInputFunction func, gpointer user_data)
 {
 	PurpleInputCondition cond = 0;
@@ -16,19 +16,19 @@
 	return purple_input_add(http_req->fd, cond, func, user_data);
 }
 
-static void ggp_purple_request_processing_cancel(
-	ggp_purple_request_processing_handle *handle, gint id)
+static void ggp_purplew_request_processing_cancel(
+	ggp_purplew_request_processing_handle *handle, gint id)
 {
 	handle->cancel_cb(handle->gc, handle->user_data);
 	g_free(handle);
 }
 
-ggp_purple_request_processing_handle * ggp_purple_request_processing(
+ggp_purplew_request_processing_handle * ggp_purplew_request_processing(
 	PurpleConnection *gc, const gchar *msg, void *user_data,
-	ggp_purple_request_processing_cancel_cb cancel_cb)
+	ggp_purplew_request_processing_cancel_cb cancel_cb)
 {
-	ggp_purple_request_processing_handle *handle =
-		g_new(ggp_purple_request_processing_handle, 1);
+	ggp_purplew_request_processing_handle *handle =
+		g_new(ggp_purplew_request_processing_handle, 1);
 
 	handle->gc = gc;
 	handle->cancel_cb = cancel_cb;
@@ -37,13 +37,13 @@
 		(msg ? msg : _("Please wait...")), NULL,
 		PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc),
 		NULL, NULL, handle, 1,
-		_("Cancel"), G_CALLBACK(ggp_purple_request_processing_cancel));
+		_("Cancel"), G_CALLBACK(ggp_purplew_request_processing_cancel));
 	
 	return handle;
 }
 
-void ggp_purple_request_processing_done(
-	ggp_purple_request_processing_handle *handle)
+void ggp_purplew_request_processing_done(
+	ggp_purplew_request_processing_handle *handle)
 {
 	purple_request_close(PURPLE_REQUEST_ACTION, handle->request_handle);
 	g_free(handle);
diff --git a/libpurple/protocols/gg/purple.h b/libpurple/protocols/gg/purplew.h
rename from libpurple/protocols/gg/purple.h
rename to libpurple/protocols/gg/purplew.h
--- a/libpurple/protocols/gg/purple.h
+++ b/libpurple/protocols/gg/purplew.h
@@ -1,5 +1,5 @@
-#ifndef _GGP_PURPLE_H
-#define _GGP_PURPLE_H
+#ifndef _GGP_PURPLEW_H
+#define _GGP_PURPLEW_H
 
 #include <internal.h>
 #include <libgadu.h>
@@ -15,24 +15,25 @@
  *
  * @return The resulting handle (will be greater than 0).
  */
-guint ggp_purple_http_input_add(struct gg_http *http_req,
+guint ggp_purplew_http_input_add(struct gg_http *http_req,
 	PurpleInputFunction func, gpointer user_data);
 
-typedef void (*ggp_purple_request_processing_cancel_cb)(PurpleConnection *gc, void *user_data);
+typedef void (*ggp_purplew_request_processing_cancel_cb)(PurpleConnection *gc,
+	void *user_data);
 
 typedef struct
 {
 	PurpleConnection *gc;
-	ggp_purple_request_processing_cancel_cb cancel_cb;
+	ggp_purplew_request_processing_cancel_cb cancel_cb;
 	void *request_handle;
 	void *user_data;
-} ggp_purple_request_processing_handle;
+} ggp_purplew_request_processing_handle;
 
-ggp_purple_request_processing_handle * ggp_purple_request_processing(
+ggp_purplew_request_processing_handle * ggp_purplew_request_processing(
 	PurpleConnection *gc, const gchar *msg, void *user_data,
-	ggp_purple_request_processing_cancel_cb oncancel);
+	ggp_purplew_request_processing_cancel_cb oncancel);
 
-void ggp_purple_request_processing_done(
-	ggp_purple_request_processing_handle *handle);
+void ggp_purplew_request_processing_done(
+	ggp_purplew_request_processing_handle *handle);
 
-#endif /* _GGP_PURPLE_H */
+#endif /* _GGP_PURPLEW_H */



More information about the Commits mailing list