summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2013-03-15 10:06:25 +0000
committerMartyn Russell <martyn@lanedo.com>2013-03-15 10:06:25 +0000
commitb2c924846e0bb864bdf5aee43d3c997a46f98463 (patch)
tree04fe0c7fc2996fb8c4c1ba1a6d542739ba71daff /utils
parent9d924ebb67c5efd1b97b0699db030bec38f3ae0e (diff)
downloadtracker-b2c924846e0bb864bdf5aee43d3c997a46f98463.tar.gz
utils/playlists: Removed
This was unmaintained and unused. See original discussion here: https://mail.gnome.org/archives/tracker-list/2013-March/msg00007.html
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile.am4
-rw-r--r--utils/playlists/.gitignore1
-rw-r--r--utils/playlists/Makefile.am15
-rw-r--r--utils/playlists/playlist2ttl.c136
4 files changed, 0 insertions, 156 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 4d3400072..83f5216c1 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -8,10 +8,6 @@ SUBDIRS = \
mtp \
tracker-sql
-if HAVE_TOTEM_PL_PARSER
-SUBDIRS += playlists
-endif
-
if HAVE_TRACKER_RESDUMP
SUBDIRS += tracker-resdump
endif
diff --git a/utils/playlists/.gitignore b/utils/playlists/.gitignore
deleted file mode 100644
index 6d07a1c7a..000000000
--- a/utils/playlists/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-playlist2ttl
diff --git a/utils/playlists/Makefile.am b/utils/playlists/Makefile.am
deleted file mode 100644
index b57cfe3ab..000000000
--- a/utils/playlists/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-include $(top_srcdir)/Makefile.decl
-
-noinst_PROGRAMS = playlist2ttl
-
-AM_CPPFLAGS = \
- $(BUILD_CFLAGS) \
- $(TOTEM_PL_PARSER_CFLAGS)
-
-LDADD = \
- $(BUILD_LIBS) \
- $(TOTEM_PL_PARSER_LIBS)
-
-playlist2ttl_SOURCES = \
- playlist2ttl.c
-
diff --git a/utils/playlists/playlist2ttl.c b/utils/playlists/playlist2ttl.c
deleted file mode 100644
index 2bb7f1ff6..000000000
--- a/utils/playlists/playlist2ttl.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2009, Nokia <ivan.frade@nokia.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <totem-pl-parser.h>
-
-static gchar **filenames = NULL;
-
-typedef struct {
- gint tracks ;
- gchar *playlist;
-} PlaylistData;
-
-static GOptionEntry entries[] = {
- { G_OPTION_REMAINING, 0, G_OPTION_FLAG_FILENAME, G_OPTION_ARG_FILENAME_ARRAY, &filenames,
- "FILE",
- NULL
- },
- { NULL }
-};
-
-static void
-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");
- g_print ("@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n");
- g_print ("\n");
-}
-
-static void
-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)
-{
- PlaylistData *playlist_data = (PlaylistData*) user_data;
-
- playlist_data->tracks += 1;
-
- g_print ("<%s> nfo:hasMediaFileListEntry [ \n",
- playlist_data->playlist);
- g_print ("\t a nfo:MediaFileListEntry ; \n");
- g_print ("\t nfo:listPosition %d ; \n", playlist_data->tracks);
- g_print ("\t nfo:entryUrl \"%s\" ] .\n\n", uri);
-}
-
-int
-main (int argc, char **argv)
-{
- GFile *file;
- GOptionContext *context = NULL;
- gchar *uri;
- PlaylistData playlist_data = { 0, NULL};
- TotemPlParser *pl;
- TotemPlParserResult result;
- GError *error = NULL;
-
- context = g_option_context_new ("- Parse a playlist and show info");
-
- g_option_context_add_main_entries (context, entries, NULL);
- g_option_context_parse (context, &argc, &argv, NULL);
-
- if (!g_option_context_parse (context, &argc, &argv, &error) || !filenames) {
- gchar *help;
-
- g_printerr ("%s\n\n", "Playlist filename is mandatory");
-
- help = g_option_context_get_help (context, TRUE, NULL);
- g_option_context_free (context);
- g_printerr ("%s", help);
- g_free (help);
-
- return -1;
- }
-
- file = g_file_new_for_commandline_arg (filenames[0]);
- uri = g_file_get_uri (file);
-
- print_header ();
- print_playlist_entry (uri);
- playlist_data.playlist = uri;
-
- pl = totem_pl_parser_new ();
-
- 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) {
- case TOTEM_PL_PARSER_RESULT_SUCCESS:
- break;
- case TOTEM_PL_PARSER_RESULT_IGNORED:
- g_print ("Error: Ignored (%s)\n", uri);
- break;
- case TOTEM_PL_PARSER_RESULT_ERROR:
- g_print ("Error: Failed parsing (%s)\n", uri);
- break;
- case TOTEM_PL_PARSER_RESULT_UNHANDLED:
- g_print ("Error: Unhandled type (%s)\n", uri);
- break;
- default:
- g_print ("Undefined result!?!?!");
- }
-
- g_object_unref (pl);
-
- return 0;
-}