summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/manpages/Makefile.am2
-rw-r--r--docs/manpages/tracker-files.130
-rw-r--r--docs/manpages/tracker-services.179
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/tracker-utils/.gitignore3
-rw-r--r--src/tracker-utils/Makefile.am9
-rw-r--r--src/tracker-utils/tracker-files.c232
-rw-r--r--src/tracker-utils/tracker-services.c163
8 files changed, 1 insertions, 519 deletions
diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am
index b99a3a211..376acc172 100644
--- a/docs/manpages/Makefile.am
+++ b/docs/manpages/Makefile.am
@@ -14,7 +14,6 @@ endif
man_MANS = \
tracker-extract.1 \
- tracker-files.1 \
tracker-search.1 \
tracker-stats.1 \
trackerd.1 \
@@ -22,7 +21,6 @@ man_MANS = \
tracker-tag.1 \
tracker-status.1 \
tracker.cfg.5 \
- tracker-services.1 \
tracker-info.1 \
$(tst) \
$(ta) \
diff --git a/docs/manpages/tracker-files.1 b/docs/manpages/tracker-files.1
deleted file mode 100644
index c7350d4fd..000000000
--- a/docs/manpages/tracker-files.1
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH tracker-files 1 "July 2007" GNU "User Commands"
-
-.SH NAME
-tracker-files \- Return files filtered by the mime type or their category
-(called ServiceType)
-
-.SH SYNOPSIS
-.B tracker-files
-[-s ServiceType|-m MimeType]
-
-.SH DESCRIPTION
-.B tracker-files
-returns files that match the ServiceType or the mime-type provided.
-
-.SH OPTIONS
-.TP
-\-s ServiceType
-Specify the kind of the files you want to find. For more information on
-valid ServiceType see
-.BR tracker-services (1).
-
-.TP
-\-m MimeType
-Specify the mime-type of the files you want to find; see
-http://www.iana.org/assignments/media-types/ for the complete list of
-existing mime-type.
-
-.SH SEE ALSO
-.BR trackerd (1),
-.BR tracker-services (1).
diff --git a/docs/manpages/tracker-services.1 b/docs/manpages/tracker-services.1
deleted file mode 100644
index bf95f5925..000000000
--- a/docs/manpages/tracker-services.1
+++ /dev/null
@@ -1,79 +0,0 @@
-.TH tracker-services 1 "July 2007" GNU "Conventions"
-
-.SH NAME
-tracker-services \- shows service types and propeties available in trackerd
-
-.SH SYNOPSIS
-.B tracker-services
-[-sp]
-
-.SH DESCRIPTION
-.PP
-.B tracker-services
-returns the services types and properties available in
-.BR tracker (1)
-.PP
-Trackerd understands a number of different service types which are used to
-group search results and documents together. All searches and queries can
-be refined by specifying a service type to search from.
-.PP
-For example one could search for "Roses" in the service Conversations
-which would only return hits from chat conversations.
-
-.SH OPTIONS
-.TP
-\-s
-Return service types.
-.TP
-\-p
-Return properties.
-.PP
-These options can be used simultaneously.
-
-.SH SERVICE TYPES
-Default services types (Note than applications can add more):
-.TP
-Files
-Search for files only. This does not include Emails or Conversations.
-.TP
-Folders
-Search for folders i.e. directories.
-.TP
-Documents
-Searches for general documents like word processing,
-spreadsheets or PDF.
-.TP
-Emails
-Searches for Emails.
-.TP
-EmailAttachments
-Search es for Email attachments.
-.TP
-Music
-Search for music files.
-.TP
-Images
-Search for image files.
-.TP
-Videos
-Search for video files.
-.TP
-Text
-Search for plain text files.
-.TP
-Development
-Search for development files. This includes make files,
-source code files and the like.
-.TP
-Other
-Search for documents which could not be put in one of the other services.
-.TP
-Applications
-Search for applications.
-
-.SH SEE ALSO
-.BR trackerd (1),
-.BR tracker-search (1),
-.BR tracker-search-tool (1),
-.BR tracker-query (1),
-.BR tracker-files (1).
diff --git a/po/POTFILES.in b/po/POTFILES.in
index afe2c4bcf..076264cf0 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -25,12 +25,10 @@ src/tracker-search-tool/tracker-search-tool-callbacks.c
src/tracker-search-tool/tracker-search-tool-support.c
src/tracker-search-tool/tracker-search-tool.c
src/tracker-search-tool/tracker-search-tool.desktop.in.in
-src/tracker-utils/tracker-files.c
src/tracker-utils/tracker-info.c
src/tracker-utils/tracker-meta-folder.c
src/tracker-utils/tracker-processes.c
src/tracker-utils/tracker-search.c
-src/tracker-utils/tracker-services.c
src/tracker-utils/tracker-stats.c
src/tracker-utils/tracker-status.c
src/tracker-utils/tracker-tag.c
diff --git a/src/tracker-utils/.gitignore b/src/tracker-utils/.gitignore
index 3cf268267..e2e28c987 100644
--- a/src/tracker-utils/.gitignore
+++ b/src/tracker-utils/.gitignore
@@ -1,10 +1,7 @@
-tracker-files
tracker-info
-tracker-meta-folder
tracker-processes
tracker-query
tracker-search
-tracker-services
tracker-stats
tracker-status
tracker-tag
diff --git a/src/tracker-utils/Makefile.am b/src/tracker-utils/Makefile.am
index 3e215f7ca..3f6737684 100644
--- a/src/tracker-utils/Makefile.am
+++ b/src/tracker-utils/Makefile.am
@@ -23,11 +23,9 @@ bin_PROGRAMS = \
tracker-search \
tracker-stats \
tracker-tag \
- tracker-files \
tracker-status \
tracker-info \
- tracker-processes \
- tracker-services
+ tracker-processes
tracker_search_SOURCES = tracker-search.c
tracker_search_LDADD = $(libs)
@@ -38,9 +36,6 @@ tracker_stats_LDADD = $(libs)
tracker_tag_SOURCES = tracker-tag.c
tracker_tag_LDADD = $(libs)
-tracker_files_SOURCES = tracker-files.c
-tracker_files_LDADD = $(libs)
-
tracker_status_SOURCES = tracker-status.c
tracker_status_LDADD = $(libs)
@@ -50,5 +45,3 @@ tracker_info_LDADD = $(libs)
tracker_processes_SOURCES = tracker-processes.c
tracker_processes_LDADD = $(libs)
-tracker_services_SOURCES = tracker-services.c
-tracker_services_LDADD = $(libs)
diff --git a/src/tracker-utils/tracker-files.c b/src/tracker-utils/tracker-files.c
deleted file mode 100644
index e9108aadd..000000000
--- a/src/tracker-utils/tracker-files.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006, Mr Jamie McCracken (jamiemcc@gnome.org)
- * Copyright (C) 2008, Nokia
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <locale.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#include <libtracker/tracker.h>
-#include <libtracker-common/tracker-common.h>
-
-static gchar *service;
-static gchar **mimes;
-static gint limit = 512;
-static gint offset;
-
-static GOptionEntry entries[] = {
- { "service", 's', 0, G_OPTION_ARG_STRING, &service,
- N_("Search for specified service"),
- /* Translators: this will appear like --option=STRING running --help */
- N_("STRING")
- },
- { "limit", 'l', 0, G_OPTION_ARG_INT, &limit,
- N_("Set the total number of displayed results (default 512)"),
- /* Translators: this will appear like --option=NUMBER running --help */
- N_("NUMBER")
- },
- { "offset", 'o', 0, G_OPTION_ARG_INT, &offset,
- N_("Set the offset for displayed results (default 0)"),
- /* Translators: this will appear like --option=NUMBER running --help */
- N_("NUMBER")
- },
- { "add-mime", 'm', 0, G_OPTION_ARG_STRING_ARRAY, &mimes,
- N_("Search for specified MIME type (can be used multiple times)"),
- /* Translators: this will appear like --option=STRING running --help */
- N_("STRING")
- },
- { NULL }
-};
-
-int
-main (int argc, char **argv)
-{
- TrackerClient *client;
- ServiceType type;
- GOptionContext *context;
- GError *error = NULL;
-
- setlocale (LC_ALL, "");
-
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- context = g_option_context_new (_("- Search for files by service or by MIME type"));
- g_option_context_add_main_entries (context, entries, NULL);
- g_option_context_parse (context, &argc, &argv, NULL);
-
- if (!service && !mimes) {
- gchar *help;
-
- help = g_option_context_get_help (context, TRUE, NULL);
- g_option_context_free (context);
- g_printerr ("%s", help);
- g_free (help);
-
- return EXIT_FAILURE;
- }
-
- g_option_context_free (context);
-
- client = tracker_connect (FALSE);
-
- if (!client) {
- g_printerr ("%s\n",
- _("Could not establish a DBus connection to Tracker"));
- return EXIT_FAILURE;
- }
-
- /* TODO: Port to SPARQL */
-#if 0
- if (service) {
- gchar **array;
- gchar **p;
- gint length;
-
- type = tracker_service_name_to_type (service);
-
- if (type == SERVICE_OTHER_FILES && g_ascii_strcasecmp (service, "Other")) {
- g_printerr ("%s\n",
- _("Service not recognized, searching in other files..."));
- }
-
- array = tracker_files_get_by_service_type (client,
- time (NULL),
- type,
- offset,
- limit,
- &error);
-
- if (error) {
- g_printerr ("%s:'%s', %s\n",
- _("Could not get files by service type"),
- service,
- error->message);
- g_error_free (error);
-
- return EXIT_FAILURE;
- }
-
- if (!array) {
- g_print ("%s\n",
- _("No files found by that service type"));
- return EXIT_FAILURE;
- }
-
- length = g_strv_length (array);
-
- g_print (tracker_dngettext (NULL,
- _("Result: %d"),
- _("Results: %d"),
- length),
- length);
- g_print ("\n");
-
- for (p = array; *p; p++) {
- g_print (" %s\n", *p);
- }
-
- if (length >= limit) {
- /* Display '...' so the user thinks there is
- * more items.
- */
- g_print (" ...\n");
-
- /* Display warning so the user knows this is
- * not the WHOLE data set.
- */
- g_printerr ("\n"
- "%s\n",
- _("NOTE: Limit was reached, there are more items in the database not listed here"));
- }
-
- g_strfreev (array);
- }
-
- if (mimes) {
- gchar **array;
- gchar **p;
- gint length;
-
- array = tracker_files_get_by_mime_type (client,
- time (NULL),
- mimes,
- offset,
- limit,
- &error);
-
- if (error) {
- g_printerr ("%s, %s\n",
- _("Could not get files by MIME type"),
- error->message);
- g_error_free (error);
-
- return EXIT_FAILURE;
- }
-
- if (!array) {
- g_print ("%s\n",
- _("No files found by those MIME types"));
-
- return EXIT_FAILURE;
- }
-
- length = g_strv_length (array);
-
- g_print (tracker_dngettext (NULL,
- _("Result: %d"),
- _("Results: %d"),
- length),
- length);
- g_print ("\n");
-
- for (p = array; *p; p++) {
- g_print (" %s\n", *p);
- }
-
- if (length >= limit) {
- /* Display '...' so the user thinks there is
- * more items.
- */
- g_print (" ...\n");
-
- /* Display warning so the user knows this is
- * not the WHOLE data set.
- */
- g_printerr ("\n"
- "%s\n",
- _("NOTE: Limit was reached, there are more items in the database not listed here"));
- }
-
- g_strfreev (array);
- }
-#endif
-
- tracker_disconnect (client);
-
- return EXIT_SUCCESS;
-}
diff --git a/src/tracker-utils/tracker-services.c b/src/tracker-utils/tracker-services.c
deleted file mode 100644
index 878e7fd27..000000000
--- a/src/tracker-utils/tracker-services.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006, Mr Jamie McCracken (jamiemcc@gnome.org)
- * Copyright (C) 2008, Nokia
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <locale.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#include <libtracker/tracker.h>
-
-static gboolean services = FALSE;
-static gboolean properties = FALSE;
-
-static GOptionEntry entries[] = {
- { "service-types", 's', 0, G_OPTION_ARG_NONE, &services,
- N_("Return the known service types"),
- NULL
- },
- { "properties", 'p', 0, G_OPTION_ARG_NONE, &properties,
- N_("Return the known properties"),
- NULL
- },
- { NULL }
-};
-
-int
-main (int argc, char **argv)
-{
- TrackerClient *client;
- GOptionContext *context;
- gchar **array;
- GError *error = NULL;
-
- setlocale (LC_ALL, "");
-
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- /* Translators: this messagge will apper immediately after the */
- /* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
- context = g_option_context_new (_(" - Show all available service types and properties in tracker"));
- g_option_context_add_main_entries (context, entries, "tracker-services");
- g_option_context_parse (context, &argc, &argv, NULL);
-
- if (!services && !properties) {
- gchar *help;
-
- help = g_option_context_get_help (context, TRUE, NULL);
- g_option_context_free (context);
- g_printerr ("%s", help);
- g_free (help);
-
- return EXIT_FAILURE;
- }
-
- g_option_context_free (context);
-
- client = tracker_connect (FALSE);
-
- if (!client) {
- g_printerr ("%s\n",
- _("Could not establish a DBus connection to Tracker"));
- return EXIT_FAILURE;
- }
-
- /* TODO: Port to SPARQL */
-#if 0
- if (services) {
- array = tracker_metadata_get_registered_classes (client, &error);
-
- if (error) {
- g_printerr ("%s, %s\n",
- _("Could not get Tracker services"),
- error->message);
- g_error_free (error);
-
- return EXIT_FAILURE;
- }
-
- if (!array) {
- g_print ("%s\n",
- _("No services available"));
- } else {
- gchar **p;
-
- g_print ("%s:\n",
- _("Service types available in Tracker"));
-
- for (p = array; *p; p++) {
- g_print (" %s\n", *p);
- }
-
- g_strfreev (array);
- }
- }
-
- if (properties) {
- array = tracker_metadata_get_registered_types (client, "*", &error);
-
- if (error) {
- g_printerr ("%s, %s\n",
- _("Could not get Tracker properties"),
- error->message);
- g_error_free (error);
-
- return EXIT_FAILURE;
- }
-
- if (!array) {
- g_print ("%s\n",
- _("No properties available"));
- } else {
- GList *l, *sorted = NULL;
- gchar **p;
-
- g_print ("%s:\n",
- _("Properties available in Tracker"));
-
- for (p = array; *p; p++) {
- sorted = g_list_insert_sorted (sorted,
- *p,
- (GCompareFunc) strcmp);
- }
-
- for (l = sorted; l; l = g_list_next (l)) {
- g_print (" %s\n", (const gchar*) l->data);
- }
-
- g_list_free (sorted);
- g_strfreev (array);
- }
-
- }
-#endif
-
- tracker_disconnect (client);
-
- return EXIT_SUCCESS;
-}