[brasero/introspection: 1/3] Gobject introspection support for libbrasero-media. Some API doc improvements.



commit e1dada1ce160f2362191b1e5db2d5775d31c8e7d
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Fri Sep 11 21:24:34 2009 +0200

    Gobject introspection support for libbrasero-media. Some API doc improvements.

 configure.in                                |    4 ++++
 libbrasero-media/Makefile.am                |   25 +++++++++++++++++++++++--
 libbrasero-media/brasero-drive.c            |    2 +-
 libbrasero-media/brasero-media.c            |    6 ++++--
 libbrasero-media/brasero-medium-monitor.c   |    4 ++--
 libbrasero-media/brasero-medium-selection.c |    1 -
 libbrasero-media/brasero-medium-selection.h |    6 ++++++
 libbrasero-media/brasero-medium.c           |    2 +-
 libbrasero-media/brasero-medium.h           |   12 ++++++++++++
 9 files changed, 53 insertions(+), 9 deletions(-)
---
diff --git a/configure.in b/configure.in
index 92f88cf..87d84fd 100644
--- a/configure.in
+++ b/configure.in
@@ -404,6 +404,10 @@ if test x"$enable_inotify" = "xyes"; then
 fi
 AM_CONDITIONAL(BUILD_INOTIFY, test x"$enable_inotify" = "xyes")
 
+dnl ****** GObject Introspection **********************
+
+GOBJECT_INTROSPECTION_CHECK(0.6.3)
+
 dnl ****** Update mime, desktop and icon caches *******
 AC_ARG_ENABLE(caches,
 			AS_HELP_STRING([--enable-caches],[Run update-* to update mime, desktop and icon caches when installing [[default=yes]]]),
diff --git a/libbrasero-media/Makefile.am b/libbrasero-media/Makefile.am
index 6201849..d470765 100644
--- a/libbrasero-media/Makefile.am
+++ b/libbrasero-media/Makefile.am
@@ -148,12 +148,33 @@ if HAVE_USCSI_H
 libbrasero_media_la_SOURCES += scsi-uscsi.c
 endif
 
+girdir = $(INTROSPECTION_GIRDIR)
+gir_DATA = BraseroMedia-1.0.gir
+
+typelibsdir = $(INTROSPECTION_TYPELIBDIR)
+typelibs_DATA = BraseroMedia-1.0.typelib
+
+BraseroMedia-1.0.gir: libbrasero-media.la $(INTROSPECTION_SCANNER)
+	$(INTROSPECTION_SCANNER) -v --namespace=BraseroMedia --nsversion=1.0 \
+            --include=Gtk-2.0 \
+	    --library=brasero-media \
+	    --libtool="$(LIBTOOL)" \
+            --output $@ \
+            --pkg=gtk+-2.0  \
+	    --strip-prefix=Brasero	\
+            $(libbraseromediainclude_HEADERS)	\
+	    *.c	    
+	    
+BraseroMedia-1.0.typelib: $(gir_DATA) $(INTROSPECTION_COMPILER)
+	$(INTROSPECTION_COMPILER) $(gir_DATA) -o $(typelibs_DATA)
+
 EXTRA_DIST =			\
 	libbrasero-marshal.list
 #	libbrasero-media.symbols
 
 CLEANFILES =			\
-	$(RECMARSHALFILES)
-	
+	$(RECMARSHALFILES)  \
+	$(gir_DATA)         \
+	$(typelibs_DATA)
 
 -include $(top_srcdir)/git.mk
diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
index 08ab4e7..7ba13e2 100644
--- a/libbrasero-media/brasero-drive.c
+++ b/libbrasero-media/brasero-drive.c
@@ -581,7 +581,7 @@ brasero_drive_get_udi (BraseroDrive *drive)
  * Gets the medium currently inserted in the drive. If there is no medium or if
  * the medium is not probed yet then it returns NULL.
  *
- * Return value: a #BraseroMedium object or NULL. No need to unref after use.
+ * Return value: (transfer none): a #BraseroMedium object or NULL. No need to unref after use.
  **/
 BraseroMedium *
 brasero_drive_get_medium (BraseroDrive *drive)
diff --git a/libbrasero-media/brasero-media.c b/libbrasero-media/brasero-media.c
index 264b687..2cdd67a 100644
--- a/libbrasero-media/brasero-media.c
+++ b/libbrasero-media/brasero-media.c
@@ -509,12 +509,13 @@ brasero_media_message (const gchar *location,
 static BraseroMediumMonitor *default_monitor = NULL;
 
 /**
- * brasero_media_start:
+ * brasero_media_library_start:
  *
  * Initialize the library.
  *
  * You should call this function before using any other from the library.
  *
+ * Rename to: init
  **/
 void
 brasero_media_library_start (void)
@@ -556,10 +557,11 @@ brasero_media_library_start (void)
 }
 
 /**
- * brasero_media_stop:
+ * brasero_media_library_stop:
  *
  * De-initialize the library once you do not need the library anymore.
  *
+ * Rename to: deinit
  **/
 void
 brasero_media_library_stop (void)
diff --git a/libbrasero-media/brasero-medium-monitor.c b/libbrasero-media/brasero-medium-monitor.c
index 5de9192..9345637 100644
--- a/libbrasero-media/brasero-medium-monitor.c
+++ b/libbrasero-media/brasero-medium-monitor.c
@@ -163,7 +163,7 @@ brasero_medium_monitor_is_probing (BraseroMediumMonitor *monitor)
  *
  * Gets the list of available drives that are of the given type.
  *
- * Return value: a #GSList or NULL
+ * Return value: (element-type BraseroMedia.Drive) (transfer full): a #GSList of  #BraseroDrive or NULL. The list must be freed and the element unreffed when finished.
  **/
 GSList *
 brasero_medium_monitor_get_drives (BraseroMediumMonitor *monitor,
@@ -212,7 +212,7 @@ brasero_medium_monitor_get_drives (BraseroMediumMonitor *monitor,
  *
  * Obtains the list of available media that are of the given type.
  *
- * Return value: a #GSList or NULL
+ * Return value: (element-type BraseroMedia.Medium) (transfer full): a #GSList of  #BraseroMedium or NULL. The list must be freed and the element unreffed when finished.
  **/
 GSList *
 brasero_medium_monitor_get_media (BraseroMediumMonitor *monitor,
diff --git a/libbrasero-media/brasero-medium-selection.c b/libbrasero-media/brasero-medium-selection.c
index 7a04f19..c737194 100644
--- a/libbrasero-media/brasero-medium-selection.c
+++ b/libbrasero-media/brasero-medium-selection.c
@@ -496,7 +496,6 @@ brasero_medium_selection_add_no_disc_entry (BraseroMediumSelection *self)
  * @type: a #BraseroMediaType
  *
  * Filters and displays media corresponding to @type.
- *
  **/
 void
 brasero_medium_selection_show_media_type (BraseroMediumSelection *selector,
diff --git a/libbrasero-media/brasero-medium-selection.h b/libbrasero-media/brasero-medium-selection.h
index 77dc379..089b321 100644
--- a/libbrasero-media/brasero-medium-selection.h
+++ b/libbrasero-media/brasero-medium-selection.h
@@ -64,6 +64,12 @@ struct _BraseroMediumSelectionClass
 							 BraseroMedium *medium);
 };
 
+/**
+ * BraseroMediumSelection:
+ *
+ * Rename to: MediumSelection
+ */
+
 struct _BraseroMediumSelection
 {
 	GtkComboBox parent_instance;
diff --git a/libbrasero-media/brasero-medium.c b/libbrasero-media/brasero-medium.c
index 46762d4..a7f3227 100644
--- a/libbrasero-media/brasero-medium.c
+++ b/libbrasero-media/brasero-medium.c
@@ -3395,7 +3395,7 @@ brasero_medium_can_use_burnfree (BraseroMedium *medium)
  *
  * Gets the #BraseroDrive in which the medium is inserted.
  *
- * Return value: a #BraseroDrive. No need to unref after use.
+ * Return value: (transfer none): a #BraseroDrive. No need to unref after use.
  *
  **/
 BraseroDrive *
diff --git a/libbrasero-media/brasero-medium.h b/libbrasero-media/brasero-medium.h
index ad7c9ec..cb0f56a 100644
--- a/libbrasero-media/brasero-medium.h
+++ b/libbrasero-media/brasero-medium.h
@@ -45,7 +45,19 @@ G_BEGIN_DECLS
 #define BRASERO_MEDIUM_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_MEDIUM, BraseroMediumClass))
 
 typedef struct _BraseroMediumClass BraseroMediumClass;
+
+/**
+ * BraseroMedium:
+ *
+ * Represents a physical medium currently inserted in a #BraseroDrive.
+ **/
 typedef struct _BraseroMedium BraseroMedium;
+
+/**
+ * BraseroDrive:
+ *
+ * Represents a physical drive currently connected.
+ **/
 typedef struct _BraseroDrive BraseroDrive;
 
 struct _BraseroMediumClass
diff --git a/po/mai.po b/po/mai.po
old mode 100755
new mode 100644



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