Commit 98881312 authored by Philippe Rouquier's avatar Philippe Rouquier

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

parent 5b9181fa
......@@ -421,6 +421,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]]]),
......
......@@ -149,12 +149,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
......@@ -702,7 +702,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)
......
......@@ -511,12 +511,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)
......@@ -558,10 +559,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)
......
......@@ -157,7 +157,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,
......@@ -206,7 +206,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,
......
......@@ -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,
......
......@@ -64,6 +64,12 @@ struct _BraseroMediumSelectionClass
BraseroMedium *medium);
};
/**
* BraseroMediumSelection:
*
* Rename to: MediumSelection
*/
struct _BraseroMediumSelection
{
GtkComboBox parent_instance;
......
......@@ -3421,7 +3421,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 *
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment