[gnome-photos/wip/rishi/collection: 49/52] query-builder: Add photos_query_builder_fetch_collections_local
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 49/52] query-builder: Add photos_query_builder_fetch_collections_local
- Date: Wed, 7 Feb 2018 09:11:02 +0000 (UTC)
commit 98cc6d195977f8944368adc3197e9e2859f2b0e3
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 6 00:39:29 2018 +0100
query-builder: Add photos_query_builder_fetch_collections_local
This is meant to construct a query that will fetch all local
collections.
https://gitlab.gnome.org/GNOME/gnome-photos/issues/29
src/photos-query-builder.c | 19 +++++++++++++++++++
src/photos-query-builder.h | 2 ++
2 files changed, 21 insertions(+)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 983dbe5d..903d4e96 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -281,6 +281,25 @@ photos_query_builder_fetch_collections_for_urn_query (PhotosSearchContextState *
}
+PhotosQuery *
+photos_query_builder_fetch_collections_local (PhotosSearchContextState *state)
+{
+ PhotosQuery *query;
+ g_autofree gchar *sparql = NULL;
+
+ sparql = photos_query_builder_query (state,
+ TRUE,
+ PHOTOS_QUERY_FLAGS_COLLECTIONS
+ | PHOTOS_QUERY_FLAGS_LOCAL
+ | PHOTOS_QUERY_FLAGS_UNLIMITED,
+ NULL);
+
+ query = photos_query_new (NULL, sparql);
+
+ return query;
+}
+
+
PhotosQuery *
photos_query_builder_global_query (PhotosSearchContextState *state,
gint flags,
diff --git a/src/photos-query-builder.h b/src/photos-query-builder.h
index 3703fe8f..c21b1932 100644
--- a/src/photos-query-builder.h
+++ b/src/photos-query-builder.h
@@ -44,6 +44,8 @@ PhotosQuery *photos_query_builder_equipment_query (PhotosSearchContextState *st
PhotosQuery *photos_query_builder_fetch_collections_for_urn_query (PhotosSearchContextState *state,
const gchar *resource);
+PhotosQuery *photos_query_builder_fetch_collections_local (PhotosSearchContextState *state);
+
PhotosQuery *photos_query_builder_global_query (PhotosSearchContextState *state,
gint flags,
PhotosOffsetController *offset_cntrlr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]