[tracker/wip/sam/resource: 25/27] Remove deprecated libtracker-extract API



commit 801e68953943fe0f975200b2bdee270492d1c79e
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon May 2 22:37:21 2016 +0200

    Remove deprecated libtracker-extract API
    
    I'm not entirely sure if this is OK, but I seem to remember that
    libtracker-extract is now private API. It would be more work for
    tracker-extract to support both SPARQL extractors and
    TrackerResource-based extractors at the same time, so let's not do
    that unless there's a provable benefit.

 src/libtracker-extract/tracker-extract-info.c      |  146 +------
 src/libtracker-extract/tracker-extract-info.h      |   14 +-
 src/libtracker-extract/tracker-xmp.c               |  469 --------------------
 src/libtracker-extract/tracker-xmp.h               |   11 -
 .../libtracker-extract/tracker-extract-info-test.c |   13 +-
 5 files changed, 4 insertions(+), 649 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-extract-info.c b/src/libtracker-extract/tracker-extract-info.c
index 56c957f..90c2836 100644
--- a/src/libtracker-extract/tracker-extract-info.c
+++ b/src/libtracker-extract/tracker-extract-info.c
@@ -41,15 +41,8 @@ struct _TrackerExtractInfo
 {
        TrackerResource *resource;
 
-       TrackerSparqlBuilder *preupdate;
-       TrackerSparqlBuilder *postupdate;
-       TrackerSparqlBuilder *metadata;
-       gchar *where_clause;
-
        GFile *file;
        gchar *mimetype;
-       gchar *graph;
-       gchar *urn;
 
 #ifdef HAVE_LIBMEDIAART
        MediaArtProcess *media_art_process;
@@ -75,9 +68,7 @@ G_DEFINE_BOXED_TYPE (TrackerExtractInfo, tracker_extract_info,
  **/
 TrackerExtractInfo *
 tracker_extract_info_new (GFile       *file,
-                          const gchar *mimetype,
-                          const gchar *graph,
-                          const gchar *urn)
+                          const gchar *mimetype)
 {
        TrackerExtractInfo *info;
 
@@ -86,17 +77,9 @@ tracker_extract_info_new (GFile       *file,
        info = g_slice_new0 (TrackerExtractInfo);
        info->file = g_object_ref (file);
        info->mimetype = g_strdup (mimetype);
-       info->graph = g_strdup (graph);
-       info->urn = g_strdup (urn);
 
        info->resource = NULL;
 
-       info->preupdate = tracker_sparql_builder_new_update ();
-       info->postupdate = tracker_sparql_builder_new_update ();
-       info->metadata = tracker_sparql_builder_new_embedded_insert ();
-
-        info->where_clause = NULL;
-
 #ifdef HAVE_LIBMEDIAART
         info->media_art_process = NULL;
 #endif
@@ -195,133 +178,6 @@ tracker_extract_info_get_mimetype (TrackerExtractInfo *info)
        return info->mimetype;
 }
 
-/**
- * tracker_extract_info_get_graph:
- * @info: a #TrackerExtractInfo
- *
- * Returns the SPARQL graph that will be used when
- * inserting metadata.
- *
- * Returns: (transfer none): The SPARQL graph the extract
- *          operation belongs to.
- *
- * Since: 0.12
- **/
-const gchar *
-tracker_extract_info_get_graph (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->graph;
-}
-
-/**
- * tracker_extract_info_get_preupdate_builder:
- * @info: a #TrackerExtractInfo
- *
- * Returns a #TrackerSparqlBuilder containing any
- * separate updates that could apply to the file,
- * such as author/band information in audio files,
- * and so on.
- *
- * Returns: (transfer none): miscellaneous metadata
- *
- * Since: 0.12
- **/
-TrackerSparqlBuilder *
-tracker_extract_info_get_preupdate_builder (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->preupdate;
-}
-
-/**
- * tracker_extract_info_get_postupdate_builder:
- * @info: a #TrackerExtractInfo
- *
- * Returns a #TrackerSparqlBuilder containing separate
- * updates for resources that are contained within the file
- * and need to refer to it.
- *
- * Returns: (transfer none): #TrackerSparqlBuilder for
- * resources that need inserting after the file resource.
- *
- * Since: 0.12.4
- **/
-TrackerSparqlBuilder *
-tracker_extract_info_get_postupdate_builder (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->postupdate;
-}
-
-/**
- * tracker_extract_info_get_metadata_builder:
- * @info: a #TrackerExtractInfo
- *
- * Returns a #TrackerSparqlBuilder containing the
- * file metadata.
- *
- * Returns: (transfer none): the file metadata
- *
- * Since: 0.12
- **/
-TrackerSparqlBuilder *
-tracker_extract_info_get_metadata_builder (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->metadata;
-}
-
-/**
- * tracker_extract_info_get_where_clause:
- * @info: a #TrackerExtractInfo
- *
- * Returns the where clause that will apply to the
- * other metadata contained in @info.
- *
- * Returns: (transfer none): The where clause
- *
- * Since: 0.12
- **/
-const gchar *
-tracker_extract_info_get_where_clause (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->where_clause;
-}
-
-/**
- * tracker_extract_info_set_where_clause:
- * @info: a #TrackerExtractInfo
- * @where: Where clause for the file update.
- *
- * Sets the where clause for the returned metadata.
- *
- * Since: 0.12
- **/
-void
-tracker_extract_info_set_where_clause (TrackerExtractInfo *info,
-                                       const gchar        *where)
-{
-       g_return_if_fail (info != NULL);
-
-       g_free (info->where_clause);
-       info->where_clause = g_strdup (where);
-}
-
-const gchar *
-tracker_extract_info_get_urn (TrackerExtractInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-
-       return info->urn;
-}
-
 
 /**
  * tracker_extract_info_get_resource:
diff --git a/src/libtracker-extract/tracker-extract-info.h b/src/libtracker-extract/tracker-extract-info.h
index a75031d..5036f8d 100644
--- a/src/libtracker-extract/tracker-extract-info.h
+++ b/src/libtracker-extract/tracker-extract-info.h
@@ -40,9 +40,7 @@ typedef struct _TrackerExtractInfo TrackerExtractInfo;
 GType                 tracker_extract_info_get_type               (void) G_GNUC_CONST;
 
 TrackerExtractInfo *  tracker_extract_info_new                    (GFile              *file,
-                                                                   const gchar        *mimetype,
-                                                                   const gchar        *graph,
-                                                                   const gchar        *urn);
+                                                                   const gchar        *mimetype);
 TrackerExtractInfo *  tracker_extract_info_ref                    (TrackerExtractInfo *info);
 void                  tracker_extract_info_unref                  (TrackerExtractInfo *info);
 GFile *               tracker_extract_info_get_file               (TrackerExtractInfo *info);
@@ -52,16 +50,6 @@ TrackerResource *     tracker_extract_info_get_resource           (TrackerExtrac
 void                  tracker_extract_info_set_resource           (TrackerExtractInfo *info,
                                                                    TrackerResource    *resource);
 
-/* All these are deprecated since TrackerResource support was added */
-const gchar *         tracker_extract_info_get_graph              (TrackerExtractInfo *info);
-const gchar *         tracker_extract_info_get_urn                (TrackerExtractInfo *info);
-TrackerSparqlBuilder *tracker_extract_info_get_preupdate_builder  (TrackerExtractInfo *info);
-TrackerSparqlBuilder *tracker_extract_info_get_postupdate_builder (TrackerExtractInfo *info);
-TrackerSparqlBuilder *tracker_extract_info_get_metadata_builder   (TrackerExtractInfo *info);
-const gchar *         tracker_extract_info_get_where_clause       (TrackerExtractInfo *info);
-void                  tracker_extract_info_set_where_clause       (TrackerExtractInfo *info,
-                                                                   const gchar        *where);
-
 #ifdef HAVE_LIBMEDIAART
 
 MediaArtProcess *     tracker_extract_info_get_media_art_process  (TrackerExtractInfo *info);
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index 2e6c31c..5065925 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -868,475 +868,6 @@ fix_region_type (const gchar *region_type)
 
 
 /**
- * tracker_xmp_apply:
- * @preupdate: the preupdate object to apply XMP data to.
- * @metadata: the metadata object to apply XMP data to.
- * @graph: the graph to apply XMP data to.
- * @where: the where object.
- * @uri: the URI this is related to.
- * @data: the data to push into @metadata.
- *
- * This function applies all data in @data to @metadata.
- *
- * The @graph parameter was added in 0.12.
- *
- * This function also calls tracker_xmp_apply_regions(), so there is
- * no need to call both functions.
- *
- * Returns: %TRUE if the @data was applied to @metadata successfully,
- * otherwise %FALSE is returned.
- *
- * Since: 0.8
- * Deprecated: 1.10: Use TrackerResource instead
- **/
-gboolean
-tracker_xmp_apply (TrackerSparqlBuilder *preupdate,
-                   TrackerSparqlBuilder *metadata,
-                   const gchar          *graph,
-                   GString              *where,
-                   const gchar          *uri,
-                   TrackerXmpData       *data)
-{
-       GPtrArray *keywords;
-       guint i;
-
-       g_return_val_if_fail (TRACKER_SPARQL_IS_BUILDER (preupdate), FALSE);
-       g_return_val_if_fail (TRACKER_SPARQL_IS_BUILDER (metadata), FALSE);
-       g_return_val_if_fail (uri != NULL, FALSE);
-       g_return_val_if_fail (data != NULL, FALSE);
-
-       keywords = g_ptr_array_new ();
-
-       if (data->keywords) {
-               tracker_keywords_parse (keywords, data->keywords);
-       }
-
-       if (data->subject) {
-               tracker_keywords_parse (keywords, data->subject);
-       }
-
-       if (data->pdf_keywords) {
-               tracker_keywords_parse (keywords, data->pdf_keywords);
-       }
-
-       for (i = 0; i < keywords->len; i++) {
-               gchar *p, *escaped, *var;
-
-               p = g_ptr_array_index (keywords, i);
-               escaped = tracker_sparql_escape_string (p);
-               var = g_strdup_printf ("tag%d", i + 1);
-
-               /* ensure tag with specified label exists */
-               tracker_sparql_builder_append (preupdate,
-                                              "INSERT { ");
-
-               if (graph) {
-                       tracker_sparql_builder_append (preupdate, "GRAPH <");
-                       tracker_sparql_builder_append (preupdate, graph);
-                       tracker_sparql_builder_append (preupdate, "> { ");
-               }
-
-               tracker_sparql_builder_append (preupdate,"_:tag a nao:Tag ; nao:prefLabel \"");
-               tracker_sparql_builder_append (preupdate, escaped);
-
-               if (graph) {
-                       tracker_sparql_builder_append (preupdate, " } ");
-               }
-
-               tracker_sparql_builder_append (preupdate,
-                                              "\" }\nWHERE { FILTER (NOT EXISTS { "
-                                              "?tag a nao:Tag ; nao:prefLabel \"");
-               tracker_sparql_builder_append (preupdate, escaped);
-               tracker_sparql_builder_append (preupdate,
-                                              "\" }) }\n");
-
-               /* associate file with tag */
-               tracker_sparql_builder_predicate (metadata, "nao:hasTag");
-               tracker_sparql_builder_object_variable (metadata, var);
-
-               g_string_append_printf (where, "?%s a nao:Tag ; nao:prefLabel \"%s\" .\n", var, escaped);
-
-               g_free (var);
-               g_free (escaped);
-               g_free (p);
-       }
-       g_ptr_array_free (keywords, TRUE);
-
-       if (data->publisher) {
-               tracker_sparql_builder_predicate (metadata, "nco:publisher");
-
-               tracker_sparql_builder_object_blank_open (metadata);
-               tracker_sparql_builder_predicate (metadata, "a");
-               tracker_sparql_builder_object (metadata, "nco:Contact");
-
-               tracker_sparql_builder_predicate (metadata, "nco:fullname");
-               tracker_sparql_builder_object_unvalidated (metadata, data->publisher);
-               tracker_sparql_builder_object_blank_close (metadata);
-       }
-
-       if (data->type) {
-               tracker_sparql_builder_predicate (metadata, "dc:type");
-               tracker_sparql_builder_object_unvalidated (metadata, data->type);
-       }
-
-       if (data->format) {
-               tracker_sparql_builder_predicate (metadata, "dc:format");
-               tracker_sparql_builder_object_unvalidated (metadata, data->format);
-       }
-
-       if (data->identifier) {
-               tracker_sparql_builder_predicate (metadata, "dc:identifier");
-               tracker_sparql_builder_object_unvalidated (metadata, data->identifier);
-       }
-
-       if (data->source) {
-               tracker_sparql_builder_predicate (metadata, "dc:source");
-               tracker_sparql_builder_object_unvalidated (metadata, data->source);
-       }
-
-       if (data->language) {
-               tracker_sparql_builder_predicate (metadata, "dc:language");
-               tracker_sparql_builder_object_unvalidated (metadata, data->language);
-       }
-
-       if (data->relation) {
-               tracker_sparql_builder_predicate (metadata, "dc:relation");
-               tracker_sparql_builder_object_unvalidated (metadata, data->relation);
-       }
-
-       if (data->coverage) {
-               tracker_sparql_builder_predicate (metadata, "dc:coverage");
-               tracker_sparql_builder_object_unvalidated (metadata, data->coverage);
-       }
-
-       if (data->license) {
-               tracker_sparql_builder_predicate (metadata, "dc:license");
-               tracker_sparql_builder_object_unvalidated (metadata, data->license);
-       }
-
-       if (data->make || data->model) {
-               gchar *equip_uri;
-
-               equip_uri = tracker_sparql_escape_uri_printf ("urn:equipment:%s:%s:",
-                                                             data->make ? data->make : "",
-                                                             data->model ? data->model : "");
-
-               tracker_sparql_builder_insert_open (preupdate, NULL);
-               if (graph) {
-                       tracker_sparql_builder_graph_open (preupdate, graph);
-               }
-
-               tracker_sparql_builder_subject_iri (preupdate, equip_uri);
-               tracker_sparql_builder_predicate (preupdate, "a");
-               tracker_sparql_builder_object (preupdate, "nfo:Equipment");
-
-               if (data->make) {
-                       tracker_sparql_builder_predicate (preupdate, "nfo:manufacturer");
-                       tracker_sparql_builder_object_unvalidated (preupdate, data->make);
-               }
-               if (data->model) {
-                       tracker_sparql_builder_predicate (preupdate, "nfo:model");
-                       tracker_sparql_builder_object_unvalidated (preupdate, data->model);
-               }
-
-               if (graph) {
-                       tracker_sparql_builder_graph_close (preupdate);
-               }
-               tracker_sparql_builder_insert_close (preupdate);
-
-               tracker_sparql_builder_predicate (metadata, "nfo:equipment");
-               tracker_sparql_builder_object_iri (metadata, equip_uri);
-               g_free (equip_uri);
-       }
-
-       if (data->title || data->title2 || data->pdf_title) {
-               const gchar *final_title = tracker_coalesce_strip (3, data->title,
-                                                                  data->title2,
-                                                                  data->pdf_title);
-
-               tracker_sparql_builder_predicate (metadata, "nie:title");
-               tracker_sparql_builder_object_unvalidated (metadata, final_title);
-       }
-
-       if (data->orientation) {
-               tracker_sparql_builder_predicate (metadata, "nfo:orientation");
-               tracker_sparql_builder_object_unvalidated (metadata, data->orientation);
-       }
-
-       if (data->rights || data->copyright) {
-               const gchar *final_rights = tracker_coalesce_strip (2, data->copyright, data->rights);
-
-               tracker_sparql_builder_predicate (metadata, "nie:copyright");
-               tracker_sparql_builder_object_unvalidated (metadata, final_rights);
-       }
-
-       if (data->white_balance) {
-               tracker_sparql_builder_predicate (metadata, "nmm:whiteBalance");
-               tracker_sparql_builder_object_unvalidated (metadata, data->white_balance);
-       }
-
-       if (data->fnumber) {
-               tracker_sparql_builder_predicate (metadata, "nmm:fnumber");
-               tracker_sparql_builder_object_unvalidated (metadata, data->fnumber);
-       }
-
-       if (data->flash) {
-               tracker_sparql_builder_predicate (metadata, "nmm:flash");
-               tracker_sparql_builder_object_unvalidated (metadata, data->flash);
-       }
-
-       if (data->focal_length) {
-               tracker_sparql_builder_predicate (metadata, "nmm:focalLength");
-               tracker_sparql_builder_object_unvalidated (metadata, data->focal_length);
-       }
-
-       if (data->artist || data->contributor) {
-               const gchar *final_artist = tracker_coalesce_strip (2, data->artist, data->contributor);
-
-               tracker_sparql_builder_predicate (metadata, "nco:contributor");
-
-               tracker_sparql_builder_object_blank_open (metadata);
-               tracker_sparql_builder_predicate (metadata, "a");
-               tracker_sparql_builder_object (metadata, "nco:Contact");
-
-               tracker_sparql_builder_predicate (metadata, "nco:fullname");
-               tracker_sparql_builder_object_unvalidated (metadata, final_artist);
-               tracker_sparql_builder_object_blank_close (metadata);
-       }
-
-       if (data->exposure_time) {
-               tracker_sparql_builder_predicate (metadata, "nmm:exposureTime");
-               tracker_sparql_builder_object_unvalidated (metadata, data->exposure_time);
-       }
-
-       if (data->iso_speed_ratings) {
-               tracker_sparql_builder_predicate (metadata, "nmm:isoSpeed");
-               tracker_sparql_builder_object_unvalidated (metadata, data->iso_speed_ratings);
-       }
-
-       if (data->date || data->time_original) {
-               const gchar *final_date = tracker_coalesce_strip (2, data->date,
-                                                                 data->time_original);
-
-               tracker_sparql_builder_predicate (metadata, "nie:contentCreated");
-               tracker_sparql_builder_object_unvalidated (metadata, final_date);
-       }
-
-       if (data->description) {
-               tracker_sparql_builder_predicate (metadata, "nie:description");
-               tracker_sparql_builder_object_unvalidated (metadata, data->description);
-       }
-
-       if (data->metering_mode) {
-               tracker_sparql_builder_predicate (metadata, "nmm:meteringMode");
-               tracker_sparql_builder_object_unvalidated (metadata, data->metering_mode);
-       }
-
-       if (data->creator) {
-               tracker_sparql_builder_predicate (metadata, "nco:creator");
-
-               tracker_sparql_builder_object_blank_open (metadata);
-               tracker_sparql_builder_predicate (metadata, "a");
-               tracker_sparql_builder_object (metadata, "nco:Contact");
-
-               tracker_sparql_builder_predicate (metadata, "nco:fullname");
-               tracker_sparql_builder_object_unvalidated (metadata, data->creator);
-               tracker_sparql_builder_object_blank_close (metadata);
-       }
-
-       if (data->address || data->state || data->country || data->city ||
-           data->gps_altitude || data->gps_latitude || data->gps_longitude) {
-
-               tracker_sparql_builder_predicate (metadata, "slo:location");
-
-               tracker_sparql_builder_object_blank_open (metadata); /* GeoPoint */
-               tracker_sparql_builder_predicate (metadata, "a");
-               tracker_sparql_builder_object (metadata, "slo:GeoLocation");
-
-               if (data->address || data->state || data->country || data->city) {
-                       gchar *addruri;
-
-                       addruri = tracker_sparql_get_uuid_urn ();
-
-                       tracker_sparql_builder_predicate (metadata, "slo:postalAddress");
-                       tracker_sparql_builder_object_iri (metadata, addruri);
-
-                       tracker_sparql_builder_insert_open (preupdate, NULL);
-                       tracker_sparql_builder_subject_iri (preupdate, addruri);
-
-                       g_free (addruri);
-
-                       tracker_sparql_builder_predicate (preupdate, "a");
-                       tracker_sparql_builder_object (preupdate, "nco:PostalAddress");
-
-                       if (data->address) {
-                               tracker_sparql_builder_predicate (preupdate, "nco:streetAddress");
-                               tracker_sparql_builder_object_unvalidated (preupdate, data->address);
-                       }
-
-                       if (data->state) {
-                               tracker_sparql_builder_predicate (preupdate, "nco:region");
-                               tracker_sparql_builder_object_unvalidated (preupdate, data->state);
-                       }
-
-                       if (data->city) {
-                               tracker_sparql_builder_predicate (preupdate, "nco:locality");
-                               tracker_sparql_builder_object_unvalidated (preupdate, data->city);
-                       }
-
-                       if (data->country) {
-                               tracker_sparql_builder_predicate (preupdate, "nco:country");
-                               tracker_sparql_builder_object_unvalidated (preupdate, data->country);
-                       }
-
-                       tracker_sparql_builder_insert_close (preupdate);
-               }
-
-               /* FIXME We are not handling the altitude ref here */
-
-               if (data->gps_altitude) {
-                       tracker_sparql_builder_predicate (metadata, "slo:altitude");
-                       tracker_sparql_builder_object_unvalidated (metadata, data->gps_altitude);
-               }
-
-               if (data->gps_latitude) {
-                       tracker_sparql_builder_predicate (metadata, "slo:latitude");
-                       tracker_sparql_builder_object_unvalidated (metadata, data->gps_latitude);
-               }
-
-               if (data->gps_longitude) {
-                       tracker_sparql_builder_predicate (metadata, "slo:longitude");
-                       tracker_sparql_builder_object_unvalidated (metadata, data->gps_longitude);
-               }
-
-               tracker_sparql_builder_object_blank_close (metadata); /* GeoLocation */
-       }
-
-       if (data->gps_direction) {
-               tracker_sparql_builder_predicate (metadata, "nfo:heading");
-               tracker_sparql_builder_object_unvalidated (metadata, data->gps_direction);
-       }
-
-
-        if (data->regions) {
-               tracker_xmp_apply_regions (preupdate, metadata, graph, data);
-        }
-
-       return TRUE;
-}
-
-/**
- * tracker_xmp_apply_regions:
- * @preupdate: the preupdate object to apply XMP data to.
- * @metadata: the metadata object to apply XMP data to.
- * @graph: the graph to apply XMP data to.
- * @data: the data to push into @preupdate and @metadata.
- *
- * This function applies all regional @data to @preupdate and
- * @metadata. Regional data exists for image formats like JPEG, PNG,
- * etc. where parts of the image refer to areas of interest. This can
- * be people's faces, places to focus, barcodes, etc. The regional
- * data describes the title, height, width, X, Y and can occur
- * multiple times in a given file.
- *
- * This data usually is standardized between image formats and that's
- * what makes this function different to tracker_xmp_apply() which is
- * useful for XMP files only.
- *
- * Returns: %TRUE if the @data was applied to @preupdate and @metadata
- * successfully, otherwise %FALSE is returned.
- *
- * Since: 0.12
- * Deprecated: 1.10: Use TrackerResource instead
- **/
-gboolean
-tracker_xmp_apply_regions (TrackerSparqlBuilder *preupdate,
-                           TrackerSparqlBuilder *metadata,
-                           const gchar          *graph,
-                           TrackerXmpData       *data)
-{
-        GSList *iter;
-
-        g_return_val_if_fail (TRACKER_SPARQL_IS_BUILDER (preupdate), FALSE);
-        g_return_val_if_fail (TRACKER_SPARQL_IS_BUILDER (metadata), FALSE);
-        g_return_val_if_fail (data != NULL, FALSE);
-
-        if (!data->regions) {
-                return TRUE;
-        }
-
-        for (iter = data->regions; iter != NULL; iter = iter->next) {
-               TrackerXmpRegion *region;
-               gchar *uuid;
-
-                region = (TrackerXmpRegion *) iter->data;
-                uuid = tracker_sparql_get_uuid_urn ();
-
-               tracker_sparql_builder_insert_open (preupdate, NULL);
-               if (graph) {
-                       tracker_sparql_builder_graph_open (preupdate, graph);
-               }
-
-               tracker_sparql_builder_subject_iri (preupdate, uuid);
-               tracker_sparql_builder_predicate (preupdate, "a");
-               tracker_sparql_builder_object (preupdate, "nfo:RegionOfInterest");
-
-                if (region->title) {
-                        tracker_sparql_builder_predicate (preupdate, "nie:title");
-                        tracker_sparql_builder_object_string (preupdate, region->title);
-                }
-
-                if (region->description) {
-                        tracker_sparql_builder_predicate (preupdate, "nie:description");
-                        tracker_sparql_builder_object_string (preupdate, region->description);
-                }
-
-                if (region->type) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:regionOfInterestType");
-                        tracker_sparql_builder_object (preupdate, fix_region_type (region->type));
-                }
-
-                if (region->x) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:regionOfInterestX");
-                        tracker_sparql_builder_object_unvalidated (preupdate, region->x);
-                }
-
-                if (region->y) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:regionOfInterestY");
-                        tracker_sparql_builder_object_unvalidated (preupdate, region->y);
-                }
-
-                if (region->width) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:regionOfInterestWidth");
-                        tracker_sparql_builder_object_unvalidated (preupdate, region->width);
-                }
-
-                if (region->height) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:regionOfInterestHeight");
-                        tracker_sparql_builder_object_unvalidated (preupdate, region->height);
-                }
-
-                if (region->link_uri && region->link_class) {
-                        tracker_sparql_builder_predicate (preupdate, "nfo:roiRefersTo");
-                        tracker_sparql_builder_object_iri (preupdate, region->link_uri);
-                }
-
-               if (graph) {
-                       tracker_sparql_builder_graph_close (preupdate);
-               }
-               tracker_sparql_builder_insert_close (preupdate);
-
-                /* Handle non-preupdate metadata */
-                tracker_sparql_builder_predicate (metadata, "nfo:hasRegionOfInterest");
-                tracker_sparql_builder_object_iri (metadata, uuid);
-
-                g_free (uuid);
-        }
-
-        return TRUE;
-}
-
-/**
  * tracker_xmp_apply_to_resource:
  * @resource: the #TrackerResource to apply XMP data to.
  * @data: the data to push into @resource.
diff --git a/src/libtracker-extract/tracker-xmp.h b/src/libtracker-extract/tracker-xmp.h
index 5061900..3a3016d 100644
--- a/src/libtracker-extract/tracker-xmp.h
+++ b/src/libtracker-extract/tracker-xmp.h
@@ -184,17 +184,6 @@ gboolean         tracker_xmp_read  (const gchar          *buffer,
                                     const gchar          *uri,
                                     TrackerXmpData       *data) G_GNUC_DEPRECATED;
 
-gboolean        tracker_xmp_apply         (TrackerSparqlBuilder *preupdate,
-                                           TrackerSparqlBuilder *metadata,
-                                           const gchar          *graph,
-                                           GString              *where,
-                                           const gchar          *uri,
-                                           TrackerXmpData       *data) G_GNUC_DEPRECATED;
-;
-gboolean        tracker_xmp_apply_regions (TrackerSparqlBuilder *preupdate,
-                                           TrackerSparqlBuilder *metadata,
-                                           const gchar          *graph,
-                                           TrackerXmpData       *data) G_GNUC_DEPRECATED;
 #endif /* TRACKER_DISABLE_DEPRECATED */
 
 G_END_DECLS
