[tracker-miners/wip/carlosg/dbus-api-changes: 15/29] tracker-miner-fs: Simplify Index.File DBus API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/dbus-api-changes: 15/29] tracker-miner-fs: Simplify Index.File DBus API
- Date: Sat, 1 Aug 2020 11:55:02 +0000 (UTC)
commit db871839d082d83511f9db822634626e6b93bbc8
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 19 16:23:13 2020 +0200
tracker-miner-fs: Simplify Index.File DBus API
All calls can be restricted to one, an IndexFile request that will
set up a listener on the caller for handling lifetime of monitored
directories, or will index single files.
src/miners/fs/tracker-miner-files-index.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files-index.c b/src/miners/fs/tracker-miner-files-index.c
index 82a2c0473..730030713 100644
--- a/src/miners/fs/tracker-miner-files-index.c
+++ b/src/miners/fs/tracker-miner-files-index.c
@@ -32,10 +32,9 @@ static const gchar introspection_xml[] =
" <interface name='org.freedesktop.Tracker3.Miner.Files.Index'>"
" <method name='IndexFile'>"
" <arg type='s' name='file_uri' direction='in' />"
+ " <arg type='as' name='graphs' direction='in' />"
" </method>"
- " <method name='IndexFileForProcess'>"
- " <arg type='s' name='file_uri' direction='in' />"
- " </method>"
+ " <property name='Graphs' type='as' access='read' />"
" </interface>"
"</node>";
@@ -46,13 +45,6 @@ static const gchar introspection_xml[] =
*/
#undef REQUIRE_LOCATION_IN_CONFIG
-typedef struct {
- TrackerDBusRequest *request;
- GDBusMethodInvocation *invocation;
- TrackerSparqlConnection *connection;
- TrackerMinerFiles *miner_files;
-} MimeTypesData;
-
typedef struct {
TrackerMinerFiles *files_miner;
TrackerMinerFilesPeerListener *peer_listener;
@@ -213,10 +205,11 @@ handle_method_call_index_file (TrackerMinerFilesIndex *miner,
gboolean do_checks = FALSE;
GError *internal_error;
const gchar *file_uri;
+ const gchar * const *graphs;
priv = TRACKER_MINER_FILES_INDEX_GET_PRIVATE (miner);
- g_variant_get (parameters, "(&s)", &file_uri);
+ g_variant_get (parameters, "(&s^a&s)", &file_uri, &graphs);
tracker_gdbus_async_return_if_fail (file_uri != NULL, invocation);
@@ -329,8 +322,6 @@ handle_method_call (GDBusConnection *connection,
tracker_gdbus_async_return_if_fail (TRACKER_IS_MINER_FILES_INDEX (miner), invocation);
if (g_strcmp0 (method_name, "IndexFile") == 0) {
- handle_method_call_index_file (miner, invocation, parameters, FALSE);
- } else if (g_strcmp0 (method_name, "IndexFileForProcess") == 0) {
handle_method_call_index_file (miner, invocation, parameters, TRUE);
} else {
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]