/* tracker-miner-flickr.c generated by valac 0.14.0, the Vala compiler
 * generated from tracker-miner-flickr.vala, do not modify */

/*
 * Copyright (C) 2010, Adrien Bustany <abustany@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <libtracker-miner/tracker-miner.h>
#include <gio/gio.h>
#include <rest/rest-proxy.h>
#include <libtracker-sparql/tracker-sparql.h>
#include <rest/rest-proxy-call.h>
#include <rest/rest-xml-parser.h>
#include <float.h>
#include <math.h>
#include <signal.h>
#include <stdio.h>
#include <sys/select.h>


#define TRACKER_TYPE_MINER_FLICKR (tracker_miner_flickr_get_type ())
#define TRACKER_MINER_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_MINER_FLICKR, TrackerMinerFlickr))
#define TRACKER_MINER_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_MINER_FLICKR, TrackerMinerFlickrClass))
#define TRACKER_IS_MINER_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_MINER_FLICKR))
#define TRACKER_IS_MINER_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_MINER_FLICKR))
#define TRACKER_MINER_FLICKR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_MINER_FLICKR, TrackerMinerFlickrClass))

typedef struct _TrackerMinerFlickr TrackerMinerFlickr;
typedef struct _TrackerMinerFlickrClass TrackerMinerFlickrClass;
typedef struct _TrackerMinerFlickrPrivate TrackerMinerFlickrPrivate;

#define TRACKER_MINER_FLICKR_TYPE_EXIF_TAG (tracker_miner_flickr_exif_tag_get_type ())

#define TRACKER_MINER_FLICKR_TYPE_EXIF_METERING_MODE (tracker_miner_flickr_exif_metering_mode_get_type ())

#define TRACKER_MINER_FLICKR_TYPE_EXIF_WHITE_BALANCE (tracker_miner_flickr_exif_white_balance_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _rest_xml_node_unref0(var) ((var == NULL) ? NULL : (var = (rest_xml_node_unref (var), NULL)))
typedef struct _TrackerMinerFlickrInitPullData TrackerMinerFlickrInitPullData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _TrackerMinerFlickrWritebackPhotoData TrackerMinerFlickrWritebackPhotoData;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))

typedef void (*TrackerWritebackCallback) (GHashTable* resources, void* user_data);
typedef enum  {
	TRACKER_REST_CALL_ERROR_INVALID_RESPONSE,
	TRACKER_REST_CALL_ERROR_CALL_ERROR
} TrackerRestCallError;
#define TRACKER_REST_CALL_ERROR tracker_rest_call_error_quark ()
struct _TrackerMinerFlickr {
	TrackerMinerWeb parent_instance;
	TrackerMinerFlickrPrivate * priv;
};

struct _TrackerMinerFlickrClass {
	TrackerMinerWebClass parent_class;
};

struct _TrackerMinerFlickrPrivate {
	guint pull_timeout_handle;
	RestProxy* rest;
	gchar* frob;
	gchar* auth_token;
	gchar* user_id;
	gint nmm_photo_id;
};

typedef enum  {
	TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MAKE = 271,
	TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MODEL = 272,
	TRACKER_MINER_FLICKR_EXIF_TAG_FLASH = 37385,
	TRACKER_MINER_FLICKR_EXIF_TAG_FNUMBER = 33437,
	TRACKER_MINER_FLICKR_EXIF_TAG_FOCAL_LENGTH = 37386,
	TRACKER_MINER_FLICKR_EXIF_TAG_ISO_SPEED = 2,
	TRACKER_MINER_FLICKR_EXIF_TAG_METERING_MODE = 37383,
	TRACKER_MINER_FLICKR_EXIF_TAG_WHITE_BALANCE = 5
} TrackerMinerFlickrExifTag;

typedef enum  {
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_AVERAGE = 1,
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_CENTER_WEIGHTED_AVERAGE,
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_SPOT,
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_MULTISPOT,
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PATTERN,
	TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PARTIAL
} TrackerMinerFlickrExifMeteringMode;

typedef enum  {
	TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_AUTO = 0,
	TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_MANUAL
} TrackerMinerFlickrExifWhiteBalance;

struct _TrackerMinerFlickrInitPullData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrackerMinerFlickr* self;
	RestProxyCall* albums_call;
	RestXmlNode* photosets_node;
	RestProxy* _tmp0_;
	RestProxyCall* _tmp1_;
	RestXmlNode* _tmp2_;
	RestXmlNode* _tmp3_;
	RestXmlNode* _tmp4_;
	GError* call_error;
	GError* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* error_message;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GError * _inner_error_;
};

struct _TrackerMinerFlickrWritebackPhotoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrackerMinerFlickr* self;
	gint id;
	TrackerSparqlCursor* cursor;
	gchar* photo_urn;
	gchar* photo_id;
	gchar** _tmp0_;
	gchar** local_tags;
	gint local_tags_length1;
	gint _local_tags_size_;
	GHashFunc _tmp1_;
	GEqualFunc _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* flickr_tags;
	gchar** _tmp4_;
	gchar** tags_to_add;
	gint tags_to_add_length1;
	gint _tags_to_add_size_;
	gchar** _tmp5_;
	gchar** tags_to_remove;
	gint tags_to_remove_length1;
	gint _tags_to_remove_size_;
	RestProxyCall* tag_call;
	RestXmlNode* root_node;
	RestXmlNode* tag_node;
	TrackerSparqlConnection* _tmp6_;
	TrackerSparqlConnection* _tmp7_;
	TrackerSparqlConnection* c;
	TrackerSparqlConnection* _tmp8_;
	gint _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TrackerSparqlCursor* _tmp12_;
	TrackerSparqlCursor* _tmp13_;
	TrackerSparqlCursor* _tmp14_;
	TrackerSparqlCursor* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	TrackerSparqlCursor* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* s;
	TrackerSparqlConnection* _tmp23_;
	const gchar* _tmp24_;
	TrackerSparqlCursor* _tmp25_;
	TrackerSparqlCursor* _tmp26_;
	GError* query_error;
	gint _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	TrackerSparqlCursor* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	const gchar* _tmp33_;
	TrackerSparqlCursor* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	gchar** _tmp37_;
	gint _tmp37__length1;
	TrackerSparqlCursor* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	TrackerSparqlCursor* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	GError* cursor_error;
	GError* _tmp44_;
	const gchar* _tmp45_;
	RestProxy* _tmp46_;
	RestProxyCall* _tmp47_;
	RestProxyCall* _tmp48_;
	const gchar* _tmp49_;
	RestProxyCall* _tmp50_;
	RestXmlNode* _tmp51_;
	RestXmlNode* _tmp52_;
	GError* get_tags_error;
	const gchar* _tmp53_;
	GError* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* error_message;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	RestXmlNode* _tmp59_;
	RestXmlNode* _tmp60_;
	RestXmlNode* _tmp61_;
	RestXmlNode* _tmp62_;
	RestXmlNode* _tmp63_;
	GHashTable* _tmp64_;
	RestXmlNode* _tmp65_;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	RestXmlNode* _tmp68_;
	const gchar* _tmp69_;
	gchar* _tmp70_;
	RestXmlNode* _tmp71_;
	RestXmlNode* _tmp72_;
	RestXmlNode* _tmp73_;
	gchar** _tmp74_;
	gint _tmp74__length1;
	gchar** local_tag_collection;
	gint local_tag_collection_length1;
	gint _local_tag_collection_size_;
	gint local_tag_it;
	gchar* _tmp75_;
	gchar* local_tag;
	GHashTable* _tmp76_;
	const gchar* _tmp77_;
	gconstpointer _tmp78_;
	gchar** _tmp79_;
	gint _tmp79__length1;
	const gchar* _tmp80_;
	gchar* _tmp81_;
	GHashTable* _tmp82_;
	GList* _tmp83_;
	GList* flickr_tag_collection;
	GList* flickr_tag_it;
	const gchar* flickr_tag;
	const gchar* _tmp84_;
	gchar** _tmp85_;
	gint _tmp85__length1;
	gint _tmp86_;
	gchar** _tmp87_;
	gint _tmp87__length1;
	GHashTable* _tmp88_;
	const gchar* _tmp89_;
	gconstpointer _tmp90_;
	gchar* _tmp91_;
	const gchar* _tmp92_;
	gchar** _tmp93_;
	gint _tmp93__length1;
	gchar** _tmp94_;
	gint _tmp94__length1;
	gchar** tag_collection;
	gint tag_collection_length1;
	gint _tag_collection_size_;
	gint tag_it;
	gchar* _tmp95_;
	gchar* tag;
	const gchar* _tmp96_;
	GError * _inner_error_;
};


static gpointer tracker_miner_flickr_parent_class = NULL;
static GMainLoop* tracker_miner_flickr_main_loop;
static GMainLoop* tracker_miner_flickr_main_loop = NULL;
static gboolean tracker_miner_flickr_in_loop;
static gboolean tracker_miner_flickr_in_loop = FALSE;
static GInitableIface* tracker_miner_flickr_g_initable_parent_iface = NULL;

void tracker_writeback_init (void);
void tracker_writeback_shutdown (void);
guint tracker_writeback_connect (TrackerWritebackCallback callback, void* callback_target, void* user_data);
void tracker_writeback_disconnect (guint handle);
GQuark tracker_rest_call_error_quark (void);
GType tracker_miner_flickr_get_type (void) G_GNUC_CONST;
#define TRACKER_MINER_FLICKR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FLICKR, TrackerMinerFlickrPrivate))
enum  {
	TRACKER_MINER_FLICKR_DUMMY_PROPERTY
};
static GType tracker_miner_flickr_exif_tag_get_type (void) G_GNUC_UNUSED;
static GType tracker_miner_flickr_exif_metering_mode_get_type (void) G_GNUC_UNUSED;
static GType tracker_miner_flickr_exif_white_balance_get_type (void) G_GNUC_UNUSED;
#define TRACKER_MINER_FLICKR_MINER_NAME "Flickr"
#define TRACKER_MINER_FLICKR_MINER_DESCRIPTION "Tracker miner for Flickr"
#define TRACKER_MINER_FLICKR_API_KEY "7983269709fa3158c752e3e4d6b3b9e5"
#define TRACKER_MINER_FLICKR_SHARED_SECRET "c0316d1cb4b15e2d"
#define TRACKER_MINER_FLICKR_DATASOURCE_URN "urn:nepomuk:datasource:2208f9fc-3c5b-4e40-ade4-45a0d7b0cf6f"
#define TRACKER_MINER_FLICKR_FLICKR_AUTH_URL "http://api.flickr.com/services/auth/"
#define TRACKER_MINER_FLICKR_FLICKR_REST_URL "http://api.flickr.com/services/rest/"
#define TRACKER_MINER_FLICKR_FLICKR_PHOTOSET_URL "http://www.flickr.com/photos/%s/sets/%s"
#define TRACKER_MINER_FLICKR_FLICKR_PHOTO_URL "http://farm%s.static.flickr.com/%s/%s_%s.jpg"
#define TRACKER_MINER_FLICKR_PULL_INTERVAL ((guint) (5 * 60))
static gboolean tracker_miner_flickr_real_init (GInitable* base, GCancellable* cancellable, GError** error);
void tracker_miner_flickr_writeback (TrackerMinerFlickr* self, GHashTable* properties);
static void _tracker_miner_flickr_writeback_tracker_writeback_callback (GHashTable* resources, gpointer self);
static void tracker_miner_flickr_init_datasource (TrackerMinerFlickr* self);
static void tracker_miner_flickr_load_nmm_photo_id (TrackerMinerFlickr* self);
static void tracker_miner_flickr_association_status_changed (TrackerMinerFlickr* self, GObject* source, GParamSpec* pspec);
static void _tracker_miner_flickr_association_status_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void tracker_miner_flickr_shutdown (TrackerMinerFlickr* self);
static gboolean tracker_miner_flickr_pull_timeout_cb (TrackerMinerFlickr* self);
static gboolean _tracker_miner_flickr_pull_timeout_cb_gsource_func (gpointer self);
static gboolean ___lambda1_ (TrackerMinerFlickr* self);
static gboolean ____lambda1__gsource_func (gpointer self);
static void tracker_miner_flickr_init_pull (TrackerMinerFlickr* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void tracker_miner_flickr_init_pull_finish (TrackerMinerFlickr* self, GAsyncResult* _res_);
static void tracker_miner_flickr_init_pull_data_free (gpointer _data);
static gboolean tracker_miner_flickr_init_pull_co (TrackerMinerFlickrInitPullData* _data_);
static gboolean _tracker_miner_flickr_init_pull_co_gsource_func (gpointer self);
static RestXmlNode* tracker_miner_flickr_run_call (TrackerMinerFlickr* self, RestProxyCall* call, GError** error);
static void tracker_miner_flickr_insert_photosets (TrackerMinerFlickr* self, RestXmlNode* root_node);
static gchar* tracker_miner_flickr_get_resource (TrackerMinerFlickr* self, const gchar* graph, gchar** types, int types_length1, const gchar* identifier, gboolean* created, GError** error);
static void tracker_miner_flickr_insert_photos (TrackerMinerFlickr* self, RestXmlNode* root_node);
static void tracker_miner_flickr_insert_photo_info (TrackerMinerFlickr* self, RestXmlNode* photo_node, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn);
static void tracker_miner_flickr_insert_exif_data (TrackerMinerFlickr* self, RestXmlNode* photo_node, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn);
void tracker_miner_flickr_update_triple_string (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, const gchar* new_value);
void tracker_miner_flickr_update_triple_object (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, const gchar* new_value);
void tracker_miner_flickr_update_triple_double (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, gdouble new_value);
static gdouble tracker_miner_flickr_ratio_to_double (TrackerMinerFlickr* self, const gchar* ratio);
void tracker_miner_flickr_update_triple_int64 (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, gint64 new_value);
static void tracker_miner_flickr_add_tags (TrackerMinerFlickr* self, const gchar* photo_id, gchar** tags, int tags_length1);
static void tracker_miner_flickr_remove_tag (TrackerMinerFlickr* self, const gchar* tag_id);
static void tracker_miner_flickr_writeback_photo_data_free (gpointer _data);
static void tracker_miner_flickr_writeback_photo (TrackerMinerFlickr* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void tracker_miner_flickr_writeback_photo_finish (TrackerMinerFlickr* self, GAsyncResult* _res_);
static gboolean tracker_miner_flickr_writeback_photo_co (TrackerMinerFlickrWritebackPhotoData* _data_);
static void _g_free0_ (gpointer var);
static void tracker_miner_flickr_writeback_photo_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
static gint tracker_miner_flickr_array_search_str (TrackerMinerFlickr* self, const gchar* needle, gchar** haystack, int haystack_length1);
static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value);
static void tracker_miner_flickr_sign_call (TrackerMinerFlickr* self, RestProxyCall* call);
static GHashTable* tracker_miner_flickr_real_get_association_data (TrackerMinerWeb* base, GError** error);
static void tracker_miner_flickr_real_associate (TrackerMinerWeb* base, GHashTable* association_data, GError** error);
static void tracker_miner_flickr_real_authenticate (TrackerMinerWeb* base, GError** error);
static void tracker_miner_flickr_real_dissociate (TrackerMinerWeb* base, GError** error);
static void __lambda0_ (TrackerMinerFlickr* self, gint key, GArray* value);
static void ___lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self);
static void tracker_miner_flickr_signal_handler (gint signo);
static void tracker_miner_flickr_init_signals (void);
static void _tracker_miner_flickr_signal_handler_sighandler_t (gint signal);
gint tracker_miner_flickr_main (gchar** args, int args_length1);
TrackerMinerFlickr* tracker_miner_flickr_new (void);
TrackerMinerFlickr* tracker_miner_flickr_construct (GType object_type);
static GObject * tracker_miner_flickr_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void tracker_miner_flickr_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


GQuark tracker_rest_call_error_quark (void) {
	return g_quark_from_static_string ("tracker_rest_call_error-quark");
}


static GType tracker_miner_flickr_exif_tag_get_type (void) {
	static volatile gsize tracker_miner_flickr_exif_tag_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_miner_flickr_exif_tag_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MAKE, "TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MAKE", "camera-make"}, {TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MODEL, "TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MODEL", "camera-model"}, {TRACKER_MINER_FLICKR_EXIF_TAG_FLASH, "TRACKER_MINER_FLICKR_EXIF_TAG_FLASH", "flash"}, {TRACKER_MINER_FLICKR_EXIF_TAG_FNUMBER, "TRACKER_MINER_FLICKR_EXIF_TAG_FNUMBER", "fnumber"}, {TRACKER_MINER_FLICKR_EXIF_TAG_FOCAL_LENGTH, "TRACKER_MINER_FLICKR_EXIF_TAG_FOCAL_LENGTH", "focal-length"}, {TRACKER_MINER_FLICKR_EXIF_TAG_ISO_SPEED, "TRACKER_MINER_FLICKR_EXIF_TAG_ISO_SPEED", "iso-speed"}, {TRACKER_MINER_FLICKR_EXIF_TAG_METERING_MODE, "TRACKER_MINER_FLICKR_EXIF_TAG_METERING_MODE", "metering-mode"}, {TRACKER_MINER_FLICKR_EXIF_TAG_WHITE_BALANCE, "TRACKER_MINER_FLICKR_EXIF_TAG_WHITE_BALANCE", "white-balance"}, {0, NULL, NULL}};
		GType tracker_miner_flickr_exif_tag_type_id;
		tracker_miner_flickr_exif_tag_type_id = g_enum_register_static ("TrackerMinerFlickrExifTag", values);
		g_once_init_leave (&tracker_miner_flickr_exif_tag_type_id__volatile, tracker_miner_flickr_exif_tag_type_id);
	}
	return tracker_miner_flickr_exif_tag_type_id__volatile;
}


static GType tracker_miner_flickr_exif_metering_mode_get_type (void) {
	static volatile gsize tracker_miner_flickr_exif_metering_mode_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_miner_flickr_exif_metering_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_MINER_FLICKR_EXIF_METERING_MODE_AVERAGE, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_AVERAGE", "average"}, {TRACKER_MINER_FLICKR_EXIF_METERING_MODE_CENTER_WEIGHTED_AVERAGE, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_CENTER_WEIGHTED_AVERAGE", "center-weighted-average"}, {TRACKER_MINER_FLICKR_EXIF_METERING_MODE_SPOT, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_SPOT", "spot"}, {TRACKER_MINER_FLICKR_EXIF_METERING_MODE_MULTISPOT, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_MULTISPOT", "multispot"}, {TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PATTERN, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PATTERN", "pattern"}, {TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PARTIAL, "TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PARTIAL", "partial"}, {0, NULL, NULL}};
		GType tracker_miner_flickr_exif_metering_mode_type_id;
		tracker_miner_flickr_exif_metering_mode_type_id = g_enum_register_static ("TrackerMinerFlickrExifMeteringMode", values);
		g_once_init_leave (&tracker_miner_flickr_exif_metering_mode_type_id__volatile, tracker_miner_flickr_exif_metering_mode_type_id);
	}
	return tracker_miner_flickr_exif_metering_mode_type_id__volatile;
}


static GType tracker_miner_flickr_exif_white_balance_get_type (void) {
	static volatile gsize tracker_miner_flickr_exif_white_balance_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_miner_flickr_exif_white_balance_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_AUTO, "TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_AUTO", "auto"}, {TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_MANUAL, "TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_MANUAL", "manual"}, {0, NULL, NULL}};
		GType tracker_miner_flickr_exif_white_balance_type_id;
		tracker_miner_flickr_exif_white_balance_type_id = g_enum_register_static ("TrackerMinerFlickrExifWhiteBalance", values);
		g_once_init_leave (&tracker_miner_flickr_exif_white_balance_type_id__volatile, tracker_miner_flickr_exif_white_balance_type_id);
	}
	return tracker_miner_flickr_exif_white_balance_type_id__volatile;
}


static void _tracker_miner_flickr_writeback_tracker_writeback_callback (GHashTable* resources, gpointer self) {
#line 105 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_writeback (self, resources);
#line 426 "tracker-miner-flickr.c"
}


static void _tracker_miner_flickr_association_status_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 110 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_association_status_changed (self, _sender, pspec);
#line 433 "tracker-miner-flickr.c"
}


static gboolean tracker_miner_flickr_real_init (GInitable* base, GCancellable* cancellable, GError** error) {
	TrackerMinerFlickr * self;
	gboolean result = FALSE;
	GCancellable* _tmp0_;
	GError * _inner_error_ = NULL;
#line 100 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) base;
#line 102 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = cancellable;
#line 102 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_g_initable_parent_iface->init ((GInitable*) TRACKER_MINER_WEB (self), _tmp0_, &_inner_error_);
#line 102 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 102 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_propagate_error (error, _inner_error_);
#line 102 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 454 "tracker-miner-flickr.c"
	}
#line 104 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_writeback_init ();
#line 105 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_writeback_connect (_tracker_miner_flickr_writeback_tracker_writeback_callback, self, NULL);
#line 107 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_init_datasource (self);
#line 108 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_load_nmm_photo_id (self);
#line 110 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_signal_connect_object ((GObject*) self, "notify::associated", (GCallback) _tracker_miner_flickr_association_status_changed_g_object_notify, self, 0);
#line 112 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = TRUE;
#line 112 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 470 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_shutdown (TrackerMinerFlickr* self) {
#line 115 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 116 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_writeback_shutdown ();
#line 117 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) self, "status", "Shutting down", NULL);
#line 118 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMinerWeb*) self, "associated", FALSE, NULL);
#line 483 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_init_datasource (TrackerMinerFlickr* self) {
	GError * _inner_error_ = NULL;
#line 121 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 491 "tracker-miner-flickr.c"
	{
		TrackerSparqlConnection* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_;
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp0_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp1_ = g_strdup_printf ("insert { <%s> a nie:DataSource ; nao:identifier \"flickr\" }", TRACKER_MINER_FLICKR_DATASOURCE_URN);
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = _tmp1_;
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_connection_update (_tmp0_, _tmp2_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_tmp2_);
#line 123 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 508 "tracker-miner-flickr.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 125 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = e;
#line 125 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = _tmp3_->message;
#line 125 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:125: Couldn't init datasource: %s", _tmp4_);
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 530 "tracker-miner-flickr.c"
	}
	__finally0:
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 122 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 541 "tracker-miner-flickr.c"
	}
}


static void tracker_miner_flickr_load_nmm_photo_id (TrackerMinerFlickr* self) {
	TrackerSparqlCursor* cursor = NULL;
	gchar* _tmp0_;
	gchar* query;
	GError * _inner_error_ = NULL;
#line 129 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 131 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = g_strdup ("select tracker:id (nmm:Photo) {}");
#line 131 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	query = _tmp0_;
#line 133 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self->priv->nmm_photo_id = -1;
#line 559 "tracker-miner-flickr.c"
	{
		TrackerSparqlConnection* _tmp1_ = NULL;
		const gchar* _tmp2_;
		TrackerSparqlCursor* _tmp3_ = NULL;
		TrackerSparqlCursor* _tmp4_;
		TrackerSparqlCursor* _tmp5_;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_;
		TrackerSparqlCursor* _tmp8_;
		const gchar* _tmp9_ = NULL;
		gint _tmp10_ = 0;
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp1_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = query;
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = tracker_sparql_connection_query (_tmp1_, _tmp2_, NULL, &_inner_error_);
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = _tmp3_;
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 581 "tracker-miner-flickr.c"
			goto __catch1_g_error;
		}
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (cursor);
#line 136 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		cursor = _tmp4_;
#line 138 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = cursor;
#line 138 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = tracker_sparql_cursor_next (_tmp5_, NULL, &_inner_error_);
#line 138 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = _tmp6_;
#line 138 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 596 "tracker-miner-flickr.c"
			goto __catch1_g_error;
		}
#line 138 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_return_if_fail (_tmp7_ == TRUE);
#line 140 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = cursor;
#line 140 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = tracker_sparql_cursor_get_string (_tmp8_, 0, NULL);
#line 140 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = atoi (_tmp9_);
#line 140 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		self->priv->nmm_photo_id = _tmp10_;
#line 609 "tracker-miner-flickr.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp11_;
		const gchar* _tmp12_;
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 142 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = e;
#line 142 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = _tmp11_->message;
#line 142 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("tracker-miner-flickr.vala:142: Could not load ID of class nmm:Photo: %" \
"s", _tmp12_);
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 629 "tracker-miner-flickr.c"
	}
	__finally1:
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (query);
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (cursor);
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 135 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 644 "tracker-miner-flickr.c"
	}
#line 129 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (query);
#line 129 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (cursor);
#line 650 "tracker-miner-flickr.c"
}


static gboolean _tracker_miner_flickr_pull_timeout_cb_gsource_func (gpointer self) {
	gboolean result;
	result = tracker_miner_flickr_pull_timeout_cb (self);
#line 152 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 659 "tracker-miner-flickr.c"
}


static gboolean ___lambda1_ (TrackerMinerFlickr* self) {
	gboolean result = FALSE;
#line 153 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_pull_timeout_cb (self);
#line 153 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = FALSE;
#line 153 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 671 "tracker-miner-flickr.c"
}


static gboolean ____lambda1__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda1_ (self);
#line 153 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 680 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_association_status_changed (TrackerMinerFlickr* self, GObject* source, GParamSpec* pspec) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
#line 146 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 146 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (source != NULL);
#line 146 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (pspec != NULL);
#line 147 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_get ((TrackerMinerWeb*) self, "associated", &_tmp0_, NULL);
#line 147 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = _tmp0_;
#line 147 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp1_) {
#line 699 "tracker-miner-flickr.c"
		guint _tmp2_;
		guint _tmp3_ = 0U;
#line 148 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = self->priv->pull_timeout_handle;
#line 148 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp2_ != ((guint) 0)) {
#line 149 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 708 "tracker-miner-flickr.c"
		}
#line 151 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_message ("tracker-miner-flickr.vala:151: Miner is now associated. Initiating per" \
"iodic pull.");
#line 152 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, TRACKER_MINER_FLICKR_PULL_INTERVAL, _tracker_miner_flickr_pull_timeout_cb_gsource_func, g_object_ref (self), g_object_unref);
#line 152 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		self->priv->pull_timeout_handle = _tmp3_;
#line 153 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda1__gsource_func, g_object_ref (self), g_object_unref);
#line 718 "tracker-miner-flickr.c"
	} else {
		guint _tmp4_;
		guint _tmp5_;
#line 155 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = self->priv->pull_timeout_handle;
#line 155 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp4_ == ((guint) 0)) {
#line 156 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 728 "tracker-miner-flickr.c"
		}
#line 158 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = self->priv->pull_timeout_handle;
#line 158 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_source_remove (_tmp5_);
#line 734 "tracker-miner-flickr.c"
	}
}


static gboolean tracker_miner_flickr_pull_timeout_cb (TrackerMinerFlickr* self) {
	gboolean result = FALSE;
#line 162 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 163 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_init_pull (self, NULL, NULL);
#line 164 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = TRUE;
#line 164 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 749 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_init_pull_data_free (gpointer _data) {
	TrackerMinerFlickrInitPullData* _data_;
	_data_ = _data;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->self);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_slice_free (TrackerMinerFlickrInitPullData, _data_);
#line 760 "tracker-miner-flickr.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return self ? g_object_ref (self) : NULL;
#line 767 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_init_pull (TrackerMinerFlickr* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerMinerFlickrInitPullData* _data_;
	TrackerMinerFlickr* _tmp0_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_ = g_slice_new0 (TrackerMinerFlickrInitPullData);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_miner_flickr_init_pull);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_miner_flickr_init_pull_data_free);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->self = _tmp0_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_init_pull_co (_data_);
#line 786 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_init_pull_finish (TrackerMinerFlickr* self, GAsyncResult* _res_) {
	TrackerMinerFlickrInitPullData* _data_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 794 "tracker-miner-flickr.c"
}


static gboolean _tracker_miner_flickr_init_pull_co_gsource_func (gpointer self) {
	gboolean result;
	result = tracker_miner_flickr_init_pull_co (self);
#line 174 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 803 "tracker-miner-flickr.c"
}


static gboolean tracker_miner_flickr_init_pull_co (TrackerMinerFlickrInitPullData* _data_) {
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	switch (_data_->_state_) {
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case 0:
#line 812 "tracker-miner-flickr.c"
		goto _state_0;
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case 1:
#line 816 "tracker-miner-flickr.c"
		goto _state_1;
		default:
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_assert_not_reached ();
#line 821 "tracker-miner-flickr.c"
	}
	_state_0:
#line 171 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) _data_->self, "status", "Refreshing photo albums", NULL);
#line 172 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) _data_->self, "progress", 0.0, NULL);
#line 174 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tracker_miner_flickr_init_pull_co_gsource_func, _data_, NULL);
#line 175 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_state_ = 1;
#line 175 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return FALSE;
#line 834 "tracker-miner-flickr.c"
	_state_1:
	;
#line 179 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp0_ = _data_->self->priv->rest;
#line 179 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp1_ = NULL;
#line 179 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp1_ = rest_proxy_new_call (_data_->_tmp0_);
#line 179 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->albums_call);
#line 179 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->albums_call = _data_->_tmp1_;
#line 180 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_param (_data_->albums_call, "method", "flickr.photosets.getList");
#line 849 "tracker-miner-flickr.c"
	{
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp2_ = NULL;
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp2_ = tracker_miner_flickr_run_call (_data_->self, _data_->albums_call, &_data_->_inner_error_);
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp3_ = _data_->_tmp2_;
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_inner_error_ != NULL) {
#line 859 "tracker-miner-flickr.c"
			goto __catch2_g_error;
		}
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->photosets_node);
#line 183 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->photosets_node = _data_->_tmp3_;
#line 184 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp4_ = _data_->photosets_node;
#line 184 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_miner_flickr_insert_photosets (_data_->self, _data_->_tmp4_);
#line 870 "tracker-miner-flickr.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->call_error = _data_->_inner_error_;
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_inner_error_ = NULL;
#line 186 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp5_ = _data_->call_error;
#line 186 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp6_ = _data_->_tmp5_->message;
#line 186 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp7_ = NULL;
#line 186 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp7_ = g_strdup_printf ("Could not get photosets list: %s", _data_->_tmp6_);
#line 186 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->error_message = _data_->_tmp7_;
#line 187 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp8_ = _data_->error_message;
#line 187 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) _data_->self, "status", _data_->_tmp8_, NULL);
#line 188 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp9_ = _data_->error_message;
#line 188 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:188: %s", _data_->_tmp9_);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->error_message);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (_data_->call_error);
#line 901 "tracker-miner-flickr.c"
	}
	__finally2:
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_inner_error_ != NULL) {
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->photosets_node);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->albums_call);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_data_->_inner_error_);
#line 182 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 916 "tracker-miner-flickr.c"
	}
#line 191 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) _data_->self, "status", "Idle", NULL);
#line 192 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) _data_->self, "progress", 1.0, NULL);
#line 193 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_message ("tracker-miner-flickr.vala:193: Pull finished");
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (_data_->photosets_node);
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->albums_call);
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_state_ == 0) {
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 932 "tracker-miner-flickr.c"
	} else {
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 936 "tracker-miner-flickr.c"
	}
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_unref (_data_->_async_result);
#line 167 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return FALSE;
#line 942 "tracker-miner-flickr.c"
}


static gpointer _rest_xml_node_ref0 (gpointer self) {
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return self ? rest_xml_node_ref (self) : NULL;
#line 949 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_insert_photosets (TrackerMinerFlickr* self, RestXmlNode* root_node) {
	RestXmlNode* photoset_node = NULL;
	RestXmlNode* title_node = NULL;
	RestXmlNode* photos_node = NULL;
	gchar* photoset_url = NULL;
	gchar* photoset_identifier = NULL;
	gboolean resource_created = FALSE;
	gchar* photoset_urn = NULL;
	gchar* delete_query = NULL;
	RestProxyCall* photos_call = NULL;
	TrackerSparqlBuilder* builder = NULL;
	guint n_photosets = 0U;
	guint indexed_photosets;
	RestXmlNode* _tmp0_;
	RestXmlNode* _tmp1_ = NULL;
	RestXmlNode* _tmp2_;
	RestXmlNode* _tmp3_;
	GHashTable* _tmp4_;
	guint _tmp5_ = 0U;
	GError * _inner_error_ = NULL;
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (root_node != NULL);
#line 208 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	indexed_photosets = (guint) 0;
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = root_node;
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_xml_node_find (_tmp0_, "photoset");
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = _rest_xml_node_ref0 (_tmp1_);
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photoset_node);
#line 210 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	photoset_node = _tmp2_;
#line 211 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = root_node;
#line 211 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = _tmp3_->children;
#line 211 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = g_hash_table_size (_tmp4_);
#line 211 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	n_photosets = _tmp5_;
#line 213 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	while (TRUE) {
#line 999 "tracker-miner-flickr.c"
		RestXmlNode* _tmp6_;
		RestXmlNode* _tmp72_;
		RestXmlNode* _tmp73_;
		RestXmlNode* _tmp74_;
		guint _tmp75_;
		guint _tmp76_;
		guint _tmp77_;
#line 213 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = photoset_node;
#line 213 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (!(_tmp6_ != NULL)) {
#line 213 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			break;
#line 1013 "tracker-miner-flickr.c"
		}
		{
			const gchar* _tmp7_;
			RestXmlNode* _tmp8_;
			const gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			RestXmlNode* _tmp11_;
			const gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			const gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar** _tmp17_ = NULL;
			gchar** _tmp18_;
			gint _tmp18__length1;
			const gchar* _tmp19_;
			gboolean _tmp20_ = FALSE;
			gchar* _tmp21_ = NULL;
			gchar* _tmp22_;
			gchar* _tmp23_;
			const gchar* _tmp24_;
			TrackerSparqlBuilder* _tmp25_;
			TrackerSparqlBuilder* _tmp26_;
			const gchar* _tmp27_;
			TrackerSparqlBuilder* _tmp28_;
			const gchar* _tmp29_;
			gboolean _tmp30_;
			RestXmlNode* _tmp40_;
			RestXmlNode* _tmp41_ = NULL;
			RestXmlNode* _tmp42_;
			RestXmlNode* _tmp43_;
			TrackerSparqlBuilder* _tmp48_;
			TrackerSparqlConnection* _tmp49_ = NULL;
			TrackerSparqlBuilder* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			RestXmlNode* _tmp53_;
			const gchar* _tmp54_;
			gchar* _tmp55_ = NULL;
			gchar* _tmp56_;
			RestProxy* _tmp57_;
			RestProxyCall* _tmp58_ = NULL;
			RestProxyCall* _tmp59_;
			RestXmlNode* _tmp60_;
			const gchar* _tmp61_ = NULL;
			RestProxyCall* _tmp62_;
			RestXmlNode* _tmp63_ = NULL;
			RestXmlNode* _tmp64_;
			RestXmlNode* _tmp65_;
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp7_ = self->priv->user_id;
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp8_ = photoset_node;
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp9_ = rest_xml_node_get_attr (_tmp8_, "id");
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp10_ = g_strdup_printf (TRACKER_MINER_FLICKR_FLICKR_PHOTOSET_URL, _tmp7_, _tmp9_);
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_url);
#line 215 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photoset_url = _tmp10_;
#line 216 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp11_ = photoset_node;
#line 216 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp12_ = rest_xml_node_get_attr (_tmp11_, "id");
#line 216 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp13_ = g_strdup_printf ("flickr:photoset:%s", _tmp12_);
#line 216 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_identifier);
#line 216 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photoset_identifier = _tmp13_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp14_ = photoset_url;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp15_ = g_strdup ("nfo:MediaList");
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp16_ = g_strdup ("nfo:RemoteDataObject");
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp17_ = g_new0 (gchar*, 2 + 1);
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp17_[0] = _tmp15_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp17_[1] = _tmp16_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp18_ = _tmp17_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp18__length1 = 2;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp19_ = photoset_identifier;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp21_ = tracker_miner_flickr_get_resource (self, _tmp14_, _tmp18_, 2, _tmp19_, &_tmp20_, &_inner_error_);
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			resource_created = _tmp20_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp22_ = _tmp21_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp18_ = (_vala_array_free (_tmp18_, _tmp18__length1, (GDestroyNotify) g_free), NULL);
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp23_ = _tmp22_;
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_inner_error_ != NULL) {
#line 1115 "tracker-miner-flickr.c"
				goto __catch3_g_error;
			}
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_urn);
#line 217 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photoset_urn = _tmp23_;
#line 222 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp24_ = photoset_url;
#line 222 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_message ("tracker-miner-flickr.vala:222: Getting photos for album %s", _tmp24_);
#line 224 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp25_ = tracker_sparql_builder_new_update ();
#line 224 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (builder);
#line 224 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			builder = _tmp25_;
#line 225 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp26_ = builder;
#line 225 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp27_ = photoset_url;
#line 225 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_insert_open (_tmp26_, _tmp27_);
#line 226 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp28_ = builder;
#line 226 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp29_ = photoset_urn;
#line 226 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_subject_iri (_tmp28_, _tmp29_);
#line 228 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_ = resource_created;
#line 228 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (!_tmp30_) {
#line 1148 "tracker-miner-flickr.c"
				const gchar* _tmp31_;
				gchar* _tmp32_ = NULL;
				TrackerSparqlConnection* _tmp33_ = NULL;
				const gchar* _tmp34_;
#line 229 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp31_ = photoset_urn;
#line 229 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp32_ = g_strdup_printf ("delete { <%1$s> nie:title ?title }" "where  { <%1$s> nie:title ?title }", _tmp31_);
#line 229 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (delete_query);
#line 229 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				delete_query = _tmp32_;
#line 232 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp33_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 232 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp34_ = delete_query;
#line 232 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_connection_update (_tmp33_, _tmp34_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 232 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (_inner_error_ != NULL) {
#line 1169 "tracker-miner-flickr.c"
					goto __catch3_g_error;
				}
			} else {
				TrackerSparqlBuilder* _tmp35_;
				TrackerSparqlBuilder* _tmp36_;
				TrackerSparqlBuilder* _tmp37_;
				TrackerSparqlBuilder* _tmp38_;
				const gchar* _tmp39_;
#line 234 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp35_ = builder;
#line 234 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_predicate (_tmp35_, "nie:dataSource");
#line 235 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp36_ = builder;
#line 235 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_object_iri (_tmp36_, TRACKER_MINER_FLICKR_DATASOURCE_URN);
#line 236 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp37_ = builder;
#line 236 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_predicate (_tmp37_, "nie:url");
#line 237 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp38_ = builder;
#line 237 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp39_ = photoset_url;
#line 237 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_object_string (_tmp38_, _tmp39_);
#line 1196 "tracker-miner-flickr.c"
			}
#line 240 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp40_ = photoset_node;
#line 240 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp41_ = rest_xml_node_find (_tmp40_, "title");
#line 240 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp42_ = _rest_xml_node_ref0 (_tmp41_);
#line 240 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (title_node);
#line 240 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			title_node = _tmp42_;
#line 241 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp43_ = title_node;
#line 241 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_tmp43_ != NULL) {
#line 1212 "tracker-miner-flickr.c"
				TrackerSparqlBuilder* _tmp44_;
				TrackerSparqlBuilder* _tmp45_;
				RestXmlNode* _tmp46_;
				const gchar* _tmp47_;
#line 242 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp44_ = builder;
#line 242 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_predicate (_tmp44_, "nie:title");
#line 243 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp45_ = builder;
#line 243 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp46_ = title_node;
#line 243 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp47_ = _tmp46_->content;
#line 243 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_object_string (_tmp45_, _tmp47_);
#line 1229 "tracker-miner-flickr.c"
			}
#line 246 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp48_ = builder;
#line 246 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_insert_close (_tmp48_);
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp49_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp50_ = builder;
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp51_ = tracker_sparql_builder_get_result (_tmp50_);
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp52_ = _tmp51_;
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_connection_update (_tmp49_, _tmp52_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 248 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_inner_error_ != NULL) {
#line 1247 "tracker-miner-flickr.c"
				goto __catch3_g_error;
			}
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp53_ = title_node;
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp54_ = _tmp53_->content;
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp55_ = g_strdup_printf ("Refresing album \"%s\"", _tmp54_);
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp56_ = _tmp55_;
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_object_set ((TrackerMiner*) self, "status", _tmp56_, NULL);
#line 250 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (_tmp56_);
#line 252 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp57_ = self->priv->rest;
#line 252 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp58_ = rest_proxy_new_call (_tmp57_);
#line 252 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (photos_call);
#line 252 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photos_call = _tmp58_;
#line 253 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp59_ = photos_call;
#line 253 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp60_ = photoset_node;
#line 253 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp61_ = rest_xml_node_get_attr (_tmp60_, "id");
#line 253 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			rest_proxy_call_add_params (_tmp59_, "method", "flickr.photosets.getPhotos", "photoset_id", _tmp61_, "media", "photos", "extras", "original_format", NULL);
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp62_ = photos_call;
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp63_ = tracker_miner_flickr_run_call (self, _tmp62_, &_inner_error_);
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp64_ = _tmp63_;
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_inner_error_ != NULL) {
#line 1286 "tracker-miner-flickr.c"
				goto __catch3_g_error;
			}
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (photos_node);
#line 257 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photos_node = _tmp64_;
#line 258 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp65_ = photos_node;
#line 258 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_miner_flickr_insert_photos (self, _tmp65_);
#line 1297 "tracker-miner-flickr.c"
		}
		goto __finally3;
		__catch3_g_error:
		{
			GError* err = NULL;
			const gchar* _tmp66_;
			GError* _tmp67_;
			const gchar* _tmp68_;
			gchar* _tmp69_ = NULL;
			gchar* error_message;
			const gchar* _tmp70_;
			const gchar* _tmp71_;
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			err = _inner_error_;
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_inner_error_ = NULL;
#line 260 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp66_ = photoset_url;
#line 260 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp67_ = err;
#line 260 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp68_ = _tmp67_->message;
#line 260 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp69_ = g_strdup_printf ("Could not list photos for photoset %s: %s", _tmp66_, _tmp68_);
#line 260 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			error_message = _tmp69_;
#line 261 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp70_ = error_message;
#line 261 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_object_set ((TrackerMiner*) self, "status", _tmp70_, NULL);
#line 262 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp71_ = error_message;
#line 262 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_warning ("tracker-miner-flickr.vala:262: %s", _tmp71_);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (error_message);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_error_free0 (err);
#line 1336 "tracker-miner-flickr.c"
		}
		__finally3:
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (builder);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (photos_call);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (delete_query);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_urn);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_identifier);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_url);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (photos_node);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (title_node);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (photoset_node);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 214 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 1365 "tracker-miner-flickr.c"
		}
#line 264 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp72_ = photoset_node;
#line 264 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp73_ = _tmp72_->next;
#line 264 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp74_ = _rest_xml_node_ref0 (_tmp73_);
#line 264 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (photoset_node);
#line 264 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		photoset_node = _tmp74_;
#line 266 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp75_ = indexed_photosets;
#line 266 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		indexed_photosets = _tmp75_ + 1;
#line 267 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp76_ = indexed_photosets;
#line 267 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp77_ = n_photosets;
#line 267 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) self, "progress", ((gdouble) _tmp76_) / _tmp77_, NULL);
#line 1387 "tracker-miner-flickr.c"
	}
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (builder);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (photos_call);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (delete_query);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photoset_urn);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photoset_identifier);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photoset_url);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photos_node);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (title_node);
#line 196 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photoset_node);
#line 1407 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_insert_photos (TrackerMinerFlickr* self, RestXmlNode* root_node) {
	RestXmlNode* photoset_node = NULL;
	gchar* photoset_url = NULL;
	RestXmlNode* photo_node = NULL;
	gchar* photo_url = NULL;
	gchar* photo_urn = NULL;
	gboolean resource_created = FALSE;
	TrackerSparqlBuilder* builder = NULL;
	RestXmlNode* _tmp0_;
	RestXmlNode* _tmp1_ = NULL;
	RestXmlNode* _tmp2_;
	gboolean _tmp3_ = FALSE;
	RestXmlNode* _tmp4_;
	gboolean _tmp7_;
	const gchar* _tmp8_;
	RestXmlNode* _tmp9_;
	const gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	const gchar* _tmp12_;
	RestXmlNode* _tmp13_;
	RestXmlNode* _tmp14_ = NULL;
	RestXmlNode* _tmp15_;
	GError * _inner_error_ = NULL;
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (root_node != NULL);
#line 280 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = root_node;
#line 280 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_xml_node_find (_tmp0_, "photoset");
#line 280 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = _rest_xml_node_ref0 (_tmp1_);
#line 280 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photoset_node);
#line 280 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	photoset_node = _tmp2_;
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = photoset_node;
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp4_ == NULL) {
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = TRUE;
#line 1454 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp5_;
		const gchar* _tmp6_ = NULL;
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = photoset_node;
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = rest_xml_node_get_attr (_tmp5_, "id");
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = _tmp6_ == NULL;
#line 1464 "tracker-miner-flickr.c"
	}
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = _tmp3_;
#line 281 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp7_) {
#line 282 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:282: Malformed response for flickr.photosets" \
".getPhotos");
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (builder);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (photo_urn);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (photo_url);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (photo_node);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (photoset_url);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (photoset_node);
#line 283 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 1486 "tracker-miner-flickr.c"
	}
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = self->priv->user_id;
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = photoset_node;
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = rest_xml_node_get_attr (_tmp9_, "id");
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = g_strdup_printf (TRACKER_MINER_FLICKR_FLICKR_PHOTOSET_URL, _tmp8_, _tmp10_);
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photoset_url);
#line 286 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	photoset_url = _tmp11_;
#line 287 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = photoset_url;
#line 287 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_message ("tracker-miner-flickr.vala:287: Indexing photoset %s", _tmp12_);
#line 289 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = root_node;
#line 289 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = rest_xml_node_find (_tmp13_, "photo");
#line 289 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = _rest_xml_node_ref0 (_tmp14_);
#line 289 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photo_node);
#line 289 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	photo_node = _tmp15_;
#line 291 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	while (TRUE) {
#line 1516 "tracker-miner-flickr.c"
		RestXmlNode* _tmp16_;
		RestXmlNode* _tmp67_;
		RestXmlNode* _tmp68_;
		RestXmlNode* _tmp69_;
#line 291 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp16_ = photo_node;
#line 291 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (!(_tmp16_ != NULL)) {
#line 291 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			break;
#line 1527 "tracker-miner-flickr.c"
		}
		{
			RestXmlNode* _tmp17_;
			const gchar* _tmp18_ = NULL;
			RestXmlNode* _tmp19_;
			const gchar* _tmp20_ = NULL;
			RestXmlNode* _tmp21_;
			const gchar* _tmp22_ = NULL;
			RestXmlNode* _tmp23_;
			const gchar* _tmp24_ = NULL;
			gchar* _tmp25_ = NULL;
			const gchar* _tmp26_;
			gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gchar** _tmp30_ = NULL;
			gchar** _tmp31_;
			gint _tmp31__length1;
			RestXmlNode* _tmp32_;
			const gchar* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
			gchar* _tmp35_;
			gboolean _tmp36_ = FALSE;
			gchar* _tmp37_ = NULL;
			gchar* _tmp38_;
			gchar* _tmp39_;
			TrackerSparqlBuilder* _tmp40_;
			gboolean _tmp41_;
			RestXmlNode* _tmp52_;
			TrackerSparqlBuilder* _tmp53_;
			const gchar* _tmp54_;
			const gchar* _tmp55_;
			RestXmlNode* _tmp56_;
			TrackerSparqlBuilder* _tmp57_;
			const gchar* _tmp58_;
			const gchar* _tmp59_;
			TrackerSparqlConnection* _tmp60_ = NULL;
			TrackerSparqlBuilder* _tmp61_;
			const gchar* _tmp62_;
			const gchar* _tmp63_;
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp17_ = photo_node;
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp18_ = rest_xml_node_get_attr (_tmp17_, "farm");
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp19_ = photo_node;
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp20_ = rest_xml_node_get_attr (_tmp19_, "server");
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp21_ = photo_node;
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp22_ = rest_xml_node_get_attr (_tmp21_, "id");
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp23_ = photo_node;
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp24_ = rest_xml_node_get_attr (_tmp23_, "secret");
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp25_ = g_strdup_printf (TRACKER_MINER_FLICKR_FLICKR_PHOTO_URL, _tmp18_, _tmp20_, _tmp22_, _tmp24_);
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photo_url);
#line 293 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photo_url = _tmp25_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp26_ = photo_url;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp27_ = g_strdup ("nmm:Photo");
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp28_ = g_strdup ("nfo:RemoteDataObject");
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp29_ = g_strdup ("nfo:MediaFileListEntry");
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_ = g_new0 (gchar*, 3 + 1);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_[0] = _tmp27_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_[1] = _tmp28_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_[2] = _tmp29_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp31_ = _tmp30_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp31__length1 = 3;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp32_ = photo_node;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp33_ = rest_xml_node_get_attr (_tmp32_, "id");
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp34_ = g_strdup_printf ("flickr:photo:%s", _tmp33_);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp35_ = _tmp34_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp37_ = tracker_miner_flickr_get_resource (self, _tmp26_, _tmp31_, 3, _tmp35_, &_tmp36_, &_inner_error_);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			resource_created = _tmp36_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp38_ = _tmp37_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (_tmp35_);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp39_ = _tmp38_;
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_inner_error_ != NULL) {
#line 1632 "tracker-miner-flickr.c"
				goto __catch4_g_error;
			}
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photo_urn);
#line 297 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			photo_urn = _tmp39_;
#line 302 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp40_ = tracker_sparql_builder_new_update ();
#line 302 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (builder);
#line 302 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			builder = _tmp40_;
#line 304 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp41_ = resource_created;
#line 304 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_tmp41_) {
#line 1649 "tracker-miner-flickr.c"
				TrackerSparqlBuilder* _tmp42_;
				const gchar* _tmp43_;
				TrackerSparqlBuilder* _tmp44_;
				const gchar* _tmp45_;
				TrackerSparqlBuilder* _tmp46_;
				TrackerSparqlBuilder* _tmp47_;
				TrackerSparqlBuilder* _tmp48_;
				TrackerSparqlBuilder* _tmp49_;
				const gchar* _tmp50_;
				TrackerSparqlBuilder* _tmp51_;
#line 305 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp42_ = builder;
#line 305 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp43_ = photo_url;
#line 305 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_insert_open (_tmp42_, _tmp43_);
#line 306 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp44_ = builder;
#line 306 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp45_ = photo_urn;
#line 306 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_subject_iri (_tmp44_, _tmp45_);
#line 307 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp46_ = builder;
#line 307 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_predicate (_tmp46_, "nie:dataSource");
#line 308 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp47_ = builder;
#line 308 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_object_iri (_tmp47_, TRACKER_MINER_FLICKR_DATASOURCE_URN);
#line 309 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp48_ = builder;
#line 309 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_predicate (_tmp48_, "nie:url");
#line 310 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp49_ = builder;
#line 310 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp50_ = photo_url;
#line 310 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_object_string (_tmp49_, _tmp50_);
#line 311 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp51_ = builder;
#line 311 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_sparql_builder_insert_close (_tmp51_);
#line 1694 "tracker-miner-flickr.c"
			}
#line 314 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp52_ = photo_node;
#line 314 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp53_ = builder;
#line 314 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp54_ = photo_url;
#line 314 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp55_ = photo_urn;
#line 314 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_miner_flickr_insert_photo_info (self, _tmp52_, _tmp53_, _tmp54_, _tmp55_);
#line 315 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp56_ = photo_node;
#line 315 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp57_ = builder;
#line 315 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp58_ = photo_url;
#line 315 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp59_ = photo_urn;
#line 315 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_miner_flickr_insert_exif_data (self, _tmp56_, _tmp57_, _tmp58_, _tmp59_);
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp60_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp61_ = builder;
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp62_ = tracker_sparql_builder_get_result (_tmp61_);
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp63_ = _tmp62_;
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_connection_update (_tmp60_, _tmp63_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 317 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_inner_error_ != NULL) {
#line 1728 "tracker-miner-flickr.c"
				goto __catch4_g_error;
			}
		}
		goto __finally4;
		__catch4_g_error:
		{
			GError* err = NULL;
			const gchar* _tmp64_;
			GError* _tmp65_;
			const gchar* _tmp66_;
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			err = _inner_error_;
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_inner_error_ = NULL;
#line 319 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp64_ = photo_url;
#line 319 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp65_ = err;
#line 319 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp66_ = _tmp65_->message;
#line 319 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_warning ("tracker-miner-flickr.vala:319: Couldn't insert photo %s: %s", _tmp64_, _tmp66_);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_error_free0 (err);
#line 1753 "tracker-miner-flickr.c"
		}
		__finally4:
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (builder);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photo_urn);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photo_url);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (photo_node);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (photoset_url);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (photoset_node);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 292 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 1776 "tracker-miner-flickr.c"
		}
#line 322 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp67_ = photo_node;
#line 322 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp68_ = _tmp67_->next;
#line 322 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp69_ = _rest_xml_node_ref0 (_tmp68_);
#line 322 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (photo_node);
#line 322 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		photo_node = _tmp69_;
#line 1788 "tracker-miner-flickr.c"
	}
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (builder);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photo_urn);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photo_url);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photo_node);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (photoset_url);
#line 271 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (photoset_node);
#line 1802 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_insert_photo_info (TrackerMinerFlickr* self, RestXmlNode* photo_node, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn) {
	RestProxy* _tmp0_;
	RestProxyCall* _tmp1_ = NULL;
	RestProxyCall* info_call;
	RestXmlNode* root_node = NULL;
	RestXmlNode* title_node = NULL;
	RestXmlNode* description_node = NULL;
	RestXmlNode* tag_node = NULL;
	RestProxyCall* _tmp2_;
	RestXmlNode* _tmp3_;
	const gchar* _tmp4_ = NULL;
	RestXmlNode* _tmp15_;
	RestXmlNode* _tmp16_ = NULL;
	RestXmlNode* _tmp17_;
	gboolean _tmp18_ = FALSE;
	RestXmlNode* _tmp19_;
	gboolean _tmp22_;
	RestXmlNode* _tmp28_;
	RestXmlNode* _tmp29_ = NULL;
	RestXmlNode* _tmp30_;
	gboolean _tmp31_ = FALSE;
	RestXmlNode* _tmp32_;
	gboolean _tmp35_;
	RestXmlNode* _tmp41_;
	RestXmlNode* _tmp42_ = NULL;
	RestXmlNode* _tmp43_ = NULL;
	RestXmlNode* _tmp44_;
	RestXmlNode* _tmp45_;
	GError * _inner_error_ = NULL;
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (photo_node != NULL);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 327 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = self->priv->rest;
#line 327 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_proxy_new_call (_tmp0_);
#line 327 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	info_call = _tmp1_;
#line 333 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = info_call;
#line 333 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = photo_node;
#line 333 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = rest_xml_node_get_attr (_tmp3_, "id");
#line 333 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_tmp2_, "method", "flickr.photos.getInfo", "photo_id", _tmp4_, NULL);
#line 1859 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp5_;
		RestXmlNode* _tmp6_ = NULL;
		RestXmlNode* _tmp7_;
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = info_call;
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = tracker_miner_flickr_run_call (self, _tmp5_, &_inner_error_);
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = _tmp6_;
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 1872 "tracker-miner-flickr.c"
			goto __catch5_g_error;
		}
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 337 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		root_node = _tmp7_;
#line 1879 "tracker-miner-flickr.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* call_error = NULL;
		RestXmlNode* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_ = NULL;
		gchar* error_message;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = photo_node;
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = rest_xml_node_get_attr (_tmp8_, "id");
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = call_error;
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = _tmp10_->message;
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = g_strdup_printf ("Couldn't get info for photo %s: %s", _tmp9_, _tmp11_);
#line 339 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		error_message = _tmp12_;
#line 340 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp13_ = error_message;
#line 340 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) self, "status", _tmp13_, NULL);
#line 341 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp14_ = error_message;
#line 341 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:341: %s", _tmp14_);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (error_message);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (tag_node);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (description_node);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (title_node);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (info_call);
#line 342 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 1933 "tracker-miner-flickr.c"
	}
	__finally5:
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (tag_node);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (description_node);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (title_node);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (info_call);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 336 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 1954 "tracker-miner-flickr.c"
	}
#line 345 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = root_node;
#line 345 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = rest_xml_node_find (_tmp15_, "title");
#line 345 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = _rest_xml_node_ref0 (_tmp16_);
#line 345 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (title_node);
#line 345 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	title_node = _tmp17_;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp19_ = title_node;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp19_ != NULL) {
#line 1970 "tracker-miner-flickr.c"
		RestXmlNode* _tmp20_;
		const gchar* _tmp21_;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp20_ = title_node;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = _tmp20_->content;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = _tmp21_ != NULL;
#line 1979 "tracker-miner-flickr.c"
	} else {
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = FALSE;
#line 1983 "tracker-miner-flickr.c"
	}
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp22_ = _tmp18_;
#line 346 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp22_) {
#line 1989 "tracker-miner-flickr.c"
		TrackerSparqlBuilder* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		RestXmlNode* _tmp26_;
		const gchar* _tmp27_;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp23_ = builder;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp24_ = graph;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp25_ = urn;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp26_ = title_node;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp27_ = _tmp26_->content;
#line 347 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_miner_flickr_update_triple_string (self, _tmp23_, _tmp24_, _tmp25_, "nie:title", _tmp27_);
#line 2007 "tracker-miner-flickr.c"
	}
#line 350 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp28_ = root_node;
#line 350 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp29_ = rest_xml_node_find (_tmp28_, "description");
#line 350 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp30_ = _rest_xml_node_ref0 (_tmp29_);
#line 350 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (description_node);
#line 350 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	description_node = _tmp30_;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp32_ = description_node;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp32_ != NULL) {
#line 2023 "tracker-miner-flickr.c"
		RestXmlNode* _tmp33_;
		const gchar* _tmp34_;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp33_ = description_node;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp34_ = _tmp33_->content;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp31_ = _tmp34_ != NULL;
#line 2032 "tracker-miner-flickr.c"
	} else {
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp31_ = FALSE;
#line 2036 "tracker-miner-flickr.c"
	}
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp35_ = _tmp31_;
#line 351 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp35_) {
#line 2042 "tracker-miner-flickr.c"
		TrackerSparqlBuilder* _tmp36_;
		const gchar* _tmp37_;
		const gchar* _tmp38_;
		RestXmlNode* _tmp39_;
		const gchar* _tmp40_;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp36_ = builder;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp37_ = graph;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp38_ = urn;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp39_ = description_node;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp40_ = _tmp39_->content;
#line 352 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_miner_flickr_update_triple_string (self, _tmp36_, _tmp37_, _tmp38_, "nie:comment", _tmp40_);
#line 2060 "tracker-miner-flickr.c"
	}
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp41_ = root_node;
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp42_ = rest_xml_node_find (_tmp41_, "tags");
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp43_ = rest_xml_node_find (_tmp42_, "tag");
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp44_ = _rest_xml_node_ref0 (_tmp43_);
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (tag_node);
#line 355 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tag_node = _tmp44_;
#line 357 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp45_ = tag_node;
#line 357 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp45_ != NULL) {
#line 2078 "tracker-miner-flickr.c"
		TrackerSparqlBuilder* _tmp46_;
		const gchar* _tmp47_;
		TrackerSparqlBuilder* _tmp48_;
		const gchar* _tmp49_;
		TrackerSparqlBuilder* _tmp63_;
#line 358 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp46_ = builder;
#line 358 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp47_ = graph;
#line 358 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_insert_open (_tmp46_, _tmp47_);
#line 359 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp48_ = builder;
#line 359 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp49_ = urn;
#line 359 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_subject_iri (_tmp48_, _tmp49_);
#line 361 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		while (TRUE) {
#line 2098 "tracker-miner-flickr.c"
			RestXmlNode* _tmp50_;
			TrackerSparqlBuilder* _tmp51_;
			TrackerSparqlBuilder* _tmp52_;
			TrackerSparqlBuilder* _tmp53_;
			TrackerSparqlBuilder* _tmp54_;
			TrackerSparqlBuilder* _tmp55_;
			TrackerSparqlBuilder* _tmp56_;
			RestXmlNode* _tmp57_;
			const gchar* _tmp58_ = NULL;
			TrackerSparqlBuilder* _tmp59_;
			RestXmlNode* _tmp60_;
			RestXmlNode* _tmp61_;
			RestXmlNode* _tmp62_;
#line 361 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp50_ = tag_node;
#line 361 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (!(_tmp50_ != NULL)) {
#line 361 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2118 "tracker-miner-flickr.c"
			}
#line 362 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp51_ = builder;
#line 362 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_predicate (_tmp51_, "nao:hasTag");
#line 364 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp52_ = builder;
#line 364 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object_blank_open (_tmp52_);
#line 365 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp53_ = builder;
#line 365 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_predicate (_tmp53_, "a");
#line 366 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp54_ = builder;
#line 366 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object (_tmp54_, "nao:Tag");
#line 367 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp55_ = builder;
#line 367 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_predicate (_tmp55_, "nao:prefLabel");
#line 368 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp56_ = builder;
#line 368 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp57_ = tag_node;
#line 368 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp58_ = rest_xml_node_get_attr (_tmp57_, "raw");
#line 368 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object_string (_tmp56_, _tmp58_);
#line 369 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp59_ = builder;
#line 369 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object_blank_close (_tmp59_);
#line 371 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp60_ = tag_node;
#line 371 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp61_ = _tmp60_->next;
#line 371 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp62_ = _rest_xml_node_ref0 (_tmp61_);
#line 371 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (tag_node);
#line 371 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tag_node = _tmp62_;
#line 2162 "tracker-miner-flickr.c"
		}
#line 374 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp63_ = builder;
#line 374 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_insert_close (_tmp63_);
#line 2168 "tracker-miner-flickr.c"
	}
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (tag_node);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (description_node);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (title_node);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 326 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (info_call);
#line 2180 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_insert_exif_data (TrackerMinerFlickr* self, RestXmlNode* photo_node, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn) {
	RestProxy* _tmp0_;
	RestProxyCall* _tmp1_ = NULL;
	RestProxyCall* exif_call;
	RestXmlNode* root_node = NULL;
	RestXmlNode* exif_node = NULL;
	gchar* exif_value = NULL;
	gchar* make;
	gchar* model;
	RestProxyCall* _tmp2_;
	RestXmlNode* _tmp3_;
	const gchar* _tmp4_ = NULL;
	RestXmlNode* _tmp15_;
	RestXmlNode* _tmp16_ = NULL;
	RestXmlNode* _tmp17_;
	gboolean _tmp86_ = FALSE;
	const gchar* _tmp87_;
	gboolean _tmp89_;
	GError * _inner_error_ = NULL;
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (photo_node != NULL);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 379 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = self->priv->rest;
#line 379 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_proxy_new_call (_tmp0_);
#line 379 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	exif_call = _tmp1_;
#line 383 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	make = NULL;
#line 383 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	model = NULL;
#line 385 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = exif_call;
#line 385 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = photo_node;
#line 385 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = rest_xml_node_get_attr (_tmp3_, "id");
#line 385 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_tmp2_, "method", "flickr.photos.getExif", "photo_id", _tmp4_, NULL);
#line 2231 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp5_;
		RestXmlNode* _tmp6_ = NULL;
		RestXmlNode* _tmp7_;
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = exif_call;
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = tracker_miner_flickr_run_call (self, _tmp5_, &_inner_error_);
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = _tmp6_;
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 2244 "tracker-miner-flickr.c"
			goto __catch6_g_error;
		}
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 389 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		root_node = _tmp7_;
#line 2251 "tracker-miner-flickr.c"
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* call_error = NULL;
		RestXmlNode* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_ = NULL;
		gchar* error_message;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = photo_node;
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = rest_xml_node_get_attr (_tmp8_, "id");
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = call_error;
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = _tmp10_->message;
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = g_strdup_printf ("Couldn't get EXIF data for photo %s: %s", _tmp9_, _tmp11_);
#line 391 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		error_message = _tmp12_;
#line 392 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp13_ = error_message;
#line 392 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) self, "status", _tmp13_, NULL);
#line 393 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp14_ = error_message;
#line 393 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:393: %s", _tmp14_);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (error_message);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (model);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (make);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (exif_value);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (exif_node);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (exif_call);
#line 394 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 2307 "tracker-miner-flickr.c"
	}
	__finally6:
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (model);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (make);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (exif_value);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (exif_node);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (exif_call);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 388 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 2330 "tracker-miner-flickr.c"
	}
#line 397 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = root_node;
#line 397 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = rest_xml_node_find (_tmp15_, "exif");
#line 397 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = _rest_xml_node_ref0 (_tmp16_);
#line 397 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (exif_node);
#line 397 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	exif_node = _tmp17_;
#line 399 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	while (TRUE) {
#line 2344 "tracker-miner-flickr.c"
		RestXmlNode* _tmp18_;
		RestXmlNode* _tmp19_;
		RestXmlNode* _tmp20_ = NULL;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		RestXmlNode* _tmp23_;
		const gchar* _tmp24_ = NULL;
		gint _tmp25_ = 0;
		RestXmlNode* _tmp83_;
		RestXmlNode* _tmp84_;
		RestXmlNode* _tmp85_;
#line 399 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = exif_node;
#line 399 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (!(_tmp18_ != NULL)) {
#line 399 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			break;
#line 2362 "tracker-miner-flickr.c"
		}
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp19_ = exif_node;
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp20_ = rest_xml_node_find (_tmp19_, "raw");
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = _tmp20_->content;
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp22_ = g_strdup (_tmp21_);
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (exif_value);
#line 400 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		exif_value = _tmp22_;
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp23_ = exif_node;
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp24_ = rest_xml_node_get_attr (_tmp23_, "tag");
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp25_ = atoi (_tmp24_);
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		switch (_tmp25_) {
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MAKE:
#line 2386 "tracker-miner-flickr.c"
			{
				const gchar* _tmp26_;
				gchar* _tmp27_;
#line 404 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp26_ = exif_value;
#line 404 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp27_ = g_strdup (_tmp26_);
#line 404 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (make);
#line 404 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				make = _tmp27_;
#line 405 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2400 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_CAMERA_MODEL:
#line 2404 "tracker-miner-flickr.c"
			{
				const gchar* _tmp28_;
				gchar* _tmp29_;
#line 407 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp28_ = exif_value;
#line 407 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp29_ = g_strdup (_tmp28_);
#line 407 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (model);
#line 407 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				model = _tmp29_;
#line 408 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2418 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_FLASH:
#line 2422 "tracker-miner-flickr.c"
			{
				const gchar* _tmp30_ = NULL;
				const gchar* _tmp31_;
				gint _tmp32_ = 0;
				TrackerSparqlBuilder* _tmp33_;
				const gchar* _tmp34_;
				const gchar* _tmp35_;
				const gchar* _tmp36_;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp31_ = exif_value;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp32_ = atoi (_tmp31_);
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if ((_tmp32_ % 2) == 1) {
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp30_ = "nmm:flash-on";
#line 2439 "tracker-miner-flickr.c"
				} else {
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp30_ = "nmm:flash-off";
#line 2443 "tracker-miner-flickr.c"
				}
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp33_ = builder;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp34_ = graph;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp35_ = urn;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp36_ = _tmp30_;
#line 410 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_miner_flickr_update_triple_object (self, _tmp33_, _tmp34_, _tmp35_, "nmm:flash", _tmp36_);
#line 411 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2457 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_FNUMBER:
#line 2461 "tracker-miner-flickr.c"
			{
				TrackerSparqlBuilder* _tmp37_;
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				gdouble _tmp41_ = 0.0;
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp37_ = builder;
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp38_ = graph;
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp39_ = urn;
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp40_ = exif_value;
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp41_ = tracker_miner_flickr_ratio_to_double (self, _tmp40_);
#line 413 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_miner_flickr_update_triple_double (self, _tmp37_, _tmp38_, _tmp39_, "nmm:fnumber", _tmp41_);
#line 414 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2482 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_FOCAL_LENGTH:
#line 2486 "tracker-miner-flickr.c"
			{
				TrackerSparqlBuilder* _tmp42_;
				const gchar* _tmp43_;
				const gchar* _tmp44_;
				const gchar* _tmp45_;
				gdouble _tmp46_ = 0.0;
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp42_ = builder;
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp43_ = graph;
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp44_ = urn;
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp45_ = exif_value;
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp46_ = tracker_miner_flickr_ratio_to_double (self, _tmp45_);
#line 416 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_miner_flickr_update_triple_double (self, _tmp42_, _tmp43_, _tmp44_, "nmm:focalLength", _tmp46_);
#line 417 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2507 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_ISO_SPEED:
#line 2511 "tracker-miner-flickr.c"
			{
				TrackerSparqlBuilder* _tmp47_;
				const gchar* _tmp48_;
				const gchar* _tmp49_;
				const gchar* _tmp50_;
				gint _tmp51_ = 0;
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp47_ = builder;
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp48_ = graph;
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp49_ = urn;
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp50_ = exif_value;
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp51_ = atoi (_tmp50_);
#line 419 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_miner_flickr_update_triple_int64 (self, _tmp47_, _tmp48_, _tmp49_, "nmm:isoSpeed", (gint64) _tmp51_);
#line 420 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2532 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_METERING_MODE:
#line 2536 "tracker-miner-flickr.c"
			{
				const gchar* _tmp52_;
				gint _tmp53_ = 0;
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp52_ = exif_value;
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp53_ = atoi (_tmp52_);
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				switch (_tmp53_) {
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_AVERAGE:
#line 2548 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp54_;
						const gchar* _tmp55_;
						const gchar* _tmp56_;
#line 424 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp54_ = builder;
#line 424 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp55_ = graph;
#line 424 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp56_ = urn;
#line 424 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp54_, _tmp55_, _tmp56_, "nmm:meteringMode", "nmm:meteringMode-average");
#line 425 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2563 "tracker-miner-flickr.c"
					}
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_CENTER_WEIGHTED_AVERAGE:
#line 2567 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp57_;
						const gchar* _tmp58_;
						const gchar* _tmp59_;
#line 427 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp57_ = builder;
#line 427 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp58_ = graph;
#line 427 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp59_ = urn;
#line 427 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp57_, _tmp58_, _tmp59_, "nmm:meteringMode", "nmm:meteringMode-center-weighted-average");
#line 428 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2582 "tracker-miner-flickr.c"
					}
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_SPOT:
#line 2586 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp60_;
						const gchar* _tmp61_;
						const gchar* _tmp62_;
#line 430 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp60_ = builder;
#line 430 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp61_ = graph;
#line 430 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp62_ = urn;
#line 430 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp60_, _tmp61_, _tmp62_, "nmm:meteringMode", "nmm:meteringMode-spot");
#line 431 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2601 "tracker-miner-flickr.c"
					}
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_MULTISPOT:
#line 2605 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp63_;
						const gchar* _tmp64_;
						const gchar* _tmp65_;
#line 433 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp63_ = builder;
#line 433 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp64_ = graph;
#line 433 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp65_ = urn;
#line 433 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp63_, _tmp64_, _tmp65_, "nmm:meteringMode", "nmm:meteringMode-multispot");
#line 434 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2620 "tracker-miner-flickr.c"
					}
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PATTERN:
#line 2624 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp66_;
						const gchar* _tmp67_;
						const gchar* _tmp68_;
#line 436 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp66_ = builder;
#line 436 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp67_ = graph;
#line 436 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp68_ = urn;
#line 436 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp66_, _tmp67_, _tmp68_, "nmm:meteringMode", "nmm:meteringMode-pattern");
#line 437 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2639 "tracker-miner-flickr.c"
					}
#line 422 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_METERING_MODE_PARTIAL:
#line 2643 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp69_;
						const gchar* _tmp70_;
						const gchar* _tmp71_;
#line 439 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp69_ = builder;
#line 439 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp70_ = graph;
#line 439 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp71_ = urn;
#line 439 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp69_, _tmp70_, _tmp71_, "nmm:meteringMode", "nmm:meteringMode-partial");
#line 440 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2658 "tracker-miner-flickr.c"
					}
					default:
					{
						TrackerSparqlBuilder* _tmp72_;
						const gchar* _tmp73_;
						const gchar* _tmp74_;
#line 442 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp72_ = builder;
#line 442 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp73_ = graph;
#line 442 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp74_ = urn;
#line 442 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp72_, _tmp73_, _tmp74_, "nmm:meteringMode", "nmm:meteringMode-other");
#line 443 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2675 "tracker-miner-flickr.c"
					}
				}
#line 445 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2680 "tracker-miner-flickr.c"
			}
#line 402 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			case TRACKER_MINER_FLICKR_EXIF_TAG_WHITE_BALANCE:
#line 2684 "tracker-miner-flickr.c"
			{
				const gchar* _tmp75_;
				gint _tmp76_ = 0;
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp75_ = exif_value;
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp76_ = atoi (_tmp75_);
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				switch (_tmp76_) {
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_AUTO:
#line 2696 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp77_;
						const gchar* _tmp78_;
						const gchar* _tmp79_;
#line 449 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp77_ = builder;
#line 449 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp78_ = graph;
#line 449 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp79_ = urn;
#line 449 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp77_, _tmp78_, _tmp79_, "nmm:whiteBalance", "nmm:whiteBalance-auto");
#line 450 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2711 "tracker-miner-flickr.c"
					}
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					case TRACKER_MINER_FLICKR_EXIF_WHITE_BALANCE_MANUAL:
#line 2715 "tracker-miner-flickr.c"
					{
						TrackerSparqlBuilder* _tmp80_;
						const gchar* _tmp81_;
						const gchar* _tmp82_;
#line 452 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp80_ = builder;
#line 452 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp81_ = graph;
#line 452 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						_tmp82_ = urn;
#line 452 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						tracker_miner_flickr_update_triple_object (self, _tmp80_, _tmp81_, _tmp82_, "nmm:whiteBalance", "nmm:whiteBalance-manual");
#line 453 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 2730 "tracker-miner-flickr.c"
					}
					default:
#line 447 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					break;
#line 2735 "tracker-miner-flickr.c"
				}
#line 455 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2739 "tracker-miner-flickr.c"
			}
			default:
			{
#line 457 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 2745 "tracker-miner-flickr.c"
			}
		}
#line 459 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp83_ = exif_node;
#line 459 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp84_ = _tmp83_->next;
#line 459 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp85_ = _rest_xml_node_ref0 (_tmp84_);
#line 459 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (exif_node);
#line 459 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		exif_node = _tmp85_;
#line 2758 "tracker-miner-flickr.c"
	}
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp87_ = make;
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp87_ != NULL) {
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp86_ = TRUE;
#line 2766 "tracker-miner-flickr.c"
	} else {
		const gchar* _tmp88_;
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp88_ = model;
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp86_ = _tmp88_ != NULL;
#line 2773 "tracker-miner-flickr.c"
	}
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp89_ = _tmp86_;
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp89_) {
#line 2779 "tracker-miner-flickr.c"
		gchar* equip_uri = NULL;
		const gchar* _tmp90_ = NULL;
		const gchar* _tmp91_;
		const gchar* _tmp93_ = NULL;
		const gchar* _tmp94_;
		const gchar* _tmp96_;
		const gchar* _tmp97_;
		gchar* _tmp98_ = NULL;
		TrackerSparqlBuilder* _tmp99_;
		const gchar* _tmp100_;
		TrackerSparqlBuilder* _tmp101_;
		const gchar* _tmp102_;
		TrackerSparqlBuilder* _tmp103_;
		TrackerSparqlBuilder* _tmp104_;
		const gchar* _tmp105_;
		const gchar* _tmp109_;
		TrackerSparqlBuilder* _tmp113_;
		TrackerSparqlBuilder* _tmp114_;
		const gchar* _tmp115_;
		const gchar* _tmp116_;
		const gchar* _tmp117_;
#line 466 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp91_ = make;
#line 466 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp91_ != NULL) {
#line 2805 "tracker-miner-flickr.c"
			const gchar* _tmp92_;
#line 466 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp92_ = make;
#line 466 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp90_ = _tmp92_;
#line 2811 "tracker-miner-flickr.c"
		} else {
#line 466 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp90_ = "";
#line 2815 "tracker-miner-flickr.c"
		}
#line 467 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp94_ = model;
#line 467 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp94_ != NULL) {
#line 2821 "tracker-miner-flickr.c"
			const gchar* _tmp95_;
#line 467 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp95_ = model;
#line 467 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp93_ = _tmp95_;
#line 2827 "tracker-miner-flickr.c"
		} else {
#line 467 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp93_ = "";
#line 2831 "tracker-miner-flickr.c"
		}
#line 465 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp96_ = _tmp90_;
#line 465 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp97_ = _tmp93_;
#line 465 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp98_ = tracker_sparql_escape_uri_printf ("urn:equipment:%s:%s:", _tmp96_, _tmp97_, NULL);
#line 465 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (equip_uri);
#line 465 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		equip_uri = _tmp98_;
#line 469 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp99_ = builder;
#line 469 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp100_ = graph;
#line 469 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_insert_open (_tmp99_, _tmp100_);
#line 470 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp101_ = builder;
#line 470 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp102_ = equip_uri;
#line 470 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_subject_iri (_tmp101_, _tmp102_);
#line 471 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp103_ = builder;
#line 471 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_predicate (_tmp103_, "a");
#line 472 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp104_ = builder;
#line 472 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_object (_tmp104_, "nfo:Equipment");
#line 474 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp105_ = make;
#line 474 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp105_ != NULL) {
#line 2867 "tracker-miner-flickr.c"
			TrackerSparqlBuilder* _tmp106_;
			TrackerSparqlBuilder* _tmp107_;
			const gchar* _tmp108_;
#line 475 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp106_ = builder;
#line 475 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_predicate (_tmp106_, "nfo:manufacturer");
#line 476 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp107_ = builder;
#line 476 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp108_ = make;
#line 476 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object_unvalidated (_tmp107_, _tmp108_);
#line 2881 "tracker-miner-flickr.c"
		}
#line 479 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp109_ = model;
#line 479 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp109_ != NULL) {
#line 2887 "tracker-miner-flickr.c"
			TrackerSparqlBuilder* _tmp110_;
			TrackerSparqlBuilder* _tmp111_;
			const gchar* _tmp112_;
#line 480 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp110_ = builder;
#line 480 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_predicate (_tmp110_, "nfo:model");
#line 481 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp111_ = builder;
#line 481 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp112_ = model;
#line 481 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_sparql_builder_object_unvalidated (_tmp111_, _tmp112_);
#line 2901 "tracker-miner-flickr.c"
		}
#line 484 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp113_ = builder;
#line 484 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_builder_insert_close (_tmp113_);
#line 486 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp114_ = builder;
#line 486 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp115_ = graph;
#line 486 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp116_ = urn;
#line 486 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp117_ = equip_uri;
#line 486 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_miner_flickr_update_triple_object (self, _tmp114_, _tmp115_, _tmp116_, "nfo:equipment", _tmp117_);
#line 462 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (equip_uri);
#line 2919 "tracker-miner-flickr.c"
	}
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (model);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (make);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (exif_value);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (exif_node);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 378 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (exif_call);
#line 2933 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_add_tags (TrackerMinerFlickr* self, const gchar* photo_id, gchar** tags, int tags_length1) {
	RestProxyCall* tag_call = NULL;
	RestProxy* _tmp0_;
	RestProxyCall* _tmp1_ = NULL;
	RestProxyCall* _tmp2_;
	const gchar* _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_;
	GError * _inner_error_ = NULL;
#line 490 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 490 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (photo_id != NULL);
#line 493 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = self->priv->rest;
#line 493 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_proxy_new_call (_tmp0_);
#line 493 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (tag_call);
#line 493 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tag_call = _tmp1_;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = tag_call;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = photo_id;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = tags;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4__length1 = tags_length1;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = g_strjoinv (",", _tmp4_);
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = _tmp5_;
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_tmp2_, "method", "flickr.photos.addTags", "photo_id", _tmp3_, "tags", _tmp6_, NULL);
#line 494 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp6_);
#line 2976 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp7_;
		RestXmlNode* _tmp8_ = NULL;
		RestXmlNode* _tmp9_;
#line 499 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = tag_call;
#line 499 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = tracker_miner_flickr_run_call (self, _tmp7_, &_inner_error_);
#line 499 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = _tmp8_;
#line 499 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_tmp9_);
#line 499 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 2991 "tracker-miner-flickr.c"
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* call_error = NULL;
		const gchar* _tmp10_;
		GError* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_ = NULL;
		gchar* error_message;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 501 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = photo_id;
#line 501 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = call_error;
#line 501 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = _tmp11_->message;
#line 501 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp13_ = g_strdup_printf ("Couldn't add tags for photo %s: %s", _tmp10_, _tmp12_);
#line 501 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		error_message = _tmp13_;
#line 502 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp14_ = error_message;
#line 502 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) self, "status", _tmp14_, NULL);
#line 503 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp15_ = error_message;
#line 503 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:503: %s", _tmp15_);
#line 504 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (error_message);
#line 504 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 504 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (tag_call);
#line 504 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 3036 "tracker-miner-flickr.c"
	}
	__finally7:
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (tag_call);
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 498 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 3049 "tracker-miner-flickr.c"
	}
#line 490 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (tag_call);
#line 3053 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_remove_tag (TrackerMinerFlickr* self, const gchar* tag_id) {
	RestProxyCall* tag_call = NULL;
	RestProxy* _tmp0_;
	RestProxyCall* _tmp1_ = NULL;
	RestProxyCall* _tmp2_;
	const gchar* _tmp3_;
	GError * _inner_error_ = NULL;
#line 508 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 508 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (tag_id != NULL);
#line 511 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = self->priv->rest;
#line 511 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = rest_proxy_new_call (_tmp0_);
#line 511 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (tag_call);
#line 511 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tag_call = _tmp1_;
#line 512 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = tag_call;
#line 512 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = tag_id;
#line 512 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_tmp2_, "method", "flickr.photos.removeTag", "tag_id", _tmp3_, NULL);
#line 3082 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp4_;
		RestXmlNode* _tmp5_ = NULL;
		RestXmlNode* _tmp6_;
#line 516 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = tag_call;
#line 516 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = tracker_miner_flickr_run_call (self, _tmp4_, &_inner_error_);
#line 516 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = _tmp5_;
#line 516 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_tmp6_);
#line 516 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 3097 "tracker-miner-flickr.c"
			goto __catch8_g_error;
		}
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* call_error = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_ = NULL;
		gchar* error_message;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 518 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = call_error;
#line 518 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = _tmp7_->message;
#line 518 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = g_strdup_printf ("Couldn't remove tag: %s", _tmp8_);
#line 518 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		error_message = _tmp9_;
#line 519 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = error_message;
#line 519 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) self, "status", _tmp10_, NULL);
#line 520 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = error_message;
#line 520 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:520: %s", _tmp11_);
#line 521 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (error_message);
#line 521 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 521 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (tag_call);
#line 521 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 3139 "tracker-miner-flickr.c"
	}
	__finally8:
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (tag_call);
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 515 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 3152 "tracker-miner-flickr.c"
	}
#line 508 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (tag_call);
#line 3156 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_writeback_photo_data_free (gpointer _data) {
	TrackerMinerFlickrWritebackPhotoData* _data_;
	_data_ = _data;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->self);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_slice_free (TrackerMinerFlickrWritebackPhotoData, _data_);
#line 3167 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_writeback_photo (TrackerMinerFlickr* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerMinerFlickrWritebackPhotoData* _data_;
	TrackerMinerFlickr* _tmp0_;
	gint _tmp1_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_ = g_slice_new0 (TrackerMinerFlickrWritebackPhotoData);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_miner_flickr_writeback_photo);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_miner_flickr_writeback_photo_data_free);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->self = _tmp0_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = id;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->id = _tmp1_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_writeback_photo_co (_data_);
#line 3191 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_writeback_photo_finish (TrackerMinerFlickr* self, GAsyncResult* _res_) {
	TrackerMinerFlickrWritebackPhotoData* _data_;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 3199 "tracker-miner-flickr.c"
}


static void _g_free0_ (gpointer var) {
#line 530 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	var = (g_free (var), NULL);
#line 3206 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_writeback_photo_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrackerMinerFlickrWritebackPhotoData* _data_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_ = _user_data_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_source_object_ = source_object;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_res_ = _res_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_writeback_photo_co (_data_);
#line 3220 "tracker-miner-flickr.c"
}


static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if ((*length) == (*size)) {
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 3231 "tracker-miner-flickr.c"
	}
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[(*length)++] = value;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[*length] = NULL;
#line 3237 "tracker-miner-flickr.c"
}


static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if ((*length) == (*size)) {
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 3248 "tracker-miner-flickr.c"
	}
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[(*length)++] = value;
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[*length] = NULL;
#line 3254 "tracker-miner-flickr.c"
}


static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value) {
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if ((*length) == (*size)) {
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 3265 "tracker-miner-flickr.c"
	}
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[(*length)++] = value;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	(*array)[*length] = NULL;
#line 3271 "tracker-miner-flickr.c"
}


static gboolean tracker_miner_flickr_writeback_photo_co (TrackerMinerFlickrWritebackPhotoData* _data_) {
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	switch (_data_->_state_) {
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case 0:
#line 3280 "tracker-miner-flickr.c"
		goto _state_0;
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case 1:
#line 3284 "tracker-miner-flickr.c"
		goto _state_1;
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case 2:
#line 3288 "tracker-miner-flickr.c"
		goto _state_2;
		default:
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_assert_not_reached ();
#line 3293 "tracker-miner-flickr.c"
	}
	_state_0:
#line 529 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp0_ = NULL;
#line 529 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 529 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->local_tags = _data_->_tmp0_;
#line 529 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->local_tags_length1 = 0;
#line 529 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_local_tags_size_ = _data_->local_tags_length1;
#line 530 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp1_ = g_str_hash;
#line 530 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp2_ = g_str_equal;
#line 530 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp3_ = g_hash_table_new_full (_data_->_tmp1_, _data_->_tmp2_, _g_free0_, _g_free0_);
#line 530 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->flickr_tags = _data_->_tmp3_;
#line 531 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp4_ = NULL;
#line 531 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp4_ = g_new0 (gchar*, 0 + 1);
#line 531 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_add = _data_->_tmp4_;
#line 531 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_add_length1 = 0;
#line 531 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tags_to_add_size_ = _data_->tags_to_add_length1;
#line 532 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp5_ = NULL;
#line 532 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp5_ = g_new0 (gchar*, 0 + 1);
#line 532 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_remove = _data_->_tmp5_;
#line 532 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_remove_length1 = 0;
#line 532 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tags_to_remove_size_ = _data_->tags_to_remove_length1;
#line 3334 "tracker-miner-flickr.c"
	{
#line 538 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp6_ = NULL;
#line 538 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp6_ = tracker_miner_get_connection ((TrackerMiner*) _data_->self);
#line 538 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
#line 538 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->c = _data_->_tmp7_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp8_ = _data_->c;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp9_ = _data_->id;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp10_ = NULL;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp10_ = g_strdup_printf ("select tracker:uri (%d) {}", _data_->_tmp9_);
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp11_ = _data_->_tmp10_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_state_ = 1;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_connection_query_async (_data_->_tmp8_, _data_->_tmp11_, NULL, tracker_miner_flickr_writeback_photo_ready, _data_);
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3360 "tracker-miner-flickr.c"
		_state_1:
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp12_ = NULL;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp12_ = tracker_sparql_connection_query_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp13_ = _data_->_tmp12_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->_tmp11_);
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp14_ = _data_->_tmp13_;
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_inner_error_ != NULL) {
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (_data_->c);
#line 3376 "tracker-miner-flickr.c"
			goto __catch9_g_error;
		}
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 539 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->cursor = _data_->_tmp14_;
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp15_ = _data_->cursor;
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp16_ = FALSE;
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp16_ = tracker_sparql_cursor_next (_data_->_tmp15_, NULL, &_data_->_inner_error_);
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp17_ = _data_->_tmp16_;
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_inner_error_ != NULL) {
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (_data_->c);
#line 3395 "tracker-miner-flickr.c"
			goto __catch9_g_error;
		}
#line 540 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_return_if_fail (_data_->_tmp17_ != TRUE);
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp18_ = _data_->cursor;
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp19_ = NULL;
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp19_ = tracker_sparql_cursor_get_string (_data_->_tmp18_, 0, NULL);
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp20_ = g_strdup (_data_->_tmp19_);
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 541 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->photo_urn = _data_->_tmp20_;
#line 543 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp21_ = _data_->photo_urn;
#line 543 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp22_ = NULL;
#line 543 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp22_ = g_strdup_printf ("select ?photo_id ?tag where { <%s> nie:dataSource <%s> ;" "nao:identifier ?photo_id ;" "nao:hasTag ?t ." "?t nao:prefLabel ?tag }", _data_->_tmp21_, TRACKER_MINER_FLICKR_DATASOURCE_URN);
#line 543 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->s = _data_->_tmp22_;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp23_ = _data_->c;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp24_ = _data_->s;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_state_ = 2;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_sparql_connection_query_async (_data_->_tmp23_, _data_->_tmp24_, NULL, tracker_miner_flickr_writeback_photo_ready, _data_);
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3430 "tracker-miner-flickr.c"
		_state_2:
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp25_ = NULL;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp25_ = tracker_sparql_connection_query_finish (_data_->_tmp23_, _data_->_res_, &_data_->_inner_error_);
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp26_ = _data_->_tmp25_;
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_inner_error_ != NULL) {
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (_data_->s);
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (_data_->c);
#line 3444 "tracker-miner-flickr.c"
			goto __catch9_g_error;
		}
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 548 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->cursor = _data_->_tmp26_;
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->s);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->c);
#line 3455 "tracker-miner-flickr.c"
	}
	goto __finally9;
	__catch9_g_error:
	{
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->query_error = _data_->_inner_error_;
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_inner_error_ = NULL;
#line 550 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp27_ = _data_->id;
#line 550 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp28_ = _data_->query_error;
#line 550 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp29_ = _data_->_tmp28_->message;
#line 550 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:550: Tracker error when doing writeback for " \
"photo %d: %s", _data_->_tmp27_, _data_->_tmp29_);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (_data_->query_error);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->tag_call);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_hash_table_unref0 (_data_->flickr_tags);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_state_ == 0) {
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3498 "tracker-miner-flickr.c"
		} else {
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 3502 "tracker-miner-flickr.c"
		}
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_unref (_data_->_async_result);
#line 551 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3508 "tracker-miner-flickr.c"
	}
	__finally9:
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_inner_error_ != NULL) {
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->tag_call);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_hash_table_unref0 (_data_->flickr_tags);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_data_->_inner_error_);
#line 537 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3539 "tracker-miner-flickr.c"
	}
	{
#line 555 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 555 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->photo_id = NULL;
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		while (TRUE) {
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp30_ = _data_->cursor;
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp31_ = FALSE;
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp31_ = tracker_sparql_cursor_next (_data_->_tmp30_, NULL, &_data_->_inner_error_);
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp32_ = _data_->_tmp31_;
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_data_->_inner_error_ != NULL) {
#line 3558 "tracker-miner-flickr.c"
				goto __catch10_g_error;
			}
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (!_data_->_tmp32_) {
#line 557 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 3565 "tracker-miner-flickr.c"
			}
#line 558 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp33_ = _data_->photo_id;
#line 558 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (_data_->_tmp33_ == NULL) {
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp34_ = _data_->cursor;
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp35_ = NULL;
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp35_ = tracker_sparql_cursor_get_string (_data_->_tmp34_, 0, NULL);
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp36_ = g_strdup (_data_->_tmp35_);
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (_data_->photo_id);
#line 559 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->photo_id = _data_->_tmp36_;
#line 3583 "tracker-miner-flickr.c"
			}
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp37_ = _data_->local_tags;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp37__length1 = _data_->local_tags_length1;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp38_ = _data_->cursor;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp39_ = NULL;
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp39_ = tracker_sparql_cursor_get_string (_data_->_tmp38_, 1, NULL);
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp40_ = g_strdup (_data_->_tmp39_);
#line 561 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_vala_array_add1 (&_data_->local_tags, &_data_->local_tags_length1, &_data_->_local_tags_size_, _data_->_tmp40_);
#line 3599 "tracker-miner-flickr.c"
		}
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp41_ = _data_->cursor;
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp42_ = NULL;
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp42_ = tracker_sparql_cursor_get_string (_data_->_tmp41_, 0, NULL);
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp43_ = g_strdup (_data_->_tmp42_);
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 563 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->photo_id = _data_->_tmp43_;
#line 3613 "tracker-miner-flickr.c"
	}
	goto __finally10;
	__catch10_g_error:
	{
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->cursor_error = _data_->_inner_error_;
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_inner_error_ = NULL;
#line 565 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp44_ = _data_->cursor_error;
#line 565 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp45_ = _data_->_tmp44_->message;
#line 565 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:565: Tracker error when getting tags and pho" \
"to ids: %s", _data_->_tmp45_);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (_data_->cursor_error);
#line 3630 "tracker-miner-flickr.c"
	}
	__finally10:
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_inner_error_ != NULL) {
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->tag_call);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_hash_table_unref0 (_data_->flickr_tags);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_data_->_inner_error_);
#line 554 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3661 "tracker-miner-flickr.c"
	}
#line 568 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp46_ = _data_->self->priv->rest;
#line 568 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp47_ = NULL;
#line 568 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp47_ = rest_proxy_new_call (_data_->_tmp46_);
#line 568 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->tag_call);
#line 568 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tag_call = _data_->_tmp47_;
#line 569 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp48_ = _data_->tag_call;
#line 569 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp49_ = _data_->photo_id;
#line 569 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_data_->_tmp48_, "method", "flickr.tags.getListPhoto", "photo_id", _data_->_tmp49_, NULL);
#line 3679 "tracker-miner-flickr.c"
	{
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp50_ = _data_->tag_call;
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp51_ = NULL;
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp51_ = tracker_miner_flickr_run_call (_data_->self, _data_->_tmp50_, &_data_->_inner_error_);
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp52_ = _data_->_tmp51_;
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_inner_error_ != NULL) {
#line 3691 "tracker-miner-flickr.c"
			goto __catch11_g_error;
		}
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 572 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->root_node = _data_->_tmp52_;
#line 3698 "tracker-miner-flickr.c"
	}
	goto __finally11;
	__catch11_g_error:
	{
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->get_tags_error = _data_->_inner_error_;
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_inner_error_ = NULL;
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp53_ = _data_->photo_urn;
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp54_ = _data_->get_tags_error;
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp55_ = _data_->_tmp54_->message;
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp56_ = NULL;
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp56_ = g_strdup_printf ("Couldn't get tags for photo %s: %s", _data_->_tmp53_, _data_->_tmp55_);
#line 574 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->error_message = _data_->_tmp56_;
#line 575 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp57_ = _data_->error_message;
#line 575 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_set ((TrackerMiner*) _data_->self, "status", _data_->_tmp57_, NULL);
#line 576 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp58_ = _data_->error_message;
#line 576 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_warning ("tracker-miner-flickr.vala:576: %s", _data_->_tmp58_);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->error_message);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (_data_->get_tags_error);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->tag_call);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_hash_table_unref0 (_data_->flickr_tags);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_data_->_state_ == 0) {
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3755 "tracker-miner-flickr.c"
		} else {
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 3759 "tracker-miner-flickr.c"
		}
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_object_unref (_data_->_async_result);
#line 577 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3765 "tracker-miner-flickr.c"
	}
	__finally11:
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_inner_error_ != NULL) {
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->root_node);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->tag_call);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_hash_table_unref0 (_data_->flickr_tags);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_id);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (_data_->photo_urn);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (_data_->cursor);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_data_->_inner_error_);
#line 571 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return FALSE;
#line 3796 "tracker-miner-flickr.c"
	}
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp59_ = _data_->root_node;
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp60_ = NULL;
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp60_ = rest_xml_node_find (_data_->_tmp59_, "tags");
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp61_ = NULL;
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp61_ = rest_xml_node_find (_data_->_tmp60_, "tag");
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp62_ = _rest_xml_node_ref0 (_data_->_tmp61_);
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (_data_->tag_node);
#line 580 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tag_node = _data_->_tmp62_;
#line 582 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	while (TRUE) {
#line 582 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp63_ = _data_->tag_node;
#line 582 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (!(_data_->_tmp63_ != NULL)) {
#line 582 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			break;
#line 3822 "tracker-miner-flickr.c"
		}
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp64_ = _data_->flickr_tags;
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp65_ = _data_->tag_node;
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp66_ = NULL;
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp66_ = rest_xml_node_get_attr (_data_->_tmp65_, "raw");
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp67_ = g_strdup (_data_->_tmp66_);
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp68_ = _data_->tag_node;
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp69_ = NULL;
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp69_ = rest_xml_node_get_attr (_data_->_tmp68_, "id");
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp70_ = g_strdup (_data_->_tmp69_);
#line 583 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_hash_table_insert (_data_->_tmp64_, _data_->_tmp67_, _data_->_tmp70_);
#line 585 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp71_ = _data_->tag_node;
#line 585 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp72_ = _data_->_tmp71_->next;
#line 585 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tmp73_ = _rest_xml_node_ref0 (_data_->_tmp72_);
#line 585 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (_data_->tag_node);
#line 585 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tag_node = _data_->_tmp73_;
#line 3854 "tracker-miner-flickr.c"
	}
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp74_ = _data_->local_tags;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp74__length1 = _data_->local_tags_length1;
#line 3860 "tracker-miner-flickr.c"
	{
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tag_collection_length1 = 0;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_local_tag_collection_size_ = 0;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tag_collection = _data_->_tmp74_;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tag_collection_length1 = _data_->_tmp74__length1;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->local_tag_it = 0;
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		for (_data_->local_tag_it = 0; _data_->local_tag_it < _data_->_tmp74__length1; _data_->local_tag_it = _data_->local_tag_it + 1) {
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp75_ = g_strdup (_data_->local_tag_collection[_data_->local_tag_it]);
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->local_tag = _data_->_tmp75_;
#line 3878 "tracker-miner-flickr.c"
			{
#line 589 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp76_ = _data_->flickr_tags;
#line 589 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp77_ = _data_->local_tag;
#line 589 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp78_ = NULL;
#line 589 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp78_ = g_hash_table_lookup (_data_->_tmp76_, _data_->_tmp77_);
#line 589 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (((const gchar*) _data_->_tmp78_) == NULL) {
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp79_ = _data_->tags_to_add;
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp79__length1 = _data_->tags_to_add_length1;
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp80_ = _data_->local_tag;
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp81_ = g_strdup (_data_->_tmp80_);
#line 590 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_vala_array_add2 (&_data_->tags_to_add, &_data_->tags_to_add_length1, &_data_->_tags_to_add_size_, _data_->_tmp81_);
#line 3900 "tracker-miner-flickr.c"
				}
#line 588 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (_data_->local_tag);
#line 3904 "tracker-miner-flickr.c"
			}
		}
	}
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp82_ = _data_->flickr_tags;
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp83_ = NULL;
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp83_ = g_hash_table_get_keys (_data_->_tmp82_);
#line 3914 "tracker-miner-flickr.c"
	{
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->flickr_tag_collection = _data_->_tmp83_;
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->flickr_tag_it = NULL;
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		for (_data_->flickr_tag_it = _data_->flickr_tag_collection; _data_->flickr_tag_it != NULL; _data_->flickr_tag_it = _data_->flickr_tag_it->next) {
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->flickr_tag = (const gchar*) _data_->flickr_tag_it->data;
#line 3924 "tracker-miner-flickr.c"
			{
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp84_ = _data_->flickr_tag;
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp85_ = _data_->local_tags;
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp85__length1 = _data_->local_tags_length1;
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp86_ = 0;
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp86_ = tracker_miner_flickr_array_search_str (_data_->self, _data_->_tmp84_, _data_->_tmp85_, _data_->_tmp85__length1);
#line 595 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (_data_->_tmp86_ == (-1)) {
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp87_ = _data_->tags_to_remove;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp87__length1 = _data_->tags_to_remove_length1;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp88_ = _data_->flickr_tags;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp89_ = _data_->flickr_tag;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp90_ = NULL;
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp90_ = g_hash_table_lookup (_data_->_tmp88_, _data_->_tmp89_);
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_data_->_tmp91_ = g_strdup ((const gchar*) _data_->_tmp90_);
#line 596 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_vala_array_add3 (&_data_->tags_to_remove, &_data_->tags_to_remove_length1, &_data_->_tags_to_remove_size_, _data_->_tmp91_);
#line 3954 "tracker-miner-flickr.c"
				}
			}
		}
#line 594 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_list_free0 (_data_->flickr_tag_collection);
#line 3960 "tracker-miner-flickr.c"
	}
#line 599 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp92_ = _data_->photo_id;
#line 599 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp93_ = _data_->tags_to_add;
#line 599 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp93__length1 = _data_->tags_to_add_length1;
#line 599 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_add_tags (_data_->self, _data_->_tmp92_, _data_->_tmp93_, _data_->_tmp93__length1);
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp94_ = _data_->tags_to_remove;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->_tmp94__length1 = _data_->tags_to_remove_length1;
#line 3974 "tracker-miner-flickr.c"
	{
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tag_collection_length1 = 0;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->_tag_collection_size_ = 0;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tag_collection = _data_->_tmp94_;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tag_collection_length1 = _data_->_tmp94__length1;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_data_->tag_it = 0;
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		for (_data_->tag_it = 0; _data_->tag_it < _data_->_tmp94__length1; _data_->tag_it = _data_->tag_it + 1) {
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->_tmp95_ = g_strdup (_data_->tag_collection[_data_->tag_it]);
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_data_->tag = _data_->_tmp95_;
#line 3992 "tracker-miner-flickr.c"
			{
#line 602 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_data_->_tmp96_ = _data_->tag;
#line 602 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				tracker_miner_flickr_remove_tag (_data_->self, _data_->_tmp96_);
#line 601 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (_data_->tag);
#line 4000 "tracker-miner-flickr.c"
			}
		}
	}
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (_data_->tag_node);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (_data_->root_node);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->tag_call);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_remove = (_vala_array_free (_data_->tags_to_remove, _data_->tags_to_remove_length1, (GDestroyNotify) g_free), NULL);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->tags_to_add = (_vala_array_free (_data_->tags_to_add, _data_->tags_to_add_length1, (GDestroyNotify) g_free), NULL);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_hash_table_unref0 (_data_->flickr_tags);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_data_->local_tags = (_vala_array_free (_data_->local_tags, _data_->local_tags_length1, (GDestroyNotify) g_free), NULL);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_data_->photo_id);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_data_->photo_urn);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (_data_->cursor);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_data_->_state_ == 0) {
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 4028 "tracker-miner-flickr.c"
	} else {
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 4032 "tracker-miner-flickr.c"
	}
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_unref (_data_->_async_result);
#line 525 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return FALSE;
#line 4038 "tracker-miner-flickr.c"
}


static gdouble tracker_miner_flickr_ratio_to_double (TrackerMinerFlickr* self, const gchar* ratio) {
	gdouble result = 0.0;
	const gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_ = NULL;
	gchar** tokens;
	gint tokens_length1;
	gint _tokens_size_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	gchar** _tmp7_;
	gint _tmp7__length1;
	const gchar* _tmp8_;
	gint _tmp9_ = 0;
	gchar** _tmp10_;
	gint _tmp10__length1;
	const gchar* _tmp11_;
	gint _tmp12_ = 0;
#line 605 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 605 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (ratio != NULL, 0.0);
#line 606 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = ratio;
#line 606 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, "/", 0);
#line 606 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tokens = _tmp2_;
#line 606 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tokens_length1 = _vala_array_length (_tmp1_);
#line 606 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tokens_size_ = tokens_length1;
#line 607 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = tokens;
#line 607 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3__length1 = tokens_length1;
#line 607 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = _tmp3_[1];
#line 607 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = atoi (_tmp4_);
#line 607 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp5_ == 0) {
#line 4086 "tracker-miner-flickr.c"
		const gchar* _tmp6_;
#line 608 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = ratio;
#line 608 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("tracker-miner-flickr.vala:608: fracToDouble : divide by zero while par" \
"sing ratio '%s'", _tmp6_);
#line 609 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		result = (gdouble) 0;
#line 609 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
#line 609 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return result;
#line 4098 "tracker-miner-flickr.c"
	}
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = tokens;
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7__length1 = tokens_length1;
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = _tmp7_[0];
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = atoi (_tmp8_);
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = tokens;
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10__length1 = tokens_length1;
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = _tmp10_[1];
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = atoi (_tmp11_);
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = (_tmp9_ * 1.0) / _tmp12_;
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
#line 611 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 4122 "tracker-miner-flickr.c"
}


static gint tracker_miner_flickr_array_search_str (TrackerMinerFlickr* self, const gchar* needle, gchar** haystack, int haystack_length1) {
	gint result = 0;
#line 614 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 614 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (needle != NULL, 0);
#line 4132 "tracker-miner-flickr.c"
	{
		gint i;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		i = 0;
#line 4137 "tracker-miner-flickr.c"
		{
			gboolean _tmp0_;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp0_ = TRUE;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			while (TRUE) {
#line 4144 "tracker-miner-flickr.c"
				gboolean _tmp1_;
				gint _tmp3_;
				gchar** _tmp4_;
				gint _tmp4__length1;
				gchar** _tmp5_;
				gint _tmp5__length1;
				gint _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp1_ = _tmp0_;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (!_tmp1_) {
#line 4158 "tracker-miner-flickr.c"
					gint _tmp2_;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp2_ = i;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					i = _tmp2_ + 1;
#line 4164 "tracker-miner-flickr.c"
				}
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp0_ = FALSE;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp3_ = i;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp4_ = haystack;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp4__length1 = haystack_length1;
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (!(_tmp3_ < _tmp4__length1)) {
#line 615 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					break;
#line 4178 "tracker-miner-flickr.c"
				}
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp5_ = haystack;
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp5__length1 = haystack_length1;
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp6_ = i;
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp7_ = _tmp5_[_tmp6_];
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp8_ = needle;
#line 616 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (g_strcmp0 (_tmp7_, _tmp8_) == 0) {
#line 617 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					result = i;
#line 617 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					return result;
#line 4196 "tracker-miner-flickr.c"
				}
			}
		}
	}
#line 620 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = -1;
#line 620 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 4205 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_sign_call (TrackerMinerFlickr* self, RestProxyCall* call) {
	GString* signature = NULL;
	GHashTable* parameters = NULL;
	GList* parameter_names = NULL;
	RestProxyCall* _tmp0_;
	const gchar* _tmp1_;
	GString* _tmp4_;
	RestProxyCall* _tmp5_;
	GHashTable* _tmp6_ = NULL;
	GHashTable* _tmp7_;
	GList* _tmp8_ = NULL;
	GList* _tmp9_;
	GList* _tmp10_ = NULL;
	GCompareFunc _tmp11_;
	GList* _tmp12_;
	RestProxyCall* _tmp20_;
	GString* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_ = NULL;
	gchar* _tmp24_;
#line 623 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 623 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (call != NULL);
#line 628 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = call;
#line 628 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_param (_tmp0_, "api_key", TRACKER_MINER_FLICKR_API_KEY);
#line 629 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = self->priv->auth_token;
#line 629 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp1_ != NULL) {
#line 4241 "tracker-miner-flickr.c"
		RestProxyCall* _tmp2_;
		const gchar* _tmp3_;
#line 630 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = call;
#line 630 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = self->priv->auth_token;
#line 630 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		rest_proxy_call_add_param (_tmp2_, "auth_token", _tmp3_);
#line 4250 "tracker-miner-flickr.c"
	}
#line 632 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = g_string_new (TRACKER_MINER_FLICKR_SHARED_SECRET);
#line 632 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_string_free0 (signature);
#line 632 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	signature = _tmp4_;
#line 633 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = call;
#line 633 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = rest_proxy_call_get_params (_tmp5_);
#line 633 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_hash_table_unref0 (parameters);
#line 633 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	parameters = _tmp6_;
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = parameters;
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = g_hash_table_get_keys (_tmp7_);
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = _tmp8_;
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = g_list_copy (_tmp9_);
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_list_free0 (parameter_names);
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	parameter_names = _tmp10_;
#line 635 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_list_free0 (_tmp9_);
#line 636 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = g_strcmp0;
#line 636 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	parameter_names = g_list_sort (parameter_names, (GCompareFunc) _tmp11_);
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = parameter_names;
#line 4286 "tracker-miner-flickr.c"
	{
		GList* parameter_collection = NULL;
		GList* parameter_it = NULL;
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		parameter_collection = _tmp12_;
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		for (parameter_it = parameter_collection; parameter_it != NULL; parameter_it = parameter_it->next) {
#line 4294 "tracker-miner-flickr.c"
			gchar* _tmp13_;
			gchar* parameter = NULL;
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp13_ = g_strdup ((const gchar*) parameter_it->data);
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			parameter = _tmp13_;
#line 4301 "tracker-miner-flickr.c"
			{
				GString* _tmp14_;
				const gchar* _tmp15_;
				GString* _tmp16_;
				GHashTable* _tmp17_;
				const gchar* _tmp18_;
				gconstpointer _tmp19_ = NULL;
#line 639 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp14_ = signature;
#line 639 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp15_ = parameter;
#line 639 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				g_string_append (_tmp14_, _tmp15_);
#line 640 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp16_ = signature;
#line 640 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp17_ = parameters;
#line 640 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp18_ = parameter;
#line 640 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp19_ = g_hash_table_lookup (_tmp17_, _tmp18_);
#line 640 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				g_string_append (_tmp16_, (const gchar*) _tmp19_);
#line 638 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (parameter);
#line 4327 "tracker-miner-flickr.c"
			}
		}
	}
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp20_ = call;
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp21_ = signature;
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp22_ = _tmp21_->str;
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp23_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp22_, (gsize) (-1));
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp24_ = _tmp23_;
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_param (_tmp20_, "api_sig", _tmp24_);
#line 643 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp24_);
#line 623 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_list_free0 (parameter_names);
#line 623 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_hash_table_unref0 (parameters);
#line 623 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_string_free0 (signature);
#line 4351 "tracker-miner-flickr.c"
}


static gpointer _g_error_copy0 (gpointer self) {
#line 655 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return self ? g_error_copy (self) : NULL;
#line 4358 "tracker-miner-flickr.c"
}


static RestXmlNode* tracker_miner_flickr_run_call (TrackerMinerFlickr* self, RestProxyCall* call, GError** error) {
	RestXmlNode* result = NULL;
	RestXmlParser* parser = NULL;
	RestXmlNode* root_node = NULL;
	RestProxyCall* _tmp0_;
	RestXmlParser* _tmp4_;
	RestXmlParser* _tmp5_;
	RestProxyCall* _tmp6_;
	const gchar* _tmp7_ = NULL;
	RestProxyCall* _tmp8_;
	gint64 _tmp9_ = 0LL;
	RestXmlNode* _tmp10_ = NULL;
	RestXmlNode* _tmp11_;
	gboolean _tmp12_ = FALSE;
	RestXmlNode* _tmp13_;
	gboolean _tmp16_;
	GError * _inner_error_ = NULL;
#line 646 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 646 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (call != NULL, NULL);
#line 650 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = call;
#line 650 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_sign_call (self, _tmp0_);
#line 4387 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp1_;
#line 653 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp1_ = call;
#line 653 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		rest_proxy_call_run (_tmp1_, NULL, &_inner_error_);
#line 653 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 4396 "tracker-miner-flickr.c"
			goto __catch12_g_error;
		}
	}
	goto __finally12;
	__catch12_g_error:
	{
		GError* call_error = NULL;
		GError* _tmp2_;
		GError* _tmp3_;
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 655 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = call_error;
#line 655 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = _g_error_copy0 (_tmp2_);
#line 655 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp3_;
#line 655 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 4418 "tracker-miner-flickr.c"
		goto __finally12;
	}
	__finally12:
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_propagate_error (error, _inner_error_);
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (parser);
#line 652 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return NULL;
#line 4432 "tracker-miner-flickr.c"
	}
#line 658 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = rest_xml_parser_new ();
#line 658 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (parser);
#line 658 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	parser = _tmp4_;
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = parser;
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = call;
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = rest_proxy_call_get_payload (_tmp6_);
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = call;
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = rest_proxy_call_get_payload_length (_tmp8_);
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = rest_xml_parser_parse_from_data (_tmp5_, _tmp7_, _tmp9_);
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = _rest_xml_node_ref0 (_tmp10_);
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 659 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	root_node = _tmp11_;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = root_node;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp13_ == NULL) {
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = TRUE;
#line 4464 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp14_;
		const gchar* _tmp15_;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp14_ = root_node;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp15_ = _tmp14_->name;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp12_ = g_strcmp0 (_tmp15_, "rsp") != 0;
#line 4474 "tracker-miner-flickr.c"
	}
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = _tmp12_;
#line 660 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp16_) {
#line 4480 "tracker-miner-flickr.c"
		GError* _tmp17_;
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = g_error_new_literal (TRACKER_REST_CALL_ERROR, TRACKER_REST_CALL_ERROR_INVALID_RESPONSE, "Empty payload or root node not \"rsp\"");
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp17_;
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_propagate_error (error, _inner_error_);
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (parser);
#line 661 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return NULL;
#line 4494 "tracker-miner-flickr.c"
	}
#line 664 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = root_node;
#line 664 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (parser);
#line 664 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 4502 "tracker-miner-flickr.c"
}


static GHashTable* tracker_miner_flickr_real_get_association_data (TrackerMinerWeb* base, GError** error) {
	TrackerMinerFlickr * self;
	GHashTable* result = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* association_data;
	RestProxy* _tmp3_;
	RestProxyCall* _tmp4_ = NULL;
	RestProxyCall* frob_call;
	RestXmlNode* root_node = NULL;
	RestXmlNode* frob_node = NULL;
	gchar* api_signature = NULL;
	gchar* url = NULL;
	RestProxyCall* _tmp5_;
	RestXmlNode* _tmp12_;
	RestXmlNode* _tmp13_ = NULL;
	RestXmlNode* _tmp14_;
	gboolean _tmp15_ = FALSE;
	RestXmlNode* _tmp16_;
	gboolean _tmp19_;
	RestXmlNode* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_ = NULL;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	GHashTable* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	GError * _inner_error_ = NULL;
#line 667 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) base;
#line 668 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = g_str_hash;
#line 668 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = g_str_equal;
#line 668 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
#line 668 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	association_data = _tmp2_;
#line 669 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = self->priv->rest;
#line 669 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = rest_proxy_new_call (_tmp3_);
#line 669 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	frob_call = _tmp4_;
#line 675 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = frob_call;
#line 675 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_param (_tmp5_, "method", "flickr.auth.getFrob");
#line 4568 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp6_;
		RestXmlNode* _tmp7_ = NULL;
		RestXmlNode* _tmp8_;
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = frob_call;
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = tracker_miner_flickr_run_call (self, _tmp6_, &_inner_error_);
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = _tmp7_;
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 4581 "tracker-miner-flickr.c"
			goto __catch13_g_error;
		}
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 678 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		root_node = _tmp8_;
#line 4588 "tracker-miner-flickr.c"
	}
	goto __finally13;
	__catch13_g_error:
	{
		GError* call_error = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		GError* _tmp11_;
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 680 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = call_error;
#line 680 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = _tmp9_->message;
#line 680 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = g_error_new (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_SERVICE, "Error while getting association data: %s", _tmp10_);
#line 680 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp11_;
#line 680 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 4611 "tracker-miner-flickr.c"
		goto __finally13;
	}
	__finally13:
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (url);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (api_signature);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (frob_node);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (frob_call);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_hash_table_unref0 (association_data);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return NULL;
#line 4635 "tracker-miner-flickr.c"
		} else {
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (url);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (api_signature);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (frob_node);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (frob_call);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_hash_table_unref0 (association_data);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 677 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return NULL;
#line 4655 "tracker-miner-flickr.c"
		}
	}
#line 683 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = root_node;
#line 683 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = rest_xml_node_find (_tmp12_, "frob");
#line 683 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = _rest_xml_node_ref0 (_tmp13_);
#line 683 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (frob_node);
#line 683 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	frob_node = _tmp14_;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = frob_node;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp16_ == NULL) {
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp15_ = TRUE;
#line 4674 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp17_;
		const gchar* _tmp18_;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = frob_node;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = _tmp17_->content;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp15_ = _tmp18_ == NULL;
#line 4684 "tracker-miner-flickr.c"
	}
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp19_ = _tmp15_;
#line 684 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp19_) {
#line 4690 "tracker-miner-flickr.c"
		GError* _tmp20_;
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp20_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_SERVICE, "Malformed XML response while getting frob");
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp20_;
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (url);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (api_signature);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (frob_node);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (frob_call);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_hash_table_unref0 (association_data);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return NULL;
#line 4714 "tracker-miner-flickr.c"
		} else {
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (url);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (api_signature);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (frob_node);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (frob_call);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_hash_table_unref0 (association_data);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 685 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return NULL;
#line 4734 "tracker-miner-flickr.c"
		}
	}
#line 688 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp21_ = frob_node;
#line 688 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp22_ = _tmp21_->content;
#line 688 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp23_ = g_strdup (_tmp22_);
#line 688 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (self->priv->frob);
#line 688 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self->priv->frob = _tmp23_;
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp24_ = self->priv->frob;
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp25_ = g_strconcat (TRACKER_MINER_FLICKR_SHARED_SECRET "api_key" TRACKER_MINER_FLICKR_API_KEY "frob", _tmp24_, NULL);
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp26_ = _tmp25_;
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp27_ = g_strconcat (_tmp26_, "permswrite", NULL);
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp28_ = _tmp27_;
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp29_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp28_, (gsize) (-1));
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (api_signature);
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	api_signature = _tmp29_;
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp28_);
#line 690 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp26_);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp30_ = self->priv->frob;
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp31_ = g_strconcat (TRACKER_MINER_FLICKR_FLICKR_AUTH_URL "?api_key=" TRACKER_MINER_FLICKR_API_KEY "&perms=write&frob=", _tmp30_, NULL);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp32_ = _tmp31_;
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp33_ = g_strconcat (_tmp32_, "&api_sig=", NULL);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp34_ = _tmp33_;
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp35_ = api_signature;
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp36_ = g_strconcat (_tmp34_, _tmp35_, NULL);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (url);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	url = _tmp36_;
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp34_);
#line 692 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp32_);
#line 694 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp37_ = association_data;
#line 694 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp38_ = g_strdup ("url");
#line 694 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp39_ = url;
#line 694 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp40_ = g_strdup (_tmp39_);
#line 694 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_hash_table_insert (_tmp37_, _tmp38_, _tmp40_);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = association_data;
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (url);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (api_signature);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (frob_node);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (frob_call);
#line 696 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 4813 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_real_associate (TrackerMinerWeb* base, GHashTable* association_data, GError** error) {
	TrackerMinerFlickr * self;
	TrackerPasswordProvider* _tmp0_ = NULL;
	TrackerPasswordProvider* _tmp1_;
	TrackerPasswordProvider* password_provider;
	RestProxy* _tmp2_;
	RestProxyCall* _tmp3_ = NULL;
	RestProxyCall* token_call;
	RestXmlNode* root_node = NULL;
	RestXmlNode* token_node = NULL;
	RestXmlNode* user_node = NULL;
	RestProxyCall* _tmp4_;
	const gchar* _tmp5_;
	RestXmlNode* _tmp12_ = NULL;
	RestXmlNode* _tmp13_;
	RestXmlNode* _tmp14_ = NULL;
	RestXmlNode* _tmp15_;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	RestXmlNode* _tmp19_;
	gboolean _tmp22_;
	gboolean _tmp24_;
	gboolean _tmp27_;
	GError * _inner_error_ = NULL;
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) base;
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (association_data != NULL);
#line 700 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = tracker_password_provider_get ();
#line 700 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 700 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	password_provider = _tmp1_;
#line 701 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = self->priv->rest;
#line 701 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = rest_proxy_new_call (_tmp2_);
#line 701 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	token_call = _tmp3_;
#line 706 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = token_call;
#line 706 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = self->priv->frob;
#line 706 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_params (_tmp4_, "method", "flickr.auth.getToken", "frob", _tmp5_, NULL);
#line 4864 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp6_;
		RestXmlNode* _tmp7_ = NULL;
		RestXmlNode* _tmp8_;
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp6_ = token_call;
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = tracker_miner_flickr_run_call (self, _tmp6_, &_inner_error_);
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = _tmp7_;
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 4877 "tracker-miner-flickr.c"
			goto __catch14_g_error;
		}
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 710 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		root_node = _tmp8_;
#line 4884 "tracker-miner-flickr.c"
	}
	goto __finally14;
	__catch14_g_error:
	{
		GError* call_error = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		GError* _tmp11_;
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 712 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = call_error;
#line 712 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp10_ = _tmp9_->message;
#line 712 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp11_ = g_error_new (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_SERVICE, "Unable to get authentication token: %s", _tmp10_);
#line 712 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp11_;
#line 712 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 4907 "tracker-miner-flickr.c"
		goto __finally14;
	}
	__finally14:
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 4929 "tracker-miner-flickr.c"
		} else {
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 709 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 4947 "tracker-miner-flickr.c"
		}
	}
#line 715 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = rest_xml_node_find (root_node, "token");
#line 715 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = _rest_xml_node_ref0 (_tmp12_);
#line 715 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (token_node);
#line 715 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	token_node = _tmp13_;
#line 716 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = rest_xml_node_find (root_node, "user");
#line 716 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = _rest_xml_node_ref0 (_tmp14_);
#line 716 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (user_node);
#line 716 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	user_node = _tmp15_;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp19_ = token_node;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp19_ == NULL) {
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = TRUE;
#line 4972 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp20_;
		const gchar* _tmp21_;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp20_ = token_node;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = _tmp20_->content;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = _tmp21_ == NULL;
#line 4982 "tracker-miner-flickr.c"
	}
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp22_ = _tmp18_;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp22_) {
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = TRUE;
#line 4990 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp23_;
#line 718 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp23_ = user_node;
#line 718 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = _tmp23_ == NULL;
#line 4997 "tracker-miner-flickr.c"
	}
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp24_ = _tmp17_;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp24_) {
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp16_ = TRUE;
#line 5005 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp25_;
		const gchar* _tmp26_ = NULL;
#line 718 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp25_ = user_node;
#line 718 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp26_ = rest_xml_node_get_attr (_tmp25_, "username");
#line 718 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp16_ = _tmp26_ == NULL;
#line 5015 "tracker-miner-flickr.c"
	}
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp27_ = _tmp16_;
#line 717 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp27_) {
#line 5021 "tracker-miner-flickr.c"
		GError* _tmp28_;
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp28_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_SERVICE, "Malformed XML response while getting token");
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp28_;
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5043 "tracker-miner-flickr.c"
		} else {
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 719 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5061 "tracker-miner-flickr.c"
		}
	}
	{
		TrackerPasswordProvider* _tmp29_;
		RestXmlNode* _tmp30_;
		const gchar* _tmp31_ = NULL;
		RestXmlNode* _tmp32_;
		const gchar* _tmp33_;
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp29_ = password_provider;
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp30_ = user_node;
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp31_ = rest_xml_node_get_attr (_tmp30_, "username");
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp32_ = token_node;
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp33_ = _tmp32_->content;
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_password_provider_store_password (_tmp29_, TRACKER_MINER_FLICKR_MINER_NAME, TRACKER_MINER_FLICKR_MINER_DESCRIPTION, _tmp31_, _tmp33_, &_inner_error_);
#line 723 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5084 "tracker-miner-flickr.c"
			goto __catch15_g_error;
		}
	}
	goto __finally15;
	__catch15_g_error:
	{
		GError* e = NULL;
		GError* _tmp34_;
		GError* _tmp38_;
		const gchar* _tmp39_;
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 728 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp34_ = e;
#line 728 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (g_error_matches (_tmp34_, TRACKER_PASSWORD_PROVIDER_ERROR, TRACKER_PASSWORD_PROVIDER_ERROR_SERVICE)) {
#line 5103 "tracker-miner-flickr.c"
			GError* _tmp35_;
			const gchar* _tmp36_;
			GError* _tmp37_;
#line 729 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp35_ = e;
#line 729 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp36_ = _tmp35_->message;
#line 729 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp37_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_KEYRING, _tmp36_);
#line 729 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_inner_error_ = _tmp37_;
#line 729 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_error_free0 (e);
#line 5117 "tracker-miner-flickr.c"
			goto __finally15;
		}
#line 732 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp38_ = e;
#line 732 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp39_ = _tmp38_->message;
#line 732 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("tracker-miner-flickr.vala:732: Internal error: %s", _tmp39_);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (user_node);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (token_node);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (token_call);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (password_provider);
#line 733 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 5140 "tracker-miner-flickr.c"
	}
	__finally15:
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5161 "tracker-miner-flickr.c"
		} else {
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (token_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (token_call);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 722 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5179 "tracker-miner-flickr.c"
		}
	}
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (user_node);
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (token_node);
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (token_call);
#line 699 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (password_provider);
#line 5192 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_real_authenticate (TrackerMinerWeb* base, GError** error) {
	TrackerMinerFlickr * self;
	TrackerPasswordProvider* password_provider = NULL;
	RestProxyCall* login_call = NULL;
	RestXmlNode* root_node = NULL;
	RestXmlNode* user_node = NULL;
	TrackerPasswordProvider* _tmp0_ = NULL;
	TrackerPasswordProvider* _tmp1_;
	RestProxy* _tmp10_;
	RestProxyCall* _tmp11_ = NULL;
	RestProxyCall* _tmp12_;
	RestXmlNode* _tmp19_ = NULL;
	RestXmlNode* _tmp20_;
	gboolean _tmp21_ = FALSE;
	RestXmlNode* _tmp22_;
	gboolean _tmp25_;
	RestXmlNode* _tmp27_;
	const gchar* _tmp28_ = NULL;
	gchar* _tmp29_;
	GError * _inner_error_ = NULL;
#line 737 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) base;
#line 743 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = tracker_password_provider_get ();
#line 743 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 743 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (password_provider);
#line 743 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	password_provider = _tmp1_;
#line 745 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMinerWeb*) self, "associated", FALSE, NULL);
#line 5228 "tracker-miner-flickr.c"
	{
		TrackerPasswordProvider* _tmp2_;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_;
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = password_provider;
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = tracker_password_provider_get_password (_tmp2_, TRACKER_MINER_FLICKR_MINER_NAME, NULL, &_inner_error_);
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = _tmp3_;
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5241 "tracker-miner-flickr.c"
			goto __catch16_g_error;
		}
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (self->priv->auth_token);
#line 748 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		self->priv->auth_token = _tmp4_;
#line 5248 "tracker-miner-flickr.c"
	}
	goto __finally16;
	__catch16_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		GError* _tmp7_;
		const gchar* _tmp8_;
		GError* _tmp9_;
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 750 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp5_ = e;
#line 750 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (g_error_matches (_tmp5_, TRACKER_PASSWORD_PROVIDER_ERROR, TRACKER_PASSWORD_PROVIDER_ERROR_NOTFOUND)) {
#line 5266 "tracker-miner-flickr.c"
			GError* _tmp6_;
#line 751 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp6_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_NO_CREDENTIALS, "Miner is not associated");
#line 751 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_inner_error_ = _tmp6_;
#line 751 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_error_free0 (e);
#line 5274 "tracker-miner-flickr.c"
			goto __finally16;
		}
#line 753 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = e;
#line 753 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = _tmp7_->message;
#line 753 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp9_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_KEYRING, _tmp8_);
#line 753 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp9_;
#line 753 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 5287 "tracker-miner-flickr.c"
		goto __finally16;
	}
	__finally16:
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5307 "tracker-miner-flickr.c"
		} else {
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 747 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5323 "tracker-miner-flickr.c"
		}
	}
#line 756 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = self->priv->rest;
#line 756 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = rest_proxy_new_call (_tmp10_);
#line 756 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (login_call);
#line 756 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	login_call = _tmp11_;
#line 757 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = login_call;
#line 757 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	rest_proxy_call_add_param (_tmp12_, "method", "flickr.auth.checkToken");
#line 5338 "tracker-miner-flickr.c"
	{
		RestProxyCall* _tmp13_;
		RestXmlNode* _tmp14_ = NULL;
		RestXmlNode* _tmp15_;
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp13_ = login_call;
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp14_ = tracker_miner_flickr_run_call (self, _tmp13_, &_inner_error_);
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp15_ = _tmp14_;
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5351 "tracker-miner-flickr.c"
			goto __catch17_g_error;
		}
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_rest_xml_node_unref0 (root_node);
#line 760 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		root_node = _tmp15_;
#line 5358 "tracker-miner-flickr.c"
	}
	goto __finally17;
	__catch17_g_error:
	{
		GError* call_error = NULL;
		GError* _tmp16_;
		const gchar* _tmp17_;
		GError* _tmp18_;
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		call_error = _inner_error_;
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 762 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp16_ = call_error;
#line 762 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = _tmp16_->message;
#line 762 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = g_error_new (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_SERVICE, "Cannot verify login: %s", _tmp17_);
#line 762 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp18_;
#line 762 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (call_error);
#line 5381 "tracker-miner-flickr.c"
		goto __finally17;
	}
	__finally17:
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5401 "tracker-miner-flickr.c"
		} else {
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 759 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5417 "tracker-miner-flickr.c"
		}
	}
#line 765 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp19_ = rest_xml_node_find (root_node, "user");
#line 765 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp20_ = _rest_xml_node_ref0 (_tmp19_);
#line 765 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (user_node);
#line 765 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	user_node = _tmp20_;
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp22_ = user_node;
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp22_ == NULL) {
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = TRUE;
#line 5434 "tracker-miner-flickr.c"
	} else {
		RestXmlNode* _tmp23_;
		const gchar* _tmp24_ = NULL;
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp23_ = user_node;
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp24_ = rest_xml_node_get_attr (_tmp23_, "nsid");
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = _tmp24_ == NULL;
#line 5444 "tracker-miner-flickr.c"
	}
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp25_ = _tmp21_;
#line 766 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp25_) {
#line 5450 "tracker-miner-flickr.c"
		GError* _tmp26_;
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp26_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_WRONG_CREDENTIALS, "Stored authentication token is not valid");
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp26_;
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5470 "tracker-miner-flickr.c"
		} else {
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (user_node);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_rest_xml_node_unref0 (root_node);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (login_call);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 767 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5486 "tracker-miner-flickr.c"
		}
	}
#line 770 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp27_ = user_node;
#line 770 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp28_ = rest_xml_node_get_attr (_tmp27_, "nsid");
#line 770 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp29_ = g_strdup (_tmp28_);
#line 770 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (self->priv->user_id);
#line 770 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self->priv->user_id = _tmp29_;
#line 772 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_message ("tracker-miner-flickr.vala:772: Authentication successful");
#line 773 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMinerWeb*) self, "associated", TRUE, NULL);
#line 737 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (user_node);
#line 737 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_rest_xml_node_unref0 (root_node);
#line 737 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (login_call);
#line 737 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (password_provider);
#line 5511 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_real_dissociate (TrackerMinerWeb* base, GError** error) {
	TrackerMinerFlickr * self;
	TrackerPasswordProvider* _tmp0_ = NULL;
	TrackerPasswordProvider* _tmp1_;
	TrackerPasswordProvider* password_provider;
	GError * _inner_error_ = NULL;
#line 776 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) base;
#line 777 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = tracker_password_provider_get ();
#line 777 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 777 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	password_provider = _tmp1_;
#line 5529 "tracker-miner-flickr.c"
	{
		TrackerPasswordProvider* _tmp2_;
#line 780 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = password_provider;
#line 780 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_password_provider_forget_password (_tmp2_, TRACKER_MINER_FLICKR_MINER_NAME, &_inner_error_);
#line 780 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5538 "tracker-miner-flickr.c"
			goto __catch18_g_error;
		}
	}
	goto __finally18;
	__catch18_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		GError* _tmp7_;
		const gchar* _tmp8_;
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 782 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = e;
#line 782 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (g_error_matches (_tmp3_, TRACKER_PASSWORD_PROVIDER_ERROR, TRACKER_PASSWORD_PROVIDER_ERROR_SERVICE)) {
#line 5557 "tracker-miner-flickr.c"
			GError* _tmp4_;
			const gchar* _tmp5_;
			GError* _tmp6_;
#line 783 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp4_ = e;
#line 783 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp5_ = _tmp4_->message;
#line 783 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp6_ = g_error_new_literal (TRACKER_MINER_WEB_ERROR, TRACKER_MINER_WEB_ERROR_KEYRING, _tmp5_);
#line 783 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_inner_error_ = _tmp6_;
#line 783 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_error_free0 (e);
#line 5571 "tracker-miner-flickr.c"
			goto __finally18;
		}
#line 786 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp7_ = e;
#line 786 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp8_ = _tmp7_->message;
#line 786 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("tracker-miner-flickr.vala:786: Internal error: %s", _tmp8_);
#line 787 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 787 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (password_provider);
#line 787 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return;
#line 5586 "tracker-miner-flickr.c"
	}
	__finally18:
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_->domain == TRACKER_MINER_WEB_ERROR) {
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_propagate_error (error, _inner_error_);
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5599 "tracker-miner-flickr.c"
		} else {
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (password_provider);
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_clear_error (&_inner_error_);
#line 779 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return;
#line 5609 "tracker-miner-flickr.c"
		}
	}
#line 790 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMinerWeb*) self, "associated", FALSE, NULL);
#line 776 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (password_provider);
#line 5616 "tracker-miner-flickr.c"
}


static void __lambda0_ (TrackerMinerFlickr* self, gint key, GArray* value) {
	gint _tmp0_;
	gint id;
	GArray* _tmp1_;
	GArray* classes;
#line 796 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = key;
#line 796 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	id = (gint) _tmp0_;
#line 797 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = value;
#line 797 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	classes = (GArray*) _tmp1_;
#line 5633 "tracker-miner-flickr.c"
	{
		guint i;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		i = (guint) 0;
#line 5638 "tracker-miner-flickr.c"
		{
			gboolean _tmp2_;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp2_ = TRUE;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			while (TRUE) {
#line 5645 "tracker-miner-flickr.c"
				gboolean _tmp3_;
				guint _tmp5_;
				GArray* _tmp6_;
				guint _tmp7_;
				GArray* _tmp8_;
				guint _tmp9_;
				gint _tmp10_ = 0;
				gint _tmp11_;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp3_ = _tmp2_;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (!_tmp3_) {
#line 5658 "tracker-miner-flickr.c"
					guint _tmp4_;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp4_ = i;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					i = _tmp4_ + 1;
#line 5664 "tracker-miner-flickr.c"
				}
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp2_ = FALSE;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp5_ = i;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp6_ = classes;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp7_ = _tmp6_->len;
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (!(_tmp5_ < _tmp7_)) {
#line 799 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					break;
#line 5678 "tracker-miner-flickr.c"
				}
#line 800 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp8_ = classes;
#line 800 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp9_ = i;
#line 800 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp10_ = g_array_index (_tmp8_, gint, _tmp9_);
#line 800 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp11_ = self->priv->nmm_photo_id;
#line 800 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (_tmp10_ == _tmp11_) {
#line 5690 "tracker-miner-flickr.c"
					gint _tmp12_;
#line 801 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp12_ = id;
#line 801 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					tracker_miner_flickr_writeback_photo (self, _tmp12_, NULL, NULL);
#line 5696 "tracker-miner-flickr.c"
				}
			}
		}
	}
}


static void ___lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self) {
#line 795 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	__lambda0_ (self, key, value);
#line 5707 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_writeback (TrackerMinerFlickr* self, GHashTable* properties) {
	GHashTable* _tmp0_;
#line 793 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 793 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (properties != NULL);
#line 795 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = properties;
#line 795 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_hash_table_foreach (_tmp0_, ___lambda0__gh_func, self);
#line 5721 "tracker-miner-flickr.c"
}


static gchar* tracker_miner_flickr_get_resource (TrackerMinerFlickr* self, const gchar* graph, gchar** types, int types_length1, const gchar* identifier, gboolean* created, GError** error) {
	gboolean _vala_created = FALSE;
	gchar* result = NULL;
	gchar* inner_query = NULL;
	gchar* select_query = NULL;
	gchar* insert_query = NULL;
	TrackerSparqlCursor* cursor = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_ = NULL;
	GError * _inner_error_ = NULL;
#line 807 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 807 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_val_if_fail (identifier != NULL, NULL);
#line 813 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = g_strdup ("");
#line 813 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (select_query);
#line 813 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	select_query = _tmp0_;
#line 814 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = g_strdup ("");
#line 814 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (inner_query);
#line 814 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	inner_query = _tmp1_;
#line 815 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_vala_created = FALSE;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = types;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2__length1 = types_length1;
#line 5766 "tracker-miner-flickr.c"
	{
		gchar** type_collection = NULL;
		gint type_collection_length1 = 0;
		gint _type_collection_size_ = 0;
		gint type_it = 0;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		type_collection = _tmp2_;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		type_collection_length1 = _tmp2__length1;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		for (type_it = 0; type_it < _tmp2__length1; type_it = type_it + 1) {
#line 5778 "tracker-miner-flickr.c"
			gchar* _tmp3_;
			gchar* type = NULL;
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp3_ = g_strdup (type_collection[type_it]);
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			type = _tmp3_;
#line 5785 "tracker-miner-flickr.c"
			{
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				gchar* _tmp6_ = NULL;
				gchar* _tmp7_;
				gchar* _tmp8_;
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp4_ = inner_query;
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp5_ = type;
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp6_ = g_strdup_printf (" a %s; ", _tmp5_);
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp7_ = _tmp6_;
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp8_ = g_strconcat (_tmp4_, _tmp7_, NULL);
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (inner_query);
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				inner_query = _tmp8_;
#line 818 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (_tmp7_);
#line 817 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_g_free0 (type);
#line 5810 "tracker-miner-flickr.c"
			}
		}
	}
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = inner_query;
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = identifier;
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = g_strdup_printf ("nao:identifier \"%s\"", _tmp10_);
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = _tmp11_;
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = g_strconcat (_tmp9_, _tmp12_, NULL);
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (inner_query);
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	inner_query = _tmp13_;
#line 820 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (_tmp12_);
#line 822 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = inner_query;
#line 822 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = g_strdup_printf ("select ?urn where { ?urn %s }", _tmp14_);
#line 822 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (select_query);
#line 822 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	select_query = _tmp15_;
#line 5838 "tracker-miner-flickr.c"
	{
		TrackerSparqlConnection* _tmp16_ = NULL;
		const gchar* _tmp17_;
		TrackerSparqlCursor* _tmp18_ = NULL;
		TrackerSparqlCursor* _tmp19_;
		TrackerSparqlCursor* _tmp20_;
		gboolean _tmp21_ = FALSE;
		gboolean _tmp22_;
		const gchar* _tmp26_;
		TrackerSparqlConnection* _tmp32_ = NULL;
		const gchar* _tmp33_;
		GVariant* _tmp34_ = NULL;
		GVariant* v;
		GVariantIter* iter1 = NULL;
		GVariantIter* iter2 = NULL;
		GVariantIter* iter3 = NULL;
		gchar* key;
		gchar* val;
		GVariant* _tmp35_;
		GVariantIter* _tmp36_ = NULL;
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp16_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp17_ = select_query;
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp18_ = tracker_sparql_connection_query (_tmp16_, _tmp17_, NULL, &_inner_error_);
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp19_ = _tmp18_;
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5869 "tracker-miner-flickr.c"
			goto __catch19_g_error;
		}
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (cursor);
#line 825 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		cursor = _tmp19_;
#line 826 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp20_ = cursor;
#line 826 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp21_ = tracker_sparql_cursor_next (_tmp20_, NULL, &_inner_error_);
#line 826 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp22_ = _tmp21_;
#line 826 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5884 "tracker-miner-flickr.c"
			goto __catch19_g_error;
		}
#line 826 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp22_) {
#line 5889 "tracker-miner-flickr.c"
			TrackerSparqlCursor* _tmp23_;
			const gchar* _tmp24_ = NULL;
			gchar* _tmp25_;
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp23_ = cursor;
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp24_ = tracker_sparql_cursor_get_string (_tmp23_, 0, NULL);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp25_ = g_strdup (_tmp24_);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			result = _tmp25_;
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_object_unref0 (cursor);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (insert_query);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (select_query);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (inner_query);
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (created) {
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				*created = _vala_created;
#line 5913 "tracker-miner-flickr.c"
			}
#line 827 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			return result;
#line 5917 "tracker-miner-flickr.c"
		}
#line 829 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp26_ = graph;
#line 829 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_tmp26_ == NULL) {
#line 5923 "tracker-miner-flickr.c"
			const gchar* _tmp27_;
			gchar* _tmp28_ = NULL;
#line 830 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp27_ = inner_query;
#line 830 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp28_ = g_strdup_printf ("insert { _:res %s }", _tmp27_);
#line 830 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (insert_query);
#line 830 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			insert_query = _tmp28_;
#line 5934 "tracker-miner-flickr.c"
		} else {
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			gchar* _tmp31_ = NULL;
#line 832 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp29_ = graph;
#line 832 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp30_ = inner_query;
#line 832 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp31_ = g_strdup_printf ("insert into <%s> { _:res %s }", _tmp29_, _tmp30_);
#line 832 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_g_free0 (insert_query);
#line 832 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			insert_query = _tmp31_;
#line 5949 "tracker-miner-flickr.c"
		}
#line 835 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_vala_created = TRUE;
#line 837 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp32_ = tracker_miner_get_connection ((TrackerMiner*) self);
#line 837 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp33_ = insert_query;
#line 837 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp34_ = tracker_sparql_connection_update_blank (_tmp32_, _tmp33_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 837 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		v = _tmp34_;
#line 837 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 5963 "tracker-miner-flickr.c"
			goto __catch19_g_error;
		}
#line 840 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		key = NULL;
#line 840 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		val = NULL;
#line 842 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp35_ = v;
#line 842 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp36_ = g_variant_iter_new (_tmp35_);
#line 842 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_variant_iter_free0 (iter1);
#line 842 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		iter1 = _tmp36_;
#line 844 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		while (TRUE) {
#line 5980 "tracker-miner-flickr.c"
			GVariantIter* _tmp37_;
			gboolean _tmp38_ = FALSE;
#line 844 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp37_ = iter1;
#line 844 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp38_ = g_variant_iter_next (_tmp37_, "aa{ss}", &iter2, NULL);
#line 844 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			if (!_tmp38_) {
#line 844 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				break;
#line 5991 "tracker-miner-flickr.c"
			}
#line 845 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			while (TRUE) {
#line 5995 "tracker-miner-flickr.c"
				GVariantIter* _tmp39_;
				gboolean _tmp40_ = FALSE;
#line 845 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp39_ = iter2;
#line 845 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				_tmp40_ = g_variant_iter_next (_tmp39_, "a{ss}", &iter3, NULL);
#line 845 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				if (!_tmp40_) {
#line 845 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					break;
#line 6006 "tracker-miner-flickr.c"
				}
#line 846 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
				while (TRUE) {
#line 6010 "tracker-miner-flickr.c"
					GVariantIter* _tmp41_;
					gboolean _tmp42_ = FALSE;
#line 846 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp41_ = iter3;
#line 846 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					_tmp42_ = g_variant_iter_next (_tmp41_, "{ss}", &key, &val, NULL);
#line 846 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					if (!_tmp42_) {
#line 846 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
						break;
#line 6021 "tracker-miner-flickr.c"
					}
#line 848 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
					break;
#line 6025 "tracker-miner-flickr.c"
				}
			}
		}
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		result = val;
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (key);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_variant_iter_free0 (iter3);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_variant_iter_free0 (iter2);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_variant_iter_free0 (iter1);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_variant_unref0 (v);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (cursor);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (insert_query);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (select_query);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_free0 (inner_query);
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (created) {
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			*created = _vala_created;
#line 6053 "tracker-miner-flickr.c"
		}
#line 853 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return result;
#line 6057 "tracker-miner-flickr.c"
	}
	goto __finally19;
	__catch19_g_error:
	{
		GError* tracker_error = NULL;
		GError* _tmp43_;
		GError* _tmp44_;
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		tracker_error = _inner_error_;
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 855 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp43_ = tracker_error;
#line 855 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp44_ = _g_error_copy0 (_tmp43_);
#line 855 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = _tmp44_;
#line 855 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (tracker_error);
#line 6077 "tracker-miner-flickr.c"
		goto __finally19;
	}
	__finally19:
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_propagate_error (error, _inner_error_);
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (cursor);
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (insert_query);
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (select_query);
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (inner_query);
#line 824 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return NULL;
#line 6093 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_update_triple_string (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, const gchar* new_value) {
	TrackerSparqlBuilder* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlBuilder* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlBuilder* _tmp4_;
	const gchar* _tmp5_;
	TrackerSparqlBuilder* _tmp6_;
	const gchar* _tmp7_;
	TrackerSparqlBuilder* _tmp8_;
	TrackerSparqlBuilder* _tmp9_;
	const gchar* _tmp10_;
	TrackerSparqlBuilder* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilder* _tmp13_;
	const gchar* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	const gchar* _tmp16_;
	TrackerSparqlBuilder* _tmp17_;
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (property != NULL);
#line 859 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (new_value != NULL);
#line 860 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = builder;
#line 860 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = graph;
#line 860 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_open (_tmp0_, _tmp1_);
#line 861 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = builder;
#line 861 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = urn;
#line 861 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp2_, _tmp3_);
#line 862 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = builder;
#line 862 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = property;
#line 862 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp4_, _tmp5_);
#line 863 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = builder;
#line 863 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = new_value;
#line 863 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_string (_tmp6_, _tmp7_);
#line 864 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = builder;
#line 864 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_close (_tmp8_);
#line 866 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = builder;
#line 866 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = graph;
#line 866 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_open (_tmp9_, _tmp10_);
#line 867 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = builder;
#line 867 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = urn;
#line 867 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp11_, _tmp12_);
#line 868 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = builder;
#line 868 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = property;
#line 868 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp13_, _tmp14_);
#line 869 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = builder;
#line 869 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = new_value;
#line 869 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_string (_tmp15_, _tmp16_);
#line 870 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = builder;
#line 870 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_close (_tmp17_);
#line 6184 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_update_triple_object (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, const gchar* new_value) {
	TrackerSparqlBuilder* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlBuilder* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlBuilder* _tmp4_;
	const gchar* _tmp5_;
	TrackerSparqlBuilder* _tmp6_;
	const gchar* _tmp7_;
	TrackerSparqlBuilder* _tmp8_;
	TrackerSparqlBuilder* _tmp9_;
	const gchar* _tmp10_;
	TrackerSparqlBuilder* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilder* _tmp13_;
	const gchar* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	const gchar* _tmp16_;
	TrackerSparqlBuilder* _tmp17_;
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (property != NULL);
#line 873 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (new_value != NULL);
#line 874 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = builder;
#line 874 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = graph;
#line 874 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_open (_tmp0_, _tmp1_);
#line 875 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = builder;
#line 875 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = urn;
#line 875 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp2_, _tmp3_);
#line 876 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = builder;
#line 876 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = property;
#line 876 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp4_, _tmp5_);
#line 877 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = builder;
#line 877 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = new_value;
#line 877 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object (_tmp6_, _tmp7_);
#line 878 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = builder;
#line 878 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_close (_tmp8_);
#line 880 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = builder;
#line 880 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = graph;
#line 880 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_open (_tmp9_, _tmp10_);
#line 881 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = builder;
#line 881 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = urn;
#line 881 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp11_, _tmp12_);
#line 882 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = builder;
#line 882 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = property;
#line 882 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp13_, _tmp14_);
#line 883 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = builder;
#line 883 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = new_value;
#line 883 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object (_tmp15_, _tmp16_);
#line 884 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = builder;
#line 884 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_close (_tmp17_);
#line 6275 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_update_triple_double (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, gdouble new_value) {
	TrackerSparqlBuilder* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlBuilder* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlBuilder* _tmp4_;
	const gchar* _tmp5_;
	TrackerSparqlBuilder* _tmp6_;
	gdouble _tmp7_;
	TrackerSparqlBuilder* _tmp8_;
	TrackerSparqlBuilder* _tmp9_;
	const gchar* _tmp10_;
	TrackerSparqlBuilder* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilder* _tmp13_;
	const gchar* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	gdouble _tmp16_;
	TrackerSparqlBuilder* _tmp17_;
#line 887 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 887 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 887 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 887 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 887 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (property != NULL);
#line 888 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = builder;
#line 888 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = graph;
#line 888 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_open (_tmp0_, _tmp1_);
#line 889 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = builder;
#line 889 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = urn;
#line 889 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp2_, _tmp3_);
#line 890 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = builder;
#line 890 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = property;
#line 890 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp4_, _tmp5_);
#line 891 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = builder;
#line 891 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = new_value;
#line 891 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_double (_tmp6_, _tmp7_);
#line 892 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = builder;
#line 892 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_close (_tmp8_);
#line 894 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = builder;
#line 894 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = graph;
#line 894 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_open (_tmp9_, _tmp10_);
#line 895 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = builder;
#line 895 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = urn;
#line 895 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp11_, _tmp12_);
#line 896 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = builder;
#line 896 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = property;
#line 896 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp13_, _tmp14_);
#line 897 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = builder;
#line 897 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = new_value;
#line 897 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_double (_tmp15_, _tmp16_);
#line 898 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = builder;
#line 898 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_close (_tmp17_);
#line 6364 "tracker-miner-flickr.c"
}


void tracker_miner_flickr_update_triple_int64 (TrackerMinerFlickr* self, TrackerSparqlBuilder* builder, const gchar* graph, const gchar* urn, const gchar* property, gint64 new_value) {
	TrackerSparqlBuilder* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlBuilder* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlBuilder* _tmp4_;
	const gchar* _tmp5_;
	TrackerSparqlBuilder* _tmp6_;
	gint64 _tmp7_;
	TrackerSparqlBuilder* _tmp8_;
	TrackerSparqlBuilder* _tmp9_;
	const gchar* _tmp10_;
	TrackerSparqlBuilder* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilder* _tmp13_;
	const gchar* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	gint64 _tmp16_;
	TrackerSparqlBuilder* _tmp17_;
#line 901 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (self != NULL);
#line 901 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (builder != NULL);
#line 901 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (graph != NULL);
#line 901 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (urn != NULL);
#line 901 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_return_if_fail (property != NULL);
#line 902 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = builder;
#line 902 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = graph;
#line 902 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_open (_tmp0_, _tmp1_);
#line 903 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = builder;
#line 903 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = urn;
#line 903 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp2_, _tmp3_);
#line 904 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = builder;
#line 904 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = property;
#line 904 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp4_, _tmp5_);
#line 905 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = builder;
#line 905 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = new_value;
#line 905 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_int64 (_tmp6_, _tmp7_);
#line 906 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp8_ = builder;
#line 906 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_delete_close (_tmp8_);
#line 908 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp9_ = builder;
#line 908 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp10_ = graph;
#line 908 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_open (_tmp9_, _tmp10_);
#line 909 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp11_ = builder;
#line 909 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp12_ = urn;
#line 909 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_subject_iri (_tmp11_, _tmp12_);
#line 910 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp13_ = builder;
#line 910 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp14_ = property;
#line 910 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_predicate (_tmp13_, _tmp14_);
#line 911 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp15_ = builder;
#line 911 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp16_ = new_value;
#line 911 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_object_int64 (_tmp15_, _tmp16_);
#line 912 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp17_ = builder;
#line 912 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_sparql_builder_insert_close (_tmp17_);
#line 6453 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_signal_handler (gint signo) {
	gboolean _tmp0_;
	gint _tmp1_;
	FILE* _tmp3_;
	gint _tmp4_;
#line 919 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = tracker_miner_flickr_in_loop;
#line 919 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_tmp0_) {
#line 920 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		exit (EXIT_FAILURE);
#line 6468 "tracker-miner-flickr.c"
	}
#line 923 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = signo;
#line 923 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	switch (_tmp1_) {
#line 923 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case SIGINT:
#line 923 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		case SIGTERM:
#line 6478 "tracker-miner-flickr.c"
		{
			GMainLoop* _tmp2_;
#line 926 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			tracker_miner_flickr_in_loop = TRUE;
#line 927 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			_tmp2_ = tracker_miner_flickr_main_loop;
#line 927 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			g_main_loop_quit (_tmp2_);
#line 928 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
			break;
#line 6489 "tracker-miner-flickr.c"
		}
		default:
#line 923 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		break;
#line 6494 "tracker-miner-flickr.c"
	}
#line 931 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = stdout;
#line 931 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp4_ = signo;
#line 931 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	fprintf (_tmp3_, "\nReceived signal:%d\n", _tmp4_);
#line 6502 "tracker-miner-flickr.c"
}


static void _tracker_miner_flickr_signal_handler_sighandler_t (gint signal) {
#line 941 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_signal_handler (signal);
#line 6509 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_init_signals (void) {
	struct sigaction act = {0};
	sigset_t empty_mask = {0};
	sigset_t _tmp0_;
	sigset_t _tmp1_;
	struct sigaction _tmp2_;
	struct sigaction _tmp3_;
#line 938 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	memset (&act, 0, sizeof (struct sigaction));
#line 939 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	memset (&empty_mask, 0, sizeof (sigset_t));
#line 940 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = empty_mask;
#line 940 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	sigemptyset (&_tmp0_);
#line 941 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	act.sa_handler = _tracker_miner_flickr_signal_handler_sighandler_t;
#line 942 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp1_ = empty_mask;
#line 942 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	act.sa_mask = _tmp1_;
#line 943 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	act.sa_flags = 0;
#line 945 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp2_ = act;
#line 945 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	sigaction (SIGTERM, &_tmp2_, NULL);
#line 946 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp3_ = act;
#line 946 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	sigaction (SIGINT, &_tmp3_, NULL);
#line 6544 "tracker-miner-flickr.c"
}


gint tracker_miner_flickr_main (gchar** args, int args_length1) {
	gint result = 0;
	TrackerMinerFlickr* flickr_miner = NULL;
	GMainLoop* _tmp5_;
	GMainLoop* _tmp6_;
	TrackerMinerFlickr* _tmp7_;
	GError * _inner_error_ = NULL;
#line 951 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_set_application_name ("Flickr tracker miner");
#line 6557 "tracker-miner-flickr.c"
	{
		void* _tmp0_ = NULL;
		void* _tmp1_;
		TrackerMinerFlickr* _tmp2_;
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp0_ = g_initable_new (TRACKER_TYPE_MINER_FLICKR, NULL, &_inner_error_, NULL);
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp1_ = _tmp0_;
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		if (_inner_error_ != NULL) {
#line 6568 "tracker-miner-flickr.c"
			goto __catch20_g_error;
		}
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp2_ = _g_object_ref0 (TRACKER_IS_MINER_FLICKR (_tmp1_) ? ((TrackerMinerFlickr*) _tmp1_) : NULL);
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (flickr_miner);
#line 955 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		flickr_miner = _tmp2_;
#line 6577 "tracker-miner-flickr.c"
	}
	goto __finally20;
	__catch20_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		e = _inner_error_;
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_inner_error_ = NULL;
#line 957 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp3_ = e;
#line 957 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_tmp4_ = _tmp3_->message;
#line 957 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_printerr ("Couldn't create new Flickr Miner: '%s', exiting...\n", _tmp4_);
#line 959 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		result = -1;
#line 959 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_error_free0 (e);
#line 959 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (flickr_miner);
#line 959 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return result;
#line 6603 "tracker-miner-flickr.c"
	}
	__finally20:
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	if (_inner_error_ != NULL) {
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		_g_object_unref0 (flickr_miner);
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		g_clear_error (&_inner_error_);
#line 954 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
		return 0;
#line 6616 "tracker-miner-flickr.c"
	}
#line 962 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_init_signals ();
#line 964 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp5_ = g_main_loop_new (NULL, FALSE);
#line 964 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_main_loop_unref0 (tracker_miner_flickr_main_loop);
#line 964 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_main_loop = _tmp5_;
#line 965 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp6_ = tracker_miner_flickr_main_loop;
#line 965 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_main_loop_run (_tmp6_);
#line 967 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp7_ = flickr_miner;
#line 967 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_shutdown (_tmp7_);
#line 968 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	result = 0;
#line 968 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (flickr_miner);
#line 968 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return result;
#line 6640 "tracker-miner-flickr.c"
}


int main (int argc, char ** argv) {
#line 950 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_type_init ();
#line 950 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return tracker_miner_flickr_main (argv, argc);
#line 6649 "tracker-miner-flickr.c"
}


TrackerMinerFlickr* tracker_miner_flickr_construct (GType object_type) {
	TrackerMinerFlickr * self = NULL;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = (TrackerMinerFlickr*) g_object_new (object_type, NULL);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return self;
#line 6659 "tracker-miner-flickr.c"
}


TrackerMinerFlickr* tracker_miner_flickr_new (void) {
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return tracker_miner_flickr_construct (TRACKER_TYPE_MINER_FLICKR);
#line 6666 "tracker-miner-flickr.c"
}


static GObject * tracker_miner_flickr_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	TrackerMinerFlickr * self;
	RestProxy* _tmp0_;
#line 91 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	parent_class = G_OBJECT_CLASS (tracker_miner_flickr_parent_class);
#line 91 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 91 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = TRACKER_MINER_FLICKR (obj);
#line 92 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) self, "name", TRACKER_MINER_FLICKR_MINER_NAME, NULL);
#line 93 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMinerWeb*) self, "associated", FALSE, NULL);
#line 94 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) self, "status", "Not authenticated", NULL);
#line 95 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_object_set ((TrackerMiner*) self, "progress", 1.0, NULL);
#line 97 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_tmp0_ = rest_proxy_new (TRACKER_MINER_FLICKR_FLICKR_REST_URL, FALSE);
#line 97 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (self->priv->rest);
#line 97 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self->priv->rest = _tmp0_;
#line 91 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	return obj;
#line 6697 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_class_init (TrackerMinerFlickrClass * klass) {
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_parent_class = g_type_class_peek_parent (klass);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	g_type_class_add_private (klass, sizeof (TrackerMinerFlickrPrivate));
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	TRACKER_MINER_WEB_CLASS (klass)->get_association_data = tracker_miner_flickr_real_get_association_data;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	TRACKER_MINER_WEB_CLASS (klass)->associate = tracker_miner_flickr_real_associate;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	TRACKER_MINER_WEB_CLASS (klass)->authenticate = tracker_miner_flickr_real_authenticate;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	TRACKER_MINER_WEB_CLASS (klass)->dissociate = tracker_miner_flickr_real_dissociate;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	G_OBJECT_CLASS (klass)->constructor = tracker_miner_flickr_constructor;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_miner_flickr_finalize;
#line 6718 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_g_initable_interface_init (GInitableIface * iface) {
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	tracker_miner_flickr_g_initable_parent_iface = g_type_interface_peek_parent (iface);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	iface->init = (gboolean (*)(GInitable*, GCancellable*, GError**)) tracker_miner_flickr_real_init;
#line 6727 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_instance_init (TrackerMinerFlickr * self) {
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self->priv = TRACKER_MINER_FLICKR_GET_PRIVATE (self);
#line 6734 "tracker-miner-flickr.c"
}


static void tracker_miner_flickr_finalize (GObject* obj) {
	TrackerMinerFlickr * self;
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	self = TRACKER_MINER_FLICKR (obj);
#line 79 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_object_unref0 (self->priv->rest);
#line 82 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (self->priv->frob);
#line 84 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (self->priv->auth_token);
#line 86 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	_g_free0 (self->priv->user_id);
#line 35 "/home/martyn/Source/tracker/src/miners/flickr/tracker-miner-flickr.vala"
	G_OBJECT_CLASS (tracker_miner_flickr_parent_class)->finalize (obj);
#line 6752 "tracker-miner-flickr.c"
}


GType tracker_miner_flickr_get_type (void) {
	static volatile gsize tracker_miner_flickr_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_miner_flickr_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerMinerFlickrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_miner_flickr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerMinerFlickr), 0, (GInstanceInitFunc) tracker_miner_flickr_instance_init, NULL };
		static const GInterfaceInfo g_initable_info = { (GInterfaceInitFunc) tracker_miner_flickr_g_initable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType tracker_miner_flickr_type_id;
		tracker_miner_flickr_type_id = g_type_register_static (TRACKER_TYPE_MINER_WEB, "TrackerMinerFlickr", &g_define_type_info, 0);
		g_type_add_interface_static (tracker_miner_flickr_type_id, G_TYPE_INITABLE, &g_initable_info);
		g_once_init_leave (&tracker_miner_flickr_type_id__volatile, tracker_miner_flickr_type_id);
	}
	return tracker_miner_flickr_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



