[gnome-photos/wip/rishi/collection: 14/20] query: Support human-readable annotations for debugging



commit 25cc988f9db2a8de9139d55a62f6158e7dad1171
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 4 15:46:07 2017 +0200

    query: Support human-readable annotations for debugging

 src/photos-query.c |    9 +++++++++
 src/photos-query.h |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-query.c b/src/photos-query.c
index 15f37ce..83320ed 100644
--- a/src/photos-query.c
+++ b/src/photos-query.c
@@ -27,6 +27,7 @@
 
 #include "photos-base-manager.h"
 #include "photos-query.h"
+#include "photos-utils.h"
 
 
 const gchar *PHOTOS_QUERY_COLLECTIONS_IDENTIFIER = "photos:collection:";
@@ -52,9 +53,17 @@ photos_query_new (PhotosSearchContextState *state, gchar *sparql)
 
 
 void
+photos_query_set_tag (PhotosQuery *query, const gchar *tag)
+{
+  photos_utils_set_string (&query->tag, tag);
+}
+
+
+void
 photos_query_free (PhotosQuery *query)
 {
   g_clear_object (&query->source);
   g_free (query->sparql);
+  g_free (query->tag);
   g_slice_free (PhotosQuery, query);
 }
diff --git a/src/photos-query.h b/src/photos-query.h
index 673b82e..0b7db35 100644
--- a/src/photos-query.h
+++ b/src/photos-query.h
@@ -79,10 +79,13 @@ struct _PhotosQuery
 {
   PhotosSource *source;
   gchar *sparql;
+  gchar *tag;
 };
 
 PhotosQuery    *photos_query_new     (PhotosSearchContextState *state, gchar *sparql);
 
+void            photos_query_set_tag (PhotosQuery *query, const gchar *tag);
+
 void            photos_query_free    (PhotosQuery *query);
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]