/soc/2013/ankitkv/gobjectification: 08c49f30e4a1: Replaced Purpl...

Ankit Vani a at nevitus.org
Tue Jul 16 18:50:22 EDT 2013


Changeset: 08c49f30e4a196fb6215552c5d275ebc37ef10eb
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-17 04:11 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/08c49f30e4a1

Description:

Replaced PurpleValue with GType in plugin.h, signals.h. Replaced with GValue in status.h.

diffstat:

 libpurple/plugin.h  |  20 ++++++++++----------
 libpurple/signals.h |  22 ++++++++++------------
 libpurple/status.h  |   8 ++++----
 3 files changed, 24 insertions(+), 26 deletions(-)

diffs (134 lines):

diff --git a/libpurple/plugin.h b/libpurple/plugin.h
--- a/libpurple/plugin.h
+++ b/libpurple/plugin.h
@@ -446,7 +446,7 @@ const gchar *purple_plugin_get_homepage(
  * @param command    The name of the command.
  * @param func       The function to execute.
  * @param marshal    The marshalling function.
- * @param ret_value  The return value type.
+ * @param ret_type   The return type.
  * @param num_params The number of parameters.
  * @param ...        The parameter types.
  *
@@ -456,7 +456,7 @@ const gchar *purple_plugin_get_homepage(
 gboolean purple_plugin_ipc_register(PurplePlugin *plugin, const char *command,
 								  PurpleCallback func,
 								  PurpleSignalMarshalFunc marshal,
-								  PurpleValue *ret_value, int num_params, ...);
+								  GType ret_type, int num_params, ...);
 
 /**
  * Unregisters an IPC command in a plugin.
@@ -476,17 +476,17 @@ void purple_plugin_ipc_unregister_all(Pu
 /**
  * Returns a list of value types used for an IPC command.
  *
- * @param plugin     The plugin.
- * @param command    The name of the command.
- * @param ret_value  The returned return value.
- * @param num_params The returned number of parameters.
- * @param params     The returned list of parameters.
+ * @param plugin      The plugin.
+ * @param command     The name of the command.
+ * @param ret_type    The returned return type.
+ * @param num_params  The returned number of parameters.
+ * @param param_types The returned list of parameter types.
  *
  * @return TRUE if the command was found, or FALSE otherwise.
  */
-gboolean purple_plugin_ipc_get_params(PurplePlugin *plugin, const char *command,
-									PurpleValue **ret_value, int *num_params,
-									PurpleValue ***params);
+gboolean purple_plugin_ipc_get_types(PurplePlugin *plugin, const char *command,
+									GType *ret_type, int *num_params,
+									GType **param_types);
 
 /**
  * Executes an IPC command.
diff --git a/libpurple/signals.h b/libpurple/signals.h
--- a/libpurple/signals.h
+++ b/libpurple/signals.h
@@ -67,18 +67,16 @@ G_BEGIN_DECLS
  * @param instance   The instance to register the signal for.
  * @param signal     The signal name.
  * @param marshal    The marshal function.
- * @param ret_value  The return value type, or NULL for no return value.
+ * @param ret_type   The return type, or G_TYPE_NONE for no return type.
  * @param num_values The number of values to be passed to the callbacks.
  * @param ...        The values to pass to the callbacks.
  *
  * @return The signal ID local to that instance, or 0 if the signal
  *         couldn't be registered.
- *
- * @see PurpleValue
  */
 gulong purple_signal_register(void *instance, const char *signal,
 							PurpleSignalMarshalFunc marshal,
-							PurpleValue *ret_value, int num_values, ...);
+							GType ret_type, int num_values, ...);
 
 /**
  * Unregisters a signal in an instance.
@@ -98,15 +96,15 @@ void purple_signals_unregister_by_instan
 /**
  * Returns a list of value types used for a signal.
  *
- * @param instance   The instance the signal is registered to.
- * @param signal     The signal.
- * @param ret_value  The return value from the last signal handler.
- * @param num_values The returned number of values.
- * @param values     The returned list of values.
+ * @param instance    The instance the signal is registered to.
+ * @param signal      The signal.
+ * @param ret_type    The return type.
+ * @param num_values  The returned number of values.
+ * @param value_types The returned list of values.
  */
-void purple_signal_get_values(void *instance, const char *signal,
-							PurpleValue **ret_value,
-							int *num_values, PurpleValue ***values);
+void purple_signal_get_types(void *instance, const char *signal,
+							GType *ret_type, int *num_values,
+							GType **value_types);
 
 /**
  * Connects a signal handler to a signal for a particular object.
diff --git a/libpurple/status.h b/libpurple/status.h
--- a/libpurple/status.h
+++ b/libpurple/status.h
@@ -261,7 +261,7 @@ PurpleStatusType *purple_status_type_new
 												gboolean independent,
 												const char *attr_id,
 												const char *attr_name,
-												PurpleValue *attr_value, ...) G_GNUC_NULL_TERMINATED;
+												GValue *attr_value, ...) G_GNUC_NULL_TERMINATED;
 
 /**
  * Destroys a status type.
@@ -400,7 +400,7 @@ const PurpleStatusType *purple_status_ty
  * @return A new status attribute.
  */
 PurpleStatusAttr *purple_status_attr_new(const char *id, const char *name,
-									 PurpleValue *value_type);
+									 GValue *value_type);
 
 /**
  * Destroys a status attribute.
@@ -434,7 +434,7 @@ const char *purple_status_attr_get_name(
  *
  * @return The status attribute's value.
  */
-PurpleValue *purple_status_attr_get_value(const PurpleStatusAttr *attr);
+GValue *purple_status_attr_get_value(const PurpleStatusAttr *attr);
 
 /*@}*/
 
@@ -614,7 +614,7 @@ gboolean purple_status_is_online(const P
  *
  * @return The value of the attribute.
  */
-PurpleValue *purple_status_get_attr_value(const PurpleStatus *status,
+GValue *purple_status_get_attr_value(const PurpleStatus *status,
 									  const char *id);
 
 /**



More information about the Commits mailing list