[gnome-photos/wip/rishi/collection: 51/54] 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: 51/54] query-builder: Add photos_query_builder_fetch_collections_local
- Date: Tue, 6 Feb 2018 23:27:28 +0000 (UTC)
commit c72babfb1de6be8a4c0bca097aa7a5ca01b3318f
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]