/soc/2013/ankitkv/gobjectification: a8e12bcb0a74: Convert the ne...

Ankit Vani a at nevitus.org
Fri Jan 31 07:56:00 EST 2014


Changeset: a8e12bcb0a74c006be1b52e43cfeb4778c00e175
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-01-31 18:25 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/a8e12bcb0a74

Description:

Convert the new .h files for this branch for gtk-doc

diffstat:

 libpurple/plugins.h   |  337 +++++++++++++++++++++++++--------------
 libpurple/protocol.h  |  222 ++++++++++++--------------
 libpurple/protocols.h |  416 +++++++++++++++++++++++++++----------------------
 3 files changed, 545 insertions(+), 430 deletions(-)

diffs (truncated from 2420 to 300 lines):

diff --git a/libpurple/plugins.h b/libpurple/plugins.h
--- a/libpurple/plugins.h
+++ b/libpurple/plugins.h
@@ -51,12 +51,16 @@
 #define PURPLE_PLUGIN_GET_CLASS(obj)   GPLUGIN_PLUGIN_GET_CLASS(obj)
 
 /**
+ * PurplePlugin:
+ *
  * Represents a plugin handle.
  * This type is an alias for GPluginPlugin.
  */
 typedef GPluginPlugin PurplePlugin;
 
 /**
+ * PurplePluginClass:
+ *
  * The base class for all #PurplePlugin's.
  * This type is an alias for GPluginPluginClass.
  */
@@ -83,14 +87,11 @@ typedef GObjectClass PurplePluginClass;
 #define PURPLE_IS_PLUGIN_INFO_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_PLUGIN_INFO))
 #define PURPLE_PLUGIN_INFO_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfoClass))
 
-/** @copydoc _PurplePluginInfo */
 typedef struct _PurplePluginInfo PurplePluginInfo;
-/** @copydoc _PurplePluginInfoClass */
 typedef struct _PurplePluginInfoClass PurplePluginInfoClass;
 
 #define PURPLE_TYPE_PLUGIN_ACTION  (purple_plugin_action_get_type())
 
-/** @copydoc _PurplePluginAction */
 typedef struct _PurplePluginAction PurplePluginAction;
 
 #include "pluginpref.h"
@@ -102,15 +103,24 @@ typedef PurplePluginPrefFrame *(*PurpleP
 typedef gpointer (*PurplePluginPrefRequestCb)(PurplePlugin *);
 
 /**
+ * PurplePluginInfoFlags:
+ * @PURPLE_PLUGIN_INFO_FLAGS_INTERNAL:  Plugin is not shown in UI lists
+ * @PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD: Auto-load the plugin
+ *
  * Flags that can be used to treat plugins differently.
  */
 typedef enum /*< flags >*/
 {
-    PURPLE_PLUGIN_INFO_FLAGS_INTERNAL  = 1 << 1, /**< Plugin is not shown in UI lists */
-    PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD = 1 << 2, /**< Auto-load the plugin */
+	PURPLE_PLUGIN_INFO_FLAGS_INTERNAL  = 1 << 1,
+	PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD = 1 << 2,
+
 } PurplePluginInfoFlags;
 
 /**
+ * PurplePluginInfo:
+ * @ui_data: The UI data associated with the plugin. This is a convenience
+ *           field provided to the UIs -- it is not used by the libpurple core.
+ *
  * Holds information about a plugin.
  */
 struct _PurplePluginInfo {
@@ -120,9 +130,6 @@ struct _PurplePluginInfo {
 	GObject parent;
 #endif
 
-	/** The UI data associated with the plugin. This is a convenience
-	 *  field provided to the UIs -- it is not used by the libpurple core.
-	 */
 	gpointer ui_data;
 };
 
@@ -146,6 +153,8 @@ struct _PurplePluginInfoClass {
 };
 
 /**
+ * PurplePluginAction:
+ *
  * Represents an action that the plugin can perform. This shows up in the Tools
  * menu, under a submenu with the name of the plugin.
  */
@@ -157,6 +166,8 @@ struct _PurplePluginAction {
 };
 
 /**
+ * PURPLE_PLUGIN_ABI_VERSION:
+ *
  * Returns an ABI version to set in plugins using major and minor versions.
  *
  * Note: The lower six nibbles represent the ABI version for libpurple, the
@@ -165,18 +176,28 @@ struct _PurplePluginAction {
 #define PURPLE_PLUGIN_ABI_VERSION(major,minor) \
 	(0x01000000 | ((major) << 16) | (minor))
 
-/** Returns the major version from an ABI version */
+/**
+ * PURPLE_PLUGIN_ABI_MAJOR_VERSION:
+ *
+ * Returns the major version from an ABI version
+ */
 #define PURPLE_PLUGIN_ABI_MAJOR_VERSION(abi) \
 	((abi >> 16) & 0xff)
 
-/** Returns the minor version from an ABI version */
+/**
+ * PURPLE_PLUGIN_ABI_MINOR_VERSION:
+ *
+ * Returns the minor version from an ABI version
+ */
 #define PURPLE_PLUGIN_ABI_MINOR_VERSION(abi) \
 	(abi & 0xffff)
 
 /**
-  * A convenience‎ macro that returns an ABI version using PURPLE_MAJOR_VERSION
-  * and PURPLE_MINOR_VERSION
-  */
+ * PURPLE_ABI_VERSION:
+ *
+ * A convenience‎ macro that returns an ABI version using PURPLE_MAJOR_VERSION
+ * and PURPLE_MINOR_VERSION
+ */
 #define PURPLE_ABI_VERSION PURPLE_PLUGIN_ABI_VERSION(PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION)
 
 /**
@@ -222,6 +243,9 @@ struct _PurplePluginAction {
 
 /**
  * PURPLE_DEFINE_TYPE:
+ * @TN:   The name of the new type, in Camel case.
+ * @t_n:  The name of the new type, in lowercase, words separated by '_'.
+ * @T_P:  The #GType of the parent type.
  * 
  * A convenience macro for type implementations, which defines a *_get_type()
  * function; and a *_register_type() function for use in your plugin's load
@@ -230,10 +254,6 @@ struct _PurplePluginAction {
  *
  * The type will be registered statically if used in a static protocol or if
  * plugins support is disabled.
- *
- * @TN:   The name of the new type, in Camel case.
- * @t_n:  The name of the new type, in lowercase, words separated by '_'.
- * @T_P:  The #GType of the parent type.
  */
 #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
 #define PURPLE_DEFINE_TYPE(TN, t_n, T_P) \
@@ -245,15 +265,14 @@ struct _PurplePluginAction {
 
 /**
  * PURPLE_DEFINE_TYPE_EXTENDED:
- *
- * A more general version of PURPLE_DEFINE_TYPE() which allows you to
- * specify #GTypeFlags and custom code.
- *
  * @TN:     The name of the new type, in Camel case.
  * @t_n:    The name of the new type, in lowercase, words separated by '_'.
  * @T_P:    The #GType of the parent type.
  * @flags:  #GTypeFlags to register the type with.
  * @CODE:   Custom code that gets inserted in *_get_type().
+ *
+ * A more general version of PURPLE_DEFINE_TYPE() which allows you to
+ * specify #GTypeFlags and custom code.
  */
 #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
 #define PURPLE_DEFINE_TYPE_EXTENDED \
@@ -265,13 +284,12 @@ struct _PurplePluginAction {
 
 /**
  * PURPLE_IMPLEMENT_INTERFACE_STATIC:
+ * @TYPE_IFACE:  The #GType of the interface to add.
+ * @iface_init:  The interface init function.
  *
  * A convenience macro to ease static interface addition in the CODE section
  * of PURPLE_DEFINE_TYPE_EXTENDED(). You should use this macro if the
  * interface is a part of the libpurple core.
- *
- * @TYPE_IFACE:  The #GType of the interface to add.
- * @iface_init:  The interface init function.
  */
 #define PURPLE_IMPLEMENT_INTERFACE_STATIC(TYPE_IFACE, iface_init) { \
 	const GInterfaceInfo interface_info = { \
@@ -282,13 +300,12 @@ struct _PurplePluginAction {
 
 /**
  * PURPLE_IMPLEMENT_INTERFACE:
+ * @TYPE_IFACE:  The #GType of the interface to add.
+ * @iface_init:  The interface init function.
  *
  * A convenience macro to ease interface addition in the CODE section
  * of PURPLE_DEFINE_TYPE_EXTENDED(). You should use this macro if the
  * interface lives in the plugin.
- *
- * @TYPE_IFACE:  The #GType of the interface to add.
- * @iface_init:  The interface init function.
  */
 #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
 #define PURPLE_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) \
@@ -298,11 +315,19 @@ struct _PurplePluginAction {
 	PURPLE_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init)
 #endif
 
-/** A convenience macro for dynamic type implementations. */
+/**
+ * PURPLE_DEFINE_DYNAMIC_TYPE:
+ *
+ * A convenience macro for dynamic type implementations.
+ */
 #define PURPLE_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) \
 	PURPLE_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
 
-/** A more general version of PURPLE_DEFINE_DYNAMIC_TYPE(). */
+/**
+ * PURPLE_DEFINE_DYNAMIC_TYPE_EXTENDED:
+ *
+ * A more general version of PURPLE_DEFINE_DYNAMIC_TYPE().
+ */
 #define PURPLE_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \
 static GType type_name##_type_id = 0; \
 G_MODULE_EXPORT GType type_name##_get_type(void) { \
@@ -329,7 +354,11 @@ void type_name##_register_type(PurplePlu
 	{ CODE ; } \
 }
 
-/** A convenience macro to ease dynamic interface addition. */
+/**
+ * PURPLE_IMPLEMENT_INTERFACE_DYNAMIC:
+ *
+ * A convenience macro to ease dynamic interface addition.
+ */
 #define PURPLE_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \
 	const GInterfaceInfo interface_info = { \
 		(GInterfaceInitFunc) iface_init, NULL, NULL \
@@ -337,11 +366,19 @@ void type_name##_register_type(PurplePlu
 	purple_plugin_add_interface(plugin, type_id, TYPE_IFACE, &interface_info); \
 }
 
-/** A convenience macro for static type implementations. */
+/**
+ * PURPLE_DEFINE_STATIC_TYPE:
+ *
+ * A convenience macro for static type implementations.
+ */
 #define PURPLE_DEFINE_STATIC_TYPE(TN, t_n, T_P) \
 	PURPLE_DEFINE_STATIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
 
-/** A more general version of PURPLE_DEFINE_STATIC_TYPE(). */
+/**
+ * PURPLE_DEFINE_STATIC_TYPE_EXTENDED:
+ *
+ * A more general version of PURPLE_DEFINE_STATIC_TYPE().
+ */
 #define PURPLE_DEFINE_STATIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \
 static GType type_name##_type_id = 0; \
 GType type_name##_get_type(void) { \
@@ -377,12 +414,13 @@ G_BEGIN_DECLS
 /*@{*/
 
 /**
- * Attempts to load a plugin.
- *
+ * purple_plugin_load:
  * @plugin: The plugin to load.
  * @error:  Return location for a #GError or %NULL. If provided, this
  *               will be set to the reason if the load fails.
  *
+ * Attempts to load a plugin.
+ *
  * Returns: %TRUE if successful or already loaded, %FALSE otherwise.
  *
  * @see purple_plugin_unload()
@@ -390,12 +428,13 @@ G_BEGIN_DECLS
 gboolean purple_plugin_load(PurplePlugin *plugin, GError **error);
 
 /**
- * Unloads the specified plugin.
- *
+ * purple_plugin_unload:
  * @plugin: The plugin handle.
  * @error:  Return location for a #GError or %NULL. If provided, this
  *               will be set to the reason if the unload fails.
  *
+ * Unloads the specified plugin.
+ *
  * Returns: %TRUE if successful or not loaded, %FALSE otherwise.
  *
  * @see purple_plugin_load()
@@ -403,33 +442,38 @@ gboolean purple_plugin_load(PurplePlugin
 gboolean purple_plugin_unload(PurplePlugin *plugin, GError **error);
 
 /**
+ * purple_plugin_is_loaded:
+ * @plugin: The plugin.
+ *
  * Returns whether or not a plugin is currently loaded.
  *
- * @plugin: The plugin.
- *
  * Returns: %TRUE if loaded, or %FALSE otherwise.
  */
 gboolean purple_plugin_is_loaded(const PurplePlugin *plugin);
 



More information about the Commits mailing list