[tracker-miners/wip/carlosg/cli-improvements: 46/47] tracker: Drop database access config options from "tracker3 info"
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/cli-improvements: 46/47] tracker: Drop database access config options from "tracker3 info"
- Date: Wed, 19 Aug 2020 11:31:32 +0000 (UTC)
commit 4d204fdbc563b9e28850fe01bd11156982f338c4
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 19 13:19:46 2020 +0200
tracker: Drop database access config options from "tracker3 info"
This is now a miner-fs specific tool, don't let it fiddle with other
services.
src/tracker/tracker-info.c | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)
---
diff --git a/src/tracker/tracker-info.c b/src/tracker/tracker-info.c
index d1fe17dc9..b1a5b902e 100644
--- a/src/tracker/tracker-info.c
+++ b/src/tracker/tracker-info.c
@@ -43,23 +43,8 @@ static gboolean plain_text_content;
static gboolean resource_is_iri;
static gboolean turtle;
static gchar *url_property;
-static gchar *database_path;
-static gchar *dbus_service;
-static gchar *remote_service;
static GOptionEntry entries[] = {
- { "database", 'd', 0, G_OPTION_ARG_FILENAME, &database_path,
- N_("Location of the database"),
- N_("FILE")
- },
- { "dbus-service", 'b', 0, G_OPTION_ARG_STRING, &dbus_service,
- N_("Connects to a DBus service"),
- N_("DBus service name")
- },
- { "remote-service", 'r', 0, G_OPTION_ARG_STRING, &remote_service,
- N_("Connects to a remote service"),
- N_("Remote service URI")
- },
{ "full-namespaces", 'f', 0, G_OPTION_ARG_NONE, &full_namespaces,
N_("Show full namespaces (i.e. don’t use nie:title, use full URLs)"),
NULL,
@@ -355,27 +340,8 @@ print_turtle (gchar *urn,
static TrackerSparqlConnection *
create_connection (GError **error)
{
- if (database_path && !dbus_service && !remote_service) {
- GFile *file;
-
- file = g_file_new_for_commandline_arg (database_path);
- return tracker_sparql_connection_new (TRACKER_SPARQL_CONNECTION_FLAGS_READONLY,
- file, NULL, NULL, error);
- } else if (dbus_service && !database_path && !remote_service) {
- GDBusConnection *dbus_conn;
-
- dbus_conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
- if (!dbus_conn)
- return NULL;
-
- return tracker_sparql_connection_bus_new (dbus_service, NULL, dbus_conn, error);
- } else if (remote_service && !database_path && !dbus_service) {
- return tracker_sparql_connection_remote_new (remote_service);
- } else {
- /* Default to tracker-miner-fs service */
- return tracker_sparql_connection_bus_new ("org.freedesktop.Tracker3.Miner.Files",
- NULL, NULL, error);
- }
+ return tracker_sparql_connection_bus_new ("org.freedesktop.Tracker3.Miner.Files",
+ NULL, NULL, error);
}
static int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]