summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2015-10-02 14:30:34 +0000
committerJuan A. Suarez Romero <jasuarez@igalia.com>2015-10-02 14:30:34 +0000
commit770f78f7825926751d20de458e4641b9ba75b68e (patch)
tree362940ccc2951b305c4ee027cd6b3a425a933835
parent71e453b18a64b3cb5b2ec4b3072e4f4549518d97 (diff)
grl-inspect: print related keys
-rw-r--r--tools/grilo-inspect/grl-inspect.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/grilo-inspect/grl-inspect.c b/tools/grilo-inspect/grl-inspect.c
index d14d449..13dfe62 100644
--- a/tools/grilo-inspect/grl-inspect.c
+++ b/tools/grilo-inspect/grl-inspect.c
@@ -193,6 +193,15 @@ print_keys (const GList *keys)
}
static void
+print_related_keys (GrlKeyID key)
+{
+ const GList *partners;
+
+ partners = grl_registry_lookup_metadata_key_relation (registry, key);
+ print_keys (partners);
+}
+
+static void
print_readable_keys (GList *sources, GrlKeyID key)
{
GList *s;
@@ -435,7 +444,9 @@ introspect_key (const gchar *key_name)
grl_metadata_key_get_desc (key));
g_print (" %-20s %s\n", "Type:",
g_type_name (grl_metadata_key_get_type (key)));
- g_print ("\n");
+ g_print (" %-20s ", "Relations:");
+ print_related_keys (key);
+ g_print ("\n\n");
sources = grl_registry_get_sources (registry, FALSE);
sources = g_list_sort (sources, (GCompareFunc) compare_sources);