Commit fa45f9b8 authored by Philip Withnall's avatar Philip Withnall
Browse files

Bug 555848 — Add introspection support

Add complete introspection support to totem-pl-parser, including enough
annotations to ensure the GIR file is accurate. Closes: bgo#555848
parent fc603d2f
SUBDIRS = lib plparse po docs
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
COPYING.LIB \
autogen.sh \
......@@ -20,7 +22,7 @@ DISTCLEANFILES = intltool-extract intltool-merge intltool-update \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = totem-plparser.pc totem-plparser-mini.pc
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc --enable-introspection
# Build ChangeLog from GIT history
ChangeLog:
......
......@@ -5,6 +5,7 @@ srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="totem-pl-parser"
REQUIRED_M4MACROS=introspection.m4
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
......
AC_PREREQ(2.52)
AC_PREREQ(2.62)
m4_define(totem_version_major, 2)
m4_define(totem_version_minor, 28)
......@@ -121,6 +121,7 @@ AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
GTK_DOC_CHECK(1.11)
GOBJECT_INTROSPECTION_CHECK([0.6.7])
AC_CONFIG_FILES([
Makefile
......
......@@ -19,36 +19,39 @@ plparserinclude_HEADERS = \
totem-disc.h \
totem-pl-parser-mini.h
libtotem_plparser_la_SOURCES = \
plparser_sources = \
totem-pl-parser-builtins.c \
totem-pl-parser-builtins.h \
totem-disc.c \
totem-disc.h \
totem-pl-parser.c \
totem-pl-parser-lines.c \
totemplparser-marshal.c \
totem-pl-parser-media.c \
totem-pl-parser-misc.c \
totem-pl-parser-pla.c \
totem-pl-parser-pls.c \
totem-pl-parser-podcast.c \
totem-pl-parser-qt.c \
totem-pl-parser-smil.c \
totem-pl-parser-wm.c \
totem-pl-parser-xspf.c
libtotem_plparser_la_SOURCES = \
$(plparser_sources) \
totem-pl-parser-builtins.h \
totem-disc.h \
totem-pl-parser-features.h \
totem-pl-parser.h \
totem-pl-parser-lines.c \
totem-pl-parser-lines.h \
totemplparser-marshal.c \
totemplparser-marshal.h \
totem-pl-parser-media.c \
totem-pl-parser-media.h \
totem-pl-parser-misc.c \
totem-pl-parser-misc.h \
totem-pl-parser-pla.c \
totem-pl-parser-pla.h \
totem-pl-parser-pls.c \
totem-pl-parser-pls.h \
totem-pl-parser-podcast.c \
totem-pl-parser-podcast.h \
totem-pl-parser-private.h \
totem-pl-parser-qt.c \
totem-pl-parser-qt.h \
totem-pl-parser-smil.c \
totem-pl-parser-smil.h \
totem-pl-parser-wm.c \
totem-pl-parser-wm.h \
totem-pl-parser-xspf.c \
totem-pl-parser-xspf.h \
xmlparser.h xmlparser.c \
xmllexer.h xmllexer.c \
......@@ -163,3 +166,41 @@ EXTRA_DIST = \
totem-pl-parser-features.h.in \
plparser.symbols \
plparser-mini.symbols
# Introspection
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
if HAVE_INTROSPECTION
introspection_sources = \
$(plparser_sources) \
$(plparserinclude_HEADERS)
TotemPlParser.gir: libtotem-plparser.la Makefile
TotemPlParser_gir_SCANNERFLAGS = --namespace=TotemPlParser --strip-prefix=TotemPlParser
TotemPlParser_gir_INCLUDES = GObject-2.0 Gtk-2.0
TotemPlParser_gir_CFLAGS = \
$(TOTEM_PLPARSER_CFLAGS) \
$(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS) \
-D_FILE_OFFSET_BITS=64 \
-D_LARGEFILE64_SOURCE \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
-I$(top_builddir)/plparse \
-D_GNU_SOURCE
TotemPlParser_gir_LIBS = libtotem-plparser.la
TotemPlParser_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
INTROSPECTION_GIRS += TotemPlParser.gir
girdir = $(datadir)/gir-1.0
dist_gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
endif
......@@ -663,7 +663,7 @@ totem_cd_dir_get_parent (const char *dir)
/**
* totem_cd_detect_type_from_dir:
* @dir: a directory URI
* @mrl: return location for the disc's MRL, or %NULL
* @mrl: (out) (transfer full) (allow-none): return location for the disc's MRL, or %NULL
* @error: return location for a #GError, or %NULL
*
* Detects the disc's type, given its mount directory URI. If
......@@ -731,7 +731,7 @@ totem_cd_detect_type_from_dir (const char *dir, char **mrl, GError **error)
/**
* totem_cd_detect_type_with_url:
* @device: a device node path
* @mrl: return location for the disc's MRL, or %NULL
* @mrl: (out) (transfer full) (allow-none): return location for the disc's MRL, or %NULL
* @error: return location for a #GError, or %NULL
*
* Detects the disc's type, given its device node path. If
......
......@@ -1980,11 +1980,11 @@ parse_thread (GSimpleAsyncResult *result, GObject *object, GCancellable *cancell
* totem_pl_parser_parse_with_base_async:
* @parser: a #TotemPlParser
* @uri: the URI of the playlist to parse
* @base: the base path for relative filenames
* @base: (allow-none): the base path for relative filenames, or %NULL
* @fallback: %TRUE if the parser should add the playlist URI to the
* end of the playlist on parse failure
* @cancellable: optional #GCancellable object, or %NULL
* @callback: a #GAsyncReadyCallback to call when parsing is finished
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @callback: (allow-none): a #GAsyncReadyCallback to call when parsing is finished
* @user_data: data to pass to the @callback function
*
* Starts asynchronous parsing of a playlist given by the absolute URI @uri, using @base to resolve relative paths where appropriate.
......@@ -2021,7 +2021,7 @@ totem_pl_parser_parse_with_base_async (TotemPlParser *parser, const char *uri, c
* totem_pl_parser_parse_with_base:
* @parser: a #TotemPlParser
* @uri: the URI of the playlist to parse
* @base: the base path for relative filenames
* @base: (allow-none): the base path for relative filenames, or %NULL
* @fallback: %TRUE if the parser should add the playlist URI to the
* end of the playlist on parse failure
*
......@@ -2075,8 +2075,8 @@ totem_pl_parser_parse_with_base (TotemPlParser *parser, const char *uri,
* @uri: the URI of the playlist to parse
* @fallback: %TRUE if the parser should add the playlist URI to the
* end of the playlist on parse failure
* @cancellable: optional #GCancellable object, or %NULL
* @callback: a #GAsyncReadyCallback to call when parsing is finished
* @cancellable: (allow-none): optional #GCancellable object, or %NULL
* @callback: (allow-none): a #GAsyncReadyCallback to call when parsing is finished
* @user_data: data to pass to the @callback function
*
* Starts asynchronous parsing of a playlist given by the absolute URI @uri. @self and @uri are both reffed/copied
......
......@@ -318,9 +318,9 @@ GQuark totem_pl_parser_error_quark (void);
* TotemPlParserIterFunc:
* @model: a #GtkTreeModel containing the playlist entries
* @iter: a #GtkTreeIter pointing to the current row
* @uri: return location for the entry's URI, or %NULL
* @title: return location for the entry's title, or %NULL
* @custom_title: return location for a boolean which, if %TRUE, indicates that the entry's @title is custom; or %NULL
* @uri: (out) (transfer full): return location for the entry's URI, or %NULL
* @title: (out) (transfer full): return location for the entry's title, or %NULL
* @custom_title: (out) (transfer full): return location for a boolean which, if %TRUE, indicates that the entry's @title is custom; or %NULL
* @user_data: user data to pass to the function
*
* Functions such as totem_pl_parser_write() accept pointers to TotemPlParserIterFunc()s
......
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