[gnome-photos] query-builder: Add photos_query_builder_location_query



commit 11e7d2b93015b3049b711ae521c6dc732e8194e1
Author: Shivam Tripathi <shivam flash gmail com>
Date:   Sat Dec 17 19:06:18 2016 +0530

    query-builder: Add photos_query_builder_location_query
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747123

 src/photos-query-builder.c |   10 ++++++++++
 src/photos-query-builder.h |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 7014920..bfd1727 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -300,6 +300,16 @@ photos_query_builder_global_query (PhotosSearchContextState *state,
 
 
 PhotosQuery *
+photos_query_builder_location_query (PhotosSearchContextState *state, const gchar *location_urn)
+{
+  gchar *sparql;
+
+  sparql = g_strdup_printf ("SELECT slo:latitude (<%s>) slo:longitude (<%s>) WHERE {}", location_urn, 
location_urn);
+  return photos_query_new (state, sparql);
+}
+
+
+PhotosQuery *
 photos_query_builder_set_collection_query (PhotosSearchContextState *state,
                                            const gchar *item_urn,
                                            const gchar *collection_urn,
diff --git a/src/photos-query-builder.h b/src/photos-query-builder.h
index 30c9693..fdeebb1 100644
--- a/src/photos-query-builder.h
+++ b/src/photos-query-builder.h
@@ -49,6 +49,8 @@ PhotosQuery  *photos_query_builder_global_query        (PhotosSearchContextState
                                                         gint flags,
                                                         PhotosOffsetController *offset_cntrlr);
 
+PhotosQuery  *photos_query_builder_location_query (PhotosSearchContextState *state, const gchar 
*location_urn);
+
 PhotosQuery  *photos_query_builder_set_collection_query (PhotosSearchContextState *state,
                                                          const gchar *item_urn,
                                                          const gchar *collection_urn,


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