diff --git a/tests/libtracker-extract/tracker-extract-info-test.c 
b/tests/libtracker-extract/tracker-extract-info-test.c
index d8b3b18..d189d44 100644
--- a/tests/libtracker-extract/tracker-extract-info-test.c
+++ b/tests/libtracker-extract/tracker-extract-info-test.c
@@ -29,21 +29,12 @@ test_extract_info_setters (void)
 
         file = g_file_new_for_path ("./imaginary-file-2");
 
-        info = tracker_extract_info_new (file, "imaginary/mime", "test-graph", "test-urn");
+        info = tracker_extract_info_new (file, "imaginary/mime");
         info_ref = tracker_extract_info_ref (info);
 
         g_assert (g_file_equal (file, tracker_extract_info_get_file (info)));
 
         g_assert_cmpstr (tracker_extract_info_get_mimetype (info), ==, "imaginary/mime");
-        g_assert_cmpstr (tracker_extract_info_get_graph (info), ==, "test-graph");
-        g_assert_cmpstr (tracker_extract_info_get_urn (info), ==, "test-urn");
-        g_assert (tracker_extract_info_get_preupdate_builder (info));
-        g_assert (tracker_extract_info_get_postupdate_builder (info));
-        g_assert (tracker_extract_info_get_metadata_builder (info));
-
-        g_assert (!tracker_extract_info_get_where_clause (info));
-        tracker_extract_info_set_where_clause (info, "where stuff");
-        g_assert_cmpstr (tracker_extract_info_get_where_clause (info), ==, "where stuff");
 
         tracker_extract_info_unref (info_ref);
         tracker_extract_info_unref (info);
@@ -59,7 +50,7 @@ test_extract_info_empty_objects (void)
 
         file = g_file_new_for_path ("./imaginary-file");
 
-        info = tracker_extract_info_new (file, "imaginary/mime", "test-graph", "test-urn");
+        info = tracker_extract_info_new (file, "imaginary/mime");
         info_ref = tracker_extract_info_ref (info);
 
         tracker_extract_info_unref (info_ref);


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