[discident-glib] docs: 100% coverage from API docs



commit 219b0339eb5909da395b850db7b47d8253265057
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 3 21:38:25 2012 +0100

    docs: 100% coverage from API docs

 discident-glib/discident-ean-glib.c |   37 +++++++++++++++++++++++++++++++++++
 discident-glib/discident-ean-glib.h |   12 +++++++++++
 discident-glib/discident-error.c    |   16 ++++++++++++++-
 discident-glib/discident-error.h    |   14 +++++++++++++
 discident-glib/discident-glib.c     |    8 +++++++
 docs/discident-glib-docs.xml        |    3 ++
 6 files changed, 89 insertions(+), 1 deletions(-)
---
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index 7e1bd4d..460c785 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -30,6 +30,14 @@
 #include "discident-ean-glib.h"
 #include "discident-error.h"
 
+/**
+ * SECTION:discident-ean-glib
+ * @short_description: Barcode lookup functions
+ * @include: discident-glib/discident-ean-glib.h
+ *
+ * Contains functions to lookup title and thumbnails from barcodes.
+ **/
+
 #define APPID "19d78263508549b98db3809824f79c4d0fcad11b"
 #define EMULATED_VERSION "2.7.0"
 #define ORIGINAL_QUERY "http://redlaser.com:8008/getinfo.ashx?v="; EMULATED_VERSION "&app=rl&responseId=20100708&udid=" APPID
@@ -124,6 +132,15 @@ parse_login_response (DiscidentEan *ean,
 	return TRUE;
 }
 
+/**
+ * discident_ean_login:
+ * @ean: a #DiscidentEan object representing a query
+ * @error: a #GError
+ *
+ * Log into the EAN lookup web service.
+ *
+ * Returns: %TRUE on success. %FALSE on failure with @error set.
+ **/
 gboolean
 discident_ean_login (DiscidentEan *ean,
 		     GError      **error)
@@ -247,6 +264,19 @@ parse_lookup_response (const char *response,
 	return TRUE;
 }
 
+/**
+ * discident_ean_lookup:
+ * @ean: a #DiscidentEan object representing a query
+ * @barcode: a string representing the barcode to lookup
+ * @title: the return value for the title, or %NULL
+ * @img_url: the return value for the title, or %NULL
+ * @error: a #GError
+ *
+ * Looks up the barcode with EAN @barcode, and sets @title
+ * and @img_url appropriately if found.
+ *
+ * Returns: %TRUE on success. %FALSE on failure with @error set.
+ **/
 gboolean
 discident_ean_lookup (DiscidentEan *ean,
 		      const char   *barcode,
@@ -305,6 +335,13 @@ discident_ean_lookup (DiscidentEan *ean,
 	return TRUE;
 }
 
+/**
+ * discident_ean_new:
+ *
+ * Create a new #DiscidentEan object to lookup barcodes with.
+ *
+ * Returns: a new #DiscidentEan object.
+ **/
 DiscidentEan *
 discident_ean_new (void)
 {
diff --git a/discident-glib/discident-ean-glib.h b/discident-glib/discident-ean-glib.h
index 5f3898c..2314555 100644
--- a/discident-glib/discident-ean-glib.h
+++ b/discident-glib/discident-ean-glib.h
@@ -36,12 +36,24 @@ G_BEGIN_DECLS
 
 typedef struct DiscidentEanPrivate DiscidentEanPrivate;
 
+/**
+ * DiscidentEan:
+ *
+ * All the fields in the #DiscidentEan structure are private and should never be accessed directly.
+ **/
 typedef struct {
+	/* <private> */
 	GObject              parent;
 	DiscidentEanPrivate *priv;
 } DiscidentEan;
 
+/**
+ * DiscidentEanClass:
+ *
+ * All the fields in the #DiscidentEanClass structure are private and should never be accessed directly.
+ **/
 typedef struct {
+	/* <private> */
 	GObjectClass parent_class;
 } DiscidentEanClass;
 
diff --git a/discident-glib/discident-error.c b/discident-glib/discident-error.c
index cd2183b..e79c366 100644
--- a/discident-glib/discident-error.c
+++ b/discident-glib/discident-error.c
@@ -22,6 +22,21 @@
 
 #include "discident-error.h"
 
+/**
+ * SECTION:discident-error
+ * @short_description: Error helper functions
+ * @include: discident-glib/discident-error.h
+ *
+ * Contains helper functions for reporting errors to the user.
+ **/
+
+/**
+ * discident_error_quark:
+ *
+ * Gets the discident-glib quark.
+ *
+ * Return value: a #GQuark.
+ **/
 GQuark
 discident_error_quark (void)
 {
@@ -31,4 +46,3 @@ discident_error_quark (void)
 
 	return quark;
 }
-
diff --git a/discident-glib/discident-error.h b/discident-glib/discident-error.h
index 174dc57..39010ae 100644
--- a/discident-glib/discident-error.h
+++ b/discident-glib/discident-error.h
@@ -27,10 +27,24 @@
 
 G_BEGIN_DECLS
 
+/**
+ * DiscidentError:
+ * @DISCIDENT_ERROR_PARSE: An error occured parsing the response from the web service.
+ *
+ * Error codes returned by discident-glib functions.
+ **/
 typedef enum {
 	DISCIDENT_ERROR_PARSE
 } DiscidentError;
 
+/**
+ * DISCIDENT_ERROR:
+ *
+ * Error domain for discident-glib. Errors from this domain will be from
+ * the #DiscidentError enumeration.
+ * See #GError for more information on error domains.
+ **/
+
 #define DISCIDENT_ERROR (discident_error_quark ())
 
 GQuark discident_error_quark (void);
diff --git a/discident-glib/discident-glib.c b/discident-glib/discident-glib.c
index 157a9b1..1be9e31 100644
--- a/discident-glib/discident-glib.c
+++ b/discident-glib/discident-glib.c
@@ -25,6 +25,14 @@
 #include <discident-glib.h>
 #include <discident-glib-private.h>
 
+/**
+ * SECTION:discident-glib
+ * @short_description: DVD lookup functions
+ * @include: discident-glib/discident-glib.h
+ *
+ * Contains functions to lookup DVD titles from discs or local backups.
+ **/
+
 typedef struct {
 	char *filename;
 	guint64 size;
diff --git a/docs/discident-glib-docs.xml b/docs/discident-glib-docs.xml
index 7987d26..959f809 100644
--- a/docs/discident-glib-docs.xml
+++ b/docs/discident-glib-docs.xml
@@ -18,11 +18,14 @@
   <chapter>
     <title>DiscIdent-glib</title>
         <xi:include href="xml/discident-glib.xml"/>
+	<xi:include href="xml/discident-ean-glib.xml"/>
+	<xi:include href="xml/discident-error.xml"/>
 
   </chapter>
   <index id="api-index-full">
     <title>API Index</title>
     <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+    <xi:include href="xml/api-index-deprecated.xml"/>
   </index>
 
   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>



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