From db0f9604335db95658fd37c4677eb33769acb3ee Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 4 Dec 2013 11:58:02 -0200 Subject: [PATCH] daemon: export read-only property DataBasePath. This is useful for users to know where is the database instead of negotiating this in another way (like configuration files of both lightmediascannerd and clients). --- src/bin/lightmediascannerd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/lightmediascannerd.c b/src/bin/lightmediascannerd.c index 606860d..e77f352 100644 --- a/src/bin/lightmediascannerd.c +++ b/src/bin/lightmediascannerd.c @@ -22,6 +22,7 @@ static const char BUS_IFACE[] = "org.lightmediascanner.Scanner1"; static const char introspection_xml[] = "" " " + " " " " " " " " @@ -802,7 +803,9 @@ scanner_get_prop(GDBusConnection *conn, const char *sender, const char *opath, c scanner_t *scanner = data; GVariant *ret; - if (strcmp(prop, "IsScanning") == 0) + if (strcmp(prop, "DataBasePath") == 0) + ret = g_variant_new_string(db_path); + else if (strcmp(prop, "IsScanning") == 0) ret = g_variant_new_boolean(scanner->thread != NULL); else if (strcmp(prop, "WriteLocked") == 0) ret = g_variant_new_boolean(check_write_locked(scanner)); -- 2.7.4