[grilo/wip/hadess/update-docs: 6/6] doc: Fix documentation for GRL_PLUGIN_DEFINE()



commit daaf2a60f90cb6ef8b8b889357dc4f27ad7efe6e
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 6 14:58:47 2019 +0100

    doc: Fix documentation for GRL_PLUGIN_DEFINE()
    
    Remove GRL_PLUGIN_REGISTER() usage from the documentation, and make sure
    that GRL_PLUGIN_DEFINE() is correctly documented.

 doc/grilo/grilo-sections.txt  |  1 +
 doc/grilo/plugins-sources.xml | 15 +++++++++++++--
 src/grl-registry.h            | 17 +++--------------
 3 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/doc/grilo/grilo-sections.txt b/doc/grilo/grilo-sections.txt
index ddccdb2..8958676 100644
--- a/doc/grilo/grilo-sections.txt
+++ b/doc/grilo/grilo-sections.txt
@@ -197,6 +197,7 @@ GrlRank
 GrlRegistry
 GrlRegistryClass
 GrlPluginDescriptor
+GRL_PLUGIN_DEFINE
 GRL_PLUGIN_LIST_VAR
 GRL_PLUGIN_PATH_VAR
 GRL_PLUGIN_RANKS_VAR
diff --git a/doc/grilo/plugins-sources.xml b/doc/grilo/plugins-sources.xml
index 3939ab5..964fad7 100644
--- a/doc/grilo/plugins-sources.xml
+++ b/doc/grilo/plugins-sources.xml
@@ -85,7 +85,7 @@
     <title>Registering Plugins</title>
 
     <para>
-      Grilo plugins must use the macro GRL_PLUGIN_REGISTER(), which defines the
+      Grilo plugins must use the macro GRL_PLUGIN_DEFINE(), which defines the
       entry and exit points of the plugin (called when the plugin is loaded and
       unloaded respectively) as well as its plugin identifier (a string
       identifying the plugin).
@@ -165,7 +165,18 @@ grl_foo_plugin_init (GrlRegistry *registry,
   return TRUE;
 }
 
-GRL_PLUGIN_REGISTER (grl_foo_plugin_init, NULL, "grl-foo");
+GRL_PLUGIN_DEFINE (0,
+                   3,
+                   "grl-foo",
+                   "Foo",
+                   "A plugin for Foo",
+                   "GNOME",
+                   "1.0.0",
+                   "LGPL",
+                   "http://www.gnome.org";,
+                   grl_foo_plugin_init,
+                   NULL,
+                   NULL);
       ]]>
     </programlisting>
 
diff --git a/src/grl-registry.h b/src/grl-registry.h
index 2e0d19b..349c967 100644
--- a/src/grl-registry.h
+++ b/src/grl-registry.h
@@ -73,8 +73,8 @@
 
 /**
 * GRL_PLUGIN_DEFINE:
-* @major_version: the major version number of core that plugin was compiled for
-* @minor_version: the minor version number of core that plugin was compiled for
+* @major: the major version number of core that plugin was compiled for, as an integer
+* @minor: the minor version number of core that plugin was compiled for, as an integer
 * @id: the plugin identifier
 * @name: name of plugin
 * @description: description of plugin
@@ -91,18 +91,7 @@
 *
 * Since: 0.3.0
 */
-#define GRL_PLUGIN_DEFINE(major,                                \
-                          minor,                                \
-                          id,                                   \
-                          name,                                 \
-                          description,                          \
-                          author,                               \
-                          version,                              \
-                          license,                              \
-                          site,                                 \
-                          init,                                 \
-                          deinit,                               \
-                          register_keys)                        \
+#define GRL_PLUGIN_DEFINE(major, minor, id, name, description, author, version, license, site, init, deinit, 
register_keys) \
   G_MODULE_EXPORT GrlPluginDescriptor GRL_PLUGIN_DESCRIPTOR = { \
     major,                                                      \
     minor,                                                      \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]