/soc/2013/ankitkv/gobjectification: ddb40f691d20: Renamed certai...

Ankit Vani a at nevitus.org
Mon Sep 2 19:11:21 EDT 2013


Changeset: ddb40f691d207993ab8ce58d553ce76aaef7ed86
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-03 04:41 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/ddb40f691d20

Description:

Renamed certain protocol type names to better suit the naming convention used by the protocol

diffstat:

 libpurple/protocols/gg/gg.c             |   6 +++---
 libpurple/protocols/gg/gg.h             |  16 ++++++++--------
 libpurple/protocols/msn/msn.c           |   6 +++---
 libpurple/protocols/msn/msn.h           |  14 +++++++-------
 libpurple/protocols/myspace/myspace.c   |   6 +++---
 libpurple/protocols/myspace/myspace.h   |  14 +++++++-------
 libpurple/protocols/sametime/sametime.c |   6 +++---
 libpurple/protocols/sametime/sametime.h |  16 ++++++++--------
 libpurple/protocols/silc/silc.c         |   6 +++---
 libpurple/protocols/silc/silcpurple.h   |  14 +++++++-------
 10 files changed, 52 insertions(+), 52 deletions(-)

diffs (truncated from 345 to 300 lines):

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
@@ -1401,7 +1401,7 @@ static void purple_gg_debug_handler(int 
 }
 
 static void
-ggp_protocol_base_init(GaduGaduProtocolClass *klass)
+ggp_protocol_base_init(GGPProtocolClass *klass)
 {
 	PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
 	PurpleAccountOption *option;
@@ -1457,7 +1457,7 @@ ggp_protocol_base_init(GaduGaduProtocolC
 }
 
 static void
-ggp_protocol_base_finalize(GaduGaduProtocolClass *klass)
+ggp_protocol_base_finalize(GGPProtocolClass *klass)
 {
 	ggp_servconn_cleanup();
 }
@@ -1543,7 +1543,7 @@ plugin_unload(PurplePlugin *plugin, GErr
 }
 
 static PurplePlugin *my_plugin;
-PURPLE_PROTOCOL_DEFINE(my_plugin, GaduGaduProtocol, ggp_protocol);
+PURPLE_PROTOCOL_DEFINE(my_plugin, GGPProtocol, ggp_protocol);
 PURPLE_PLUGIN_INIT_VAL(my_plugin, gg, plugin_query, plugin_load, plugin_unload);
 
 /* vim: set ts=8 sts=0 sw=8 noet: */
diff --git a/libpurple/protocols/gg/gg.h b/libpurple/protocols/gg/gg.h
--- a/libpurple/protocols/gg/gg.h
+++ b/libpurple/protocols/gg/gg.h
@@ -41,21 +41,21 @@
 #define GGP_UIN_LEN_MAX 10
 
 #define GGP_TYPE_PROTOCOL             (ggp_protocol_get_type())
-#define GGP_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GGP_TYPE_PROTOCOL, GaduGaduProtocol))
-#define GGP_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GGP_TYPE_PROTOCOL, GaduGaduProtocolClass))
+#define GGP_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GGP_TYPE_PROTOCOL, GGPProtocol))
+#define GGP_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GGP_TYPE_PROTOCOL, GGPProtocolClass))
 #define GGP_IS_PROTOCOL(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GGP_TYPE_PROTOCOL))
 #define GGP_IS_PROTOCOL_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GGP_TYPE_PROTOCOL))
-#define GGP_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GGP_TYPE_PROTOCOL, GaduGaduProtocolClass))
+#define GGP_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GGP_TYPE_PROTOCOL, GGPProtocolClass))
 
-typedef struct _GaduGaduProtocol
+typedef struct _GGPProtocol
 {
 	PurpleProtocol parent;
-} GaduGaduProtocol;
+} GGPProtocol;
 
-typedef struct _GaduGaduProtocolClass
+typedef struct _GGPProtocolClass
 {
 	PurpleProtocolClass parent_class;
-} GaduGaduProtocolClass;
+} GGPProtocolClass;
 
 typedef struct
 {
@@ -84,7 +84,7 @@ typedef struct
 } ggp_buddy_data;
 
 /**
- * Returns the GType for the GaduGaduProtocol object.
+ * Returns the GType for the GGPProtocol object.
  */
 GType ggp_protocol_get_type(void);
 
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -2875,7 +2875,7 @@ msn_get_max_message_size(PurpleConversat
 }
 
 static void
-msn_protocol_base_init(MSNProtocolClass *klass)
+msn_protocol_base_init(MsnProtocolClass *klass)
 {
 	PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
 	PurpleAccountOption *option;
@@ -2933,7 +2933,7 @@ msn_protocol_base_init(MSNProtocolClass 
 }
 
 static void
-msn_protocol_base_finalize(MSNProtocolClass *klass)
+msn_protocol_base_finalize(MsnProtocolClass *klass)
 {
 	msn_notification_end();
 	msn_switchboard_end();
@@ -3027,6 +3027,6 @@ plugin_unload(PurplePlugin *plugin, GErr
 }
 
 static PurplePlugin *my_plugin;
-PURPLE_PROTOCOL_DEFINE(my_plugin, MSNProtocol, msn_protocol);
+PURPLE_PROTOCOL_DEFINE(my_plugin, MsnProtocol, msn_protocol);
 PURPLE_PLUGIN_INIT_VAL(my_plugin, msn, plugin_query, plugin_load,
                        plugin_unload);
diff --git a/libpurple/protocols/msn/msn.h b/libpurple/protocols/msn/msn.h
--- a/libpurple/protocols/msn/msn.h
+++ b/libpurple/protocols/msn/msn.h
@@ -25,11 +25,11 @@
 #define MSN_H
 
 #define MSN_TYPE_PROTOCOL             (msn_protocol_get_type())
-#define MSN_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MSN_TYPE_PROTOCOL, MSNProtocol))
-#define MSN_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MSN_TYPE_PROTOCOL, MSNProtocolClass))
+#define MSN_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MSN_TYPE_PROTOCOL, MsnProtocol))
+#define MSN_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MSN_TYPE_PROTOCOL, MsnProtocolClass))
 #define MSN_IS_PROTOCOL(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSN_TYPE_PROTOCOL))
 #define MSN_IS_PROTOCOL_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), MSN_TYPE_PROTOCOL))
-#define MSN_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MSN_TYPE_PROTOCOL, MSNProtocolClass))
+#define MSN_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MSN_TYPE_PROTOCOL, MsnProtocolClass))
 
 typedef enum
 {
@@ -157,15 +157,15 @@ typedef enum
 	((MSN_CLIENT_ID_VERSION    << 24) | \
 	 (MSN_CLIENT_ID_CAPABILITIES))
 
-typedef struct _MSNProtocol
+typedef struct _MsnProtocol
 {
 	PurpleProtocol parent;
-} MSNProtocol;
+} MsnProtocol;
 
-typedef struct _MSNProtocolClass
+typedef struct _MsnProtocolClass
 {
 	PurpleProtocolClass parent_class;
-} MSNProtocolClass;
+} MsnProtocolClass;
 
 GType msn_protocol_get_type(void);
 
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -3382,7 +3382,7 @@ msim_uri_handler(const gchar *proto, con
  * Protocol attributes and options.
  */
 static void
-msim_protocol_base_init(MySpaceProtocolClass *klass)
+msim_protocol_base_init(MsimProtocolClass *klass)
 {
 	PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
 	PurpleAccountOption *option;
@@ -3456,7 +3456,7 @@ msim_protocol_interface_init(PurpleProto
 	iface->get_account_text_table = msim_get_account_text_table;
 }
 
-static void msim_protocol_base_finalize(MySpaceProtocolClass *klass) { }
+static void msim_protocol_base_finalize(MsimProtocolClass *klass) { }
 
 /**
  * Query the plugin
@@ -3520,6 +3520,6 @@ plugin_unload(PurplePlugin *plugin, GErr
 }
 
 static PurplePlugin *my_plugin;
-PURPLE_PROTOCOL_DEFINE(my_plugin, MySpaceProtocol, msim_protocol);
+PURPLE_PROTOCOL_DEFINE(my_plugin, MsimProtocol, msim_protocol);
 PURPLE_PLUGIN_INIT_VAL(my_plugin, myspace, plugin_query, plugin_load,
                        plugin_unload);
diff --git a/libpurple/protocols/myspace/myspace.h b/libpurple/protocols/myspace/myspace.h
--- a/libpurple/protocols/myspace/myspace.h
+++ b/libpurple/protocols/myspace/myspace.h
@@ -62,11 +62,11 @@
 #include "user.h"
 
 #define MSIM_TYPE_PROTOCOL             (msim_protocol_get_type())
-#define MSIM_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MSIM_TYPE_PROTOCOL, MySpaceProtocol))
-#define MSIM_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MSIM_TYPE_PROTOCOL, MySpaceProtocolClass))
+#define MSIM_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MSIM_TYPE_PROTOCOL, MsimProtocol))
+#define MSIM_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MSIM_TYPE_PROTOCOL, MsimProtocolClass))
 #define MSIM_IS_PROTOCOL(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSIM_TYPE_PROTOCOL))
 #define MSIM_IS_PROTOCOL_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), MSIM_TYPE_PROTOCOL))
-#define MSIM_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MSIM_TYPE_PROTOCOL, MySpaceProtocolClass))
+#define MSIM_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MSIM_TYPE_PROTOCOL, MsimProtocolClass))
 
 /* Conditional compilation options */
 /* Send third-party client version? (Recognized by us and Miranda's plugin) */
@@ -196,15 +196,15 @@
 #define MSIM_ERROR_INCORRECT_PASSWORD           260
 #define MSIM_ERROR_LOGGED_IN_ELSEWHERE          6
 
-typedef struct _MySpaceProtocol
+typedef struct _MsimProtocol
 {
 	PurpleProtocol parent;
-} MySpaceProtocol;
+} MsimProtocol;
 
-typedef struct _MySpaceProtocolClass
+typedef struct _MsimProtocolClass
 {
 	PurpleProtocolClass parent_class;
-} MySpaceProtocolClass;
+} MsimProtocolClass;
 
 /* Functions */
 GType msim_protocol_get_type(void);
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -5619,7 +5619,7 @@ static void mw_log_handler(const gchar *
 
 
 static void
-mw_protocol_base_init(SametimeProtocolClass *klass)
+mw_protocol_base_init(mwProtocolClass *klass)
 {
   PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
   PurpleAccountUserSplit *split;
@@ -5685,7 +5685,7 @@ mw_protocol_base_init(SametimeProtocolCl
 
 
 static void
-mw_protocol_base_finalize(SametimeProtocolClass *klass)
+mw_protocol_base_finalize(mwProtocolClass *klass)
 {
   g_log_remove_handler(G_LOG_DOMAIN, log_handler[0]);
   g_log_remove_handler("meanwhile", log_handler[1]);
@@ -5783,7 +5783,7 @@ plugin_unload(PurplePlugin *plugin, GErr
 }
 
 static PurplePlugin *my_plugin;
-PURPLE_PROTOCOL_DEFINE(my_plugin, SametimeProtocol, mw_protocol);
+PURPLE_PROTOCOL_DEFINE(my_plugin, mwProtocol, mw_protocol);
 PURPLE_PLUGIN_INIT_VAL(my_plugin, sametime, plugin_query, plugin_load,
                        plugin_unload);
 /* The End. */
diff --git a/libpurple/protocols/sametime/sametime.h b/libpurple/protocols/sametime/sametime.h
--- a/libpurple/protocols/sametime/sametime.h
+++ b/libpurple/protocols/sametime/sametime.h
@@ -2,11 +2,11 @@
 #define _SAMETIME_H_
 
 #define MW_TYPE_PROTOCOL             (mw_protocol_get_type())
-#define MW_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MW_TYPE_PROTOCOL, SametimeProtocol))
-#define MW_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MW_TYPE_PROTOCOL, SametimeProtocolClass))
+#define MW_PROTOCOL(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), MW_TYPE_PROTOCOL, mwProtocol))
+#define MW_PROTOCOL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), MW_TYPE_PROTOCOL, mwProtocolClass))
 #define MW_IS_PROTOCOL(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), MW_TYPE_PROTOCOL))
 #define MW_IS_PROTOCOL_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), MW_TYPE_PROTOCOL))
-#define MW_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MW_TYPE_PROTOCOL, SametimeProtocolClass))
+#define MW_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MW_TYPE_PROTOCOL, mwProtocolClass))
 
 /* CFLAGS trumps configure values */
 
@@ -34,19 +34,19 @@
 /* ISO-8859-1 */
 
 
-typedef struct _SametimeProtocol
+typedef struct _mwProtocol
 {
 	PurpleProtocol parent;
-} SametimeProtocol;
+} mwProtocol;
 
-typedef struct _SametimeProtocolClass
+typedef struct _mwProtocolClass
 {
 	PurpleProtocolClass parent_class;
-} SametimeProtocolClass;
+} mwProtocolClass;
 
 
 /**
- * Returns the GType for the SametimeProtocol object.
+ * Returns the GType for the mwProtocol object.
  */
 GType mw_protocol_get_type(void);
 
diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c
--- a/libpurple/protocols/silc/silc.c
+++ b/libpurple/protocols/silc/silc.c
@@ -2062,7 +2062,7 @@ static SilcBool silcpurple_debug_cb(char
 #endif
 
 static void
-silcpurple_protocol_base_init(SILCProtocolClass *klass)
+silcpurple_protocol_base_init(SilcProtocolClass *klass)
 {
 	PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
 	PurpleAccountOption *option;
@@ -2189,7 +2189,7 @@ silcpurple_protocol_interface_init(Purpl
 	iface->new_xfer           = silcpurple_ftp_new_xfer;
 }
 
-static void silcpurple_protocol_base_finalize(SILCProtocolClass *klass) { }
+static void silcpurple_protocol_base_finalize(SilcProtocolClass *klass) { }
 
 static PurplePluginInfo *
 plugin_query(GError **error)
@@ -2235,6 +2235,6 @@ plugin_unload(PurplePlugin *plugin, GErr



More information about the Commits mailing list