summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-05-23 13:20:33 +0200
committerJean Felder <jean.felder@gmail.com>2020-08-21 15:05:10 +0000
commita9482646b7e5e926dd72f0a58f52c6b2973459cf (patch)
treed95b09a8a6e2f377a1270ed459cb3766a26257f6
parent7d36826be38ae055642901f90718a3da6f9882d4 (diff)
downloadgrilo-plugins-a9482646b7e5e926dd72f0a58f52c6b2973459cf.tar.gz
tracker3: Drop old sparql helper functions
Those are not used anymore.
-rw-r--r--src/tracker3/grl-tracker-source-api.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/src/tracker3/grl-tracker-source-api.c b/src/tracker3/grl-tracker-source-api.c
index 87f251e..8d38367 100644
--- a/src/tracker3/grl-tracker-source-api.c
+++ b/src/tracker3/grl-tracker-source-api.c
@@ -193,48 +193,6 @@ fill_grilo_media_from_sparql (GrlTrackerSource *source,
}
}
-static gchar *
-get_sparql_type_filter (GrlOperationOptions *options,
- gboolean prepend_union)
-{
- GrlTypeFilter filter = grl_operation_options_get_type_filter (options);
- GString *sparql_filter = g_string_new ("");
-
- if (filter & GRL_TYPE_FILTER_AUDIO) {
- if (prepend_union) {
- sparql_filter = g_string_append (sparql_filter,
- "UNION { ?urn a nfo:Audio } ");
- } else {
- sparql_filter = g_string_append (sparql_filter,
- "{ ?urn a nfo:Audio } ");
- prepend_union = TRUE;
- }
- }
- if (filter & GRL_TYPE_FILTER_VIDEO) {
- if (prepend_union) {
- sparql_filter = g_string_append (sparql_filter,
- "UNION { ?urn a nmm:Video } ");
- } else {
- sparql_filter = g_string_append (sparql_filter,
- "{ ?urn a nmm:Video } ");
- prepend_union = TRUE;
- }
- }
- if (filter & GRL_TYPE_FILTER_IMAGE) {
- if (prepend_union) {
- sparql_filter = g_string_append (sparql_filter,
- "UNION { ?urn a nmm:Photo } ");
- } else {
- sparql_filter = g_string_append (sparql_filter,
- "{ ?urn a nmm:Photo } ");
- }
- }
-
- sparql_filter = g_string_append_c (sparql_filter, '.');
-
- return g_string_free (sparql_filter, FALSE);
-}
-
static GrlTrackerOp *
grl_tracker_op_new (GrlTypeFilter type_filter,
const GList *keys,
@@ -559,54 +517,6 @@ grl_tracker_source_writable_keys (GrlSource *source)
return keys;
}
-static void
-grl_tracker_source_get_duration_min_max (GrlOperationOptions *options,
- int *min,
- int *max)
-{
- GValue *min_val, *max_val;
-
- grl_operation_options_get_key_range_filter (options, GRL_METADATA_KEY_DURATION,
- &min_val, &max_val);
- if (min_val)
- *min = g_value_get_int (min_val);
- else
- *min = -1;
- if (max_val)
- *max = g_value_get_int (max_val);
- else
- *max = -1;
-}
-
-static char *
-grl_tracker_source_create_constraint (int min, int max)
-{
- if (min <= 0 && max <= 0)
- return g_strdup ("");
- if (max <= 0) {
- return g_strdup_printf ("?urn a nfo:FileDataObject . "
- "OPTIONAL {"
- " ?urn nfo:duration ?duration "
- "} . "
- "FILTER(?duration > %d || !BOUND(?duration))",
- min);
- }
- if (min <= 0) {
- return g_strdup_printf ("?urn a nfo:FileDataObject . "
- "OPTIONAL {"
- " ?urn nfo:duration ?duration "
- "} . "
- "FILTER(?duration < %d || !BOUND(?duration))",
- max);
- }
- return g_strdup_printf ("?urn a nfo:FileDataObject . "
- "OPTIONAL {"
- " ?urn nfo:duration ?duration "
- "} . "
- "FILTER(?duration < %d || ?duration > %d || !BOUND(?duration))",
- max, min);
-}
-
/**
* Query is a SPARQL query.
*