[tracker/configure-for-binaries: 58/60] utils/playlists: Cleaned up CFLAGS/LIBS for playlist2ttl
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/configure-for-binaries: 58/60] utils/playlists: Cleaned up CFLAGS/LIBS for playlist2ttl
- Date: Mon, 25 Oct 2010 18:38:16 +0000 (UTC)
commit 14b5661ae11fdd71544bee81a724f1888b9bccf3
Author: Martyn Russell <martyn lanedo com>
Date: Mon Oct 25 18:44:10 2010 +0100
utils/playlists: Cleaned up CFLAGS/LIBS for playlist2ttl
utils/playlists/Makefile.am | 11 ++++-------
utils/playlists/playlist2ttl.c | 29 ++++++++++++++++-------------
2 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/utils/playlists/Makefile.am b/utils/playlists/Makefile.am
index c9d377d..600d160 100644
--- a/utils/playlists/Makefile.am
+++ b/utils/playlists/Makefile.am
@@ -4,15 +4,12 @@ noinst_PROGRAMS = playlist2ttl
INCLUDES = \
$(BUILD_CFLAGS) \
- $(GLIB2_CFLAGS) \
- $(GIO_CFLAGS) \
$(TOTEM_PL_PARSER_CFLAGS)
+LDADD = \
+ $(BUILD_LIBS) \
+ $(TOTEM_PL_PARSER_LIBS)
+
playlist2ttl_SOURCES = \
playlist2ttl.c
-playlist2ttl_LDADD = \
- $(TOTEM_PL_PARSER_LIBS) \
- $(BUILD_LIBS) \
- $(GLIB2_LIBS) \
- $(GIO_LIBS)
diff --git a/utils/playlists/playlist2ttl.c b/utils/playlists/playlist2ttl.c
index 4b8387e..6af35c8 100644
--- a/utils/playlists/playlist2ttl.c
+++ b/utils/playlists/playlist2ttl.c
@@ -17,11 +17,14 @@
* 02110-1301, USA.
*/
+#include "config.h"
+
#include <glib.h>
#include <gio/gio.h>
+
#include <totem-pl-parser.h>
-static gchar **filenames = NULL;
+static gchar **filenames = NULL;
typedef struct {
gint tracks ;
@@ -37,7 +40,7 @@ static GOptionEntry entries[] = {
};
static void
-print_header ()
+print_header (void)
{
g_print ("@prefix nmo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#>.\n");
g_print ("@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#>.\n");
@@ -46,18 +49,21 @@ print_header ()
}
static void
-print_playlist_entry (const gchar *uri) {
+print_playlist_entry (const gchar *uri)
+{
g_print ("<%s> a nmm:Playlist .\n\n", uri);
}
static void
-entry_parsed (TotemPlParser *parser, const gchar *uri, GHashTable *metadata, gpointer user_data)
+entry_parsed (TotemPlParser *parser,
+ const gchar *uri,
+ GHashTable *metadata,
+ gpointer user_data)
{
- PlaylistData *playlist_data = (PlaylistData *)user_data;
+ PlaylistData *playlist_data = (PlaylistData*) user_data;
playlist_data->tracks += 1;
- //uri = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_URI);
g_print ("<%s> nfo:hasMediaFileListEntry [ \n",
playlist_data->playlist);
g_print ("\t a nfo:MediaFileListEntry ; \n");
@@ -65,13 +71,13 @@ entry_parsed (TotemPlParser *parser, const gchar *uri, GHashTable *metadata, gpo
g_print ("\t nfo:entryContent <%s> ] .\n\n", uri);
}
-gint
-main (gint argc, gchar **argv)
+int
+main (int argc, char **argv)
{
GFile *file;
GOptionContext *context = NULL;
gchar *uri;
- PlaylistData playlist_data = { 0, NULL};
+ PlaylistData playlist_data = { 0, NULL};
TotemPlParser *pl;
TotemPlParserResult result;
GError *error = NULL;
@@ -86,8 +92,7 @@ main (gint argc, gchar **argv)
if (!g_option_context_parse (context, &argc, &argv, &error) || !filenames) {
gchar *help;
- g_printerr ("%s\n\n",
- "Playlist filename is mandatory");
+ g_printerr ("%s\n\n", "Playlist filename is mandatory");
help = g_option_context_get_help (context, TRUE, NULL);
g_option_context_free (context);
@@ -109,8 +114,6 @@ main (gint argc, gchar **argv)
g_object_set (pl, "recurse", FALSE, "disable-unsafe", TRUE, NULL);
g_signal_connect (G_OBJECT (pl), "entry-parsed", G_CALLBACK (entry_parsed), &playlist_data);
-
-
result = totem_pl_parser_parse (pl, uri, FALSE);
switch (result) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]