/* RESTSupport.c generated by valac 0.40.4, the Vala compiler
 * generated from RESTSupport.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <libsoup/soup.h>
#include "shotwell-plugin-dev-1.0.h"
#include <gee.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>

#define _g_hmac_unref0(var) ((var == NULL) ? NULL : (var = (g_hmac_unref (var), NULL)))

#define PUBLISHING_REST_SUPPORT_TYPE_SESSION (publishing_rest_support_session_get_type ())
#define PUBLISHING_REST_SUPPORT_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession))
#define PUBLISHING_REST_SUPPORT_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSessionClass))
#define PUBLISHING_REST_SUPPORT_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION))
#define PUBLISHING_REST_SUPPORT_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_SESSION))
#define PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSessionClass))

typedef struct _PublishingRESTSupportSession PublishingRESTSupportSession;
typedef struct _PublishingRESTSupportSessionClass PublishingRESTSupportSessionClass;
typedef struct _PublishingRESTSupportSessionPrivate PublishingRESTSupportSessionPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _PublishingRESTSupportParamSpecSession PublishingRESTSupportParamSpecSession;
enum  {
	PUBLISHING_REST_SUPPORT_SESSION_WIRE_MESSAGE_UNQUEUED_SIGNAL,
	PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATED_SIGNAL,
	PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATION_FAILED_SIGNAL,
	PUBLISHING_REST_SUPPORT_SESSION_NUM_SIGNALS
};
static guint publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_NUM_SIGNALS] = {0};

#define PUBLISHING_REST_SUPPORT_TYPE_HTTP_METHOD (publishing_rest_support_http_method_get_type ())

#define PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT (publishing_rest_support_argument_get_type ())
#define PUBLISHING_REST_SUPPORT_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgument))
#define PUBLISHING_REST_SUPPORT_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgumentClass))
#define PUBLISHING_REST_SUPPORT_IS_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT))
#define PUBLISHING_REST_SUPPORT_IS_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT))
#define PUBLISHING_REST_SUPPORT_ARGUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgumentClass))

typedef struct _PublishingRESTSupportArgument PublishingRESTSupportArgument;
typedef struct _PublishingRESTSupportArgumentClass PublishingRESTSupportArgumentClass;
typedef struct _PublishingRESTSupportArgumentPrivate PublishingRESTSupportArgumentPrivate;
#define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _PublishingRESTSupportParamSpecArgument PublishingRESTSupportParamSpecArgument;

#define PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION (publishing_rest_support_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction))
#define PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransactionClass))
#define PUBLISHING_REST_SUPPORT_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransactionClass))

typedef struct _PublishingRESTSupportTransaction PublishingRESTSupportTransaction;
typedef struct _PublishingRESTSupportTransactionClass PublishingRESTSupportTransactionClass;
typedef struct _PublishingRESTSupportTransactionPrivate PublishingRESTSupportTransactionPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __vala_SoupURI_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupURI_free (var), NULL)))
typedef struct _PublishingRESTSupportParamSpecTransaction PublishingRESTSupportParamSpecTransaction;
enum  {
	PUBLISHING_REST_SUPPORT_TRANSACTION_CHUNK_TRANSMITTED_SIGNAL,
	PUBLISHING_REST_SUPPORT_TRANSACTION_NETWORK_ERROR_SIGNAL,
	PUBLISHING_REST_SUPPORT_TRANSACTION_COMPLETED_SIGNAL,
	PUBLISHING_REST_SUPPORT_TRANSACTION_NUM_SIGNALS
};
static guint publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_NUM_SIGNALS] = {0};

#define PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION (publishing_rest_support_upload_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction))
#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransactionClass))
#define PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransactionClass))

typedef struct _PublishingRESTSupportUploadTransaction PublishingRESTSupportUploadTransaction;
typedef struct _PublishingRESTSupportUploadTransactionClass PublishingRESTSupportUploadTransactionClass;
typedef struct _PublishingRESTSupportUploadTransactionPrivate PublishingRESTSupportUploadTransactionPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __vala_SoupMultipart_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupMultipart_free (var), NULL)))
#define __vala_SoupBuffer_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupBuffer_free (var), NULL)))

#define PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT (publishing_rest_support_xml_document_get_type ())
#define PUBLISHING_REST_SUPPORT_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocument))
#define PUBLISHING_REST_SUPPORT_XML_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocumentClass))
#define PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT))
#define PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT))
#define PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocumentClass))

typedef struct _PublishingRESTSupportXmlDocument PublishingRESTSupportXmlDocument;
typedef struct _PublishingRESTSupportXmlDocumentClass PublishingRESTSupportXmlDocumentClass;
typedef struct _PublishingRESTSupportXmlDocumentPrivate PublishingRESTSupportXmlDocumentPrivate;
#define _publishing_rest_support_xml_document_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_xml_document_unref (var), NULL)))
typedef struct _PublishingRESTSupportParamSpecXmlDocument PublishingRESTSupportParamSpecXmlDocument;

#define PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER (publishing_rest_support_batch_uploader_get_type ())
#define PUBLISHING_REST_SUPPORT_BATCH_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader))
#define PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploaderClass))
#define PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER))
#define PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER))
#define PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploaderClass))

typedef struct _PublishingRESTSupportBatchUploader PublishingRESTSupportBatchUploader;
typedef struct _PublishingRESTSupportBatchUploaderClass PublishingRESTSupportBatchUploaderClass;
typedef struct _PublishingRESTSupportBatchUploaderPrivate PublishingRESTSupportBatchUploaderPrivate;
#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL)))
#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL)))
typedef struct _PublishingRESTSupportParamSpecBatchUploader PublishingRESTSupportParamSpecBatchUploader;
enum  {
	PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_COMPLETE_SIGNAL,
	PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_ERROR_SIGNAL,
	PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_NUM_SIGNALS
};
static guint publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_NUM_SIGNALS] = {0};

#define PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION (publishing_rest_support_google_session_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession))
#define PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSessionClass))
#define PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION))
#define PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSessionClass))

typedef struct _PublishingRESTSupportGoogleSession PublishingRESTSupportGoogleSession;
typedef struct _PublishingRESTSupportGoogleSessionClass PublishingRESTSupportGoogleSessionClass;
typedef struct _PublishingRESTSupportGoogleSessionPrivate PublishingRESTSupportGoogleSessionPrivate;

#define PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER (publishing_rest_support_google_publisher_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisherClass))
#define PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER))
#define PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisherClass))

typedef struct _PublishingRESTSupportGooglePublisher PublishingRESTSupportGooglePublisher;
typedef struct _PublishingRESTSupportGooglePublisherClass PublishingRESTSupportGooglePublisherClass;
typedef struct _PublishingRESTSupportGooglePublisherPrivate PublishingRESTSupportGooglePublisherPrivate;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL (publishing_rest_support_google_publisher_google_session_impl_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GOOGLE_SESSION_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GOOGLE_SESSION_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImplClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_GOOGLE_SESSION_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_GOOGLE_SESSION_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GOOGLE_SESSION_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImplClass))

typedef struct _PublishingRESTSupportGooglePublisherGoogleSessionImpl PublishingRESTSupportGooglePublisherGoogleSessionImpl;
typedef struct _PublishingRESTSupportGooglePublisherGoogleSessionImplClass PublishingRESTSupportGooglePublisherGoogleSessionImplClass;
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_0_PROPERTY,
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_NUM_PROPERTIES
};
static GParamSpec* publishing_rest_support_google_publisher_properties[PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _PublishingRESTSupportGooglePublisherGoogleSessionImplPrivate PublishingRESTSupportGooglePublisherGoogleSessionImplPrivate;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION (publishing_rest_support_google_publisher_authenticated_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_AUTHENTICATED_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, PublishingRESTSupportGooglePublisherAuthenticatedTransaction))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_AUTHENTICATED_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_AUTHENTICATED_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_AUTHENTICATED_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_AUTHENTICATED_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass))

typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransaction PublishingRESTSupportGooglePublisherAuthenticatedTransaction;
typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass;
typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _PublishingRESTSupportSession {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingRESTSupportSessionPrivate * priv;
};

struct _PublishingRESTSupportSessionClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingRESTSupportSession *self);
	gboolean (*is_authenticated) (PublishingRESTSupportSession* self);
};

struct _PublishingRESTSupportSessionPrivate {
	gchar* endpoint_url;
	SoupSession* soup_session;
	gboolean transactions_stopped;
};

struct _PublishingRESTSupportParamSpecSession {
	GParamSpec parent_instance;
};

typedef enum  {
	PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET,
	PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST,
	PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT
} PublishingRESTSupportHttpMethod;

struct _PublishingRESTSupportArgument {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingRESTSupportArgumentPrivate * priv;
	gchar* key;
	gchar* value;
};

struct _PublishingRESTSupportArgumentClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingRESTSupportArgument *self);
};

struct _PublishingRESTSupportParamSpecArgument {
	GParamSpec parent_instance;
};

struct _PublishingRESTSupportTransaction {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingRESTSupportTransactionPrivate * priv;
};

struct _PublishingRESTSupportTransactionClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingRESTSupportTransaction *self);
	void (*add_header) (PublishingRESTSupportTransaction* self, const gchar* key, const gchar* value);
	void (*execute) (PublishingRESTSupportTransaction* self, GError** error);
};

struct _PublishingRESTSupportTransactionPrivate {
	PublishingRESTSupportArgument** arguments;
	gint arguments_length1;
	gint _arguments_size_;
	gboolean is_executed;
	PublishingRESTSupportSession* parent_session;
	SoupMessage* message;
	gint bytes_written;
	GError* err;
	gchar* endpoint_url;
	gboolean use_custom_payload;
};

struct _PublishingRESTSupportParamSpecTransaction {
	GParamSpec parent_instance;
};

struct _PublishingRESTSupportUploadTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingRESTSupportUploadTransactionPrivate * priv;
	GHashTable* binary_disposition_table;
	SpitPublishingPublishable* publishable;
	gchar* mime_type;
	GeeHashMap* message_headers;
};

struct _PublishingRESTSupportUploadTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingRESTSupportXmlDocument {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingRESTSupportXmlDocumentPrivate * priv;
};

struct _PublishingRESTSupportXmlDocumentClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingRESTSupportXmlDocument *self);
};

struct _PublishingRESTSupportXmlDocumentPrivate {
	xmlDoc* document;
};

typedef gchar* (*PublishingRESTSupportXmlDocumentCheckForErrorResponse) (PublishingRESTSupportXmlDocument* doc, void* user_data);
struct _PublishingRESTSupportParamSpecXmlDocument {
	GParamSpec parent_instance;
};

struct _PublishingRESTSupportBatchUploader {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingRESTSupportBatchUploaderPrivate * priv;
};

struct _PublishingRESTSupportBatchUploaderClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingRESTSupportBatchUploader *self);
	PublishingRESTSupportTransaction* (*create_transaction) (PublishingRESTSupportBatchUploader* self, SpitPublishingPublishable* publishable);
};

struct _PublishingRESTSupportBatchUploaderPrivate {
	gint current_file;
	SpitPublishingPublishable** publishables;
	gint publishables_length1;
	gint _publishables_size_;
	PublishingRESTSupportSession* session;
	SpitPublishingProgressCallback status_updated;
	gpointer status_updated_target;
};

struct _PublishingRESTSupportParamSpecBatchUploader {
	GParamSpec parent_instance;
};

struct _PublishingRESTSupportGoogleSession {
	PublishingRESTSupportSession parent_instance;
	PublishingRESTSupportGoogleSessionPrivate * priv;
};

struct _PublishingRESTSupportGoogleSessionClass {
	PublishingRESTSupportSessionClass parent_class;
	gchar* (*get_user_name) (PublishingRESTSupportGoogleSession* self);
	gchar* (*get_access_token) (PublishingRESTSupportGoogleSession* self);
	void (*deauthenticate) (PublishingRESTSupportGoogleSession* self);
};

struct _PublishingRESTSupportGooglePublisher {
	GObject parent_instance;
	PublishingRESTSupportGooglePublisherPrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherClass {
	GObjectClass parent_class;
	SpitPublishingAuthenticator* (*get_authenticator) (PublishingRESTSupportGooglePublisher* self);
	void (*on_login_flow_complete) (PublishingRESTSupportGooglePublisher* self);
	void (*do_logout) (PublishingRESTSupportGooglePublisher* self);
	gboolean (*is_running) (PublishingRESTSupportGooglePublisher* self);
	void (*start) (PublishingRESTSupportGooglePublisher* self);
	void (*stop) (PublishingRESTSupportGooglePublisher* self);
};

struct _PublishingRESTSupportGooglePublisherPrivate {
	gchar* scope;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* session;
	SpitPublishingPluginHost* host;
	SpitPublishingService* service;
	SpitPublishingAuthenticator* authenticator;
};

struct _PublishingRESTSupportGooglePublisherGoogleSessionImpl {
	PublishingRESTSupportGoogleSession parent_instance;
	PublishingRESTSupportGooglePublisherGoogleSessionImplPrivate * priv;
	gchar* access_token;
	gchar* user_name;
	gchar* refresh_token;
};

struct _PublishingRESTSupportGooglePublisherGoogleSessionImplClass {
	PublishingRESTSupportGoogleSessionClass parent_class;
};

struct _PublishingRESTSupportGooglePublisherAuthenticatedTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};


static gpointer publishing_rest_support_session_parent_class = NULL;
static gpointer publishing_rest_support_argument_parent_class = NULL;
static gpointer publishing_rest_support_transaction_parent_class = NULL;
static gpointer publishing_rest_support_upload_transaction_parent_class = NULL;
static gpointer publishing_rest_support_xml_document_parent_class = NULL;
static gpointer publishing_rest_support_batch_uploader_parent_class = NULL;
static gpointer publishing_rest_support_google_session_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_google_session_impl_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_authenticated_transaction_parent_class = NULL;
static SpitPublishingPublisherIface * publishing_rest_support_google_publisher_spit_publishing_publisher_parent_iface = NULL;

#define PUBLISHING_REST_SUPPORT_SHA1_HMAC_LENGTH 20
gchar* publishing_rest_support_hmac_sha1 (const gchar* key,
                                          const gchar* message);
gpointer publishing_rest_support_session_ref (gpointer instance);
void publishing_rest_support_session_unref (gpointer instance);
GParamSpec* publishing_rest_support_param_spec_session (const gchar* name,
                                                        const gchar* nick,
                                                        const gchar* blurb,
                                                        GType object_type,
                                                        GParamFlags flags);
void publishing_rest_support_value_set_session (GValue* value,
                                                gpointer v_object);
void publishing_rest_support_value_take_session (GValue* value,
                                                 gpointer v_object);
gpointer publishing_rest_support_value_get_session (const GValue* value);
GType publishing_rest_support_session_get_type (void) G_GNUC_CONST;
#define PUBLISHING_REST_SUPPORT_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSessionPrivate))
PublishingRESTSupportSession* publishing_rest_support_session_construct (GType object_type,
                                                                         const gchar* endpoint_url);
void publishing_rest_support_session_notify_wire_message_unqueued (PublishingRESTSupportSession* self,
                                                                   SoupMessage* message);
void publishing_rest_support_session_notify_authenticated (PublishingRESTSupportSession* self);
void publishing_rest_support_session_notify_authentication_failed (PublishingRESTSupportSession* self,
                                                                   GError* err);
gboolean publishing_rest_support_session_is_authenticated (PublishingRESTSupportSession* self);
static gboolean publishing_rest_support_session_real_is_authenticated (PublishingRESTSupportSession* self);
gchar* publishing_rest_support_session_get_endpoint_url (PublishingRESTSupportSession* self);
void publishing_rest_support_session_stop_transactions (PublishingRESTSupportSession* self);
gboolean publishing_rest_support_session_are_transactions_stopped (PublishingRESTSupportSession* self);
void publishing_rest_support_session_send_wire_message (PublishingRESTSupportSession* self,
                                                        SoupMessage* message);
static void _publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued (SoupSession* _sender,
                                                                                                  SoupMessage* msg,
                                                                                                  gpointer self);
void publishing_rest_support_session_set_insecure (PublishingRESTSupportSession* self);
static void publishing_rest_support_session_finalize (PublishingRESTSupportSession * obj);
GType publishing_rest_support_http_method_get_type (void) G_GNUC_CONST;
gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpMethod self);
PublishingRESTSupportHttpMethod publishing_rest_support_http_method_from_string (const gchar* str);
gpointer publishing_rest_support_argument_ref (gpointer instance);
void publishing_rest_support_argument_unref (gpointer instance);
GParamSpec* publishing_rest_support_param_spec_argument (const gchar* name,
                                                         const gchar* nick,
                                                         const gchar* blurb,
                                                         GType object_type,
                                                         GParamFlags flags);
void publishing_rest_support_value_set_argument (GValue* value,
                                                 gpointer v_object);
void publishing_rest_support_value_take_argument (GValue* value,
                                                  gpointer v_object);
gpointer publishing_rest_support_value_get_argument (const GValue* value);
GType publishing_rest_support_argument_get_type (void) G_GNUC_CONST;
PublishingRESTSupportArgument* publishing_rest_support_argument_new (const gchar* key,
                                                                     const gchar* value);
PublishingRESTSupportArgument* publishing_rest_support_argument_construct (GType object_type,
                                                                           const gchar* key,
                                                                           const gchar* value);
gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args,
                                                        int args_length1,
                                                        gboolean escape,
                                                        const gchar* separator);
gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self,
                                                   gboolean escape);
gint publishing_rest_support_argument_compare (PublishingRESTSupportArgument* arg1,
                                               PublishingRESTSupportArgument* arg2);
PublishingRESTSupportArgument** publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray,
                                                                       int inputArray_length1,
                                                                       int* result_length1);
static gint _publishing_rest_support_argument_compare_gcompare_data_func (gconstpointer a,
                                                                   gconstpointer b,
                                                                   gpointer self);
static void publishing_rest_support_argument_finalize (PublishingRESTSupportArgument * obj);
gpointer publishing_rest_support_transaction_ref (gpointer instance);
void publishing_rest_support_transaction_unref (gpointer instance);
GParamSpec* publishing_rest_support_param_spec_transaction (const gchar* name,
                                                            const gchar* nick,
                                                            const gchar* blurb,
                                                            GType object_type,
                                                            GParamFlags flags);
void publishing_rest_support_value_set_transaction (GValue* value,
                                                    gpointer v_object);
void publishing_rest_support_value_take_transaction (GValue* value,
                                                     gpointer v_object);
gpointer publishing_rest_support_value_get_transaction (const GValue* value);
GType publishing_rest_support_transaction_get_type (void) G_GNUC_CONST;
#define PUBLISHING_REST_SUPPORT_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransactionPrivate))
PublishingRESTSupportTransaction* publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session,
                                                                           PublishingRESTSupportHttpMethod method);
PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct (GType object_type,
                                                                                 PublishingRESTSupportSession* parent_session,
                                                                                 PublishingRESTSupportHttpMethod method);
static void publishing_rest_support_transaction_on_wrote_body_data (PublishingRESTSupportTransaction* self,
                                                             SoupBuffer* written_data);
static void _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data (SoupMessage* _sender,
                                                                                           SoupBuffer* chunk,
                                                                                           gpointer self);
PublishingRESTSupportTransaction* publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session,
                                                                                             const gchar* endpoint_url,
                                                                                             PublishingRESTSupportHttpMethod method);
PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct_with_endpoint_url (GType object_type,
                                                                                                   PublishingRESTSupportSession* parent_session,
                                                                                                   const gchar* endpoint_url,
                                                                                                   PublishingRESTSupportHttpMethod method);
static void publishing_rest_support_transaction_on_message_unqueued (PublishingRESTSupportTransaction* self,
                                                              SoupMessage* message);
void publishing_rest_support_transaction_check_response (PublishingRESTSupportTransaction* self,
                                                         SoupMessage* message,
                                                         GError** error);
gchar* publishing_rest_support_transaction_get_response (PublishingRESTSupportTransaction* self);
gchar* publishing_rest_support_transaction_detailed_error_from_tls_flags (PublishingRESTSupportTransaction* self,
                                                                          GTlsCertificate* * cert);
gchar* publishing_rest_support_transaction_get_endpoint_url (PublishingRESTSupportTransaction* self);
PublishingRESTSupportArgument** publishing_rest_support_transaction_get_arguments (PublishingRESTSupportTransaction* self,
                                                                                   int* result_length1);
static PublishingRESTSupportArgument** _vala_array_dup1 (PublishingRESTSupportArgument** self,
                                                  int length);
PublishingRESTSupportArgument** publishing_rest_support_transaction_get_sorted_arguments (PublishingRESTSupportTransaction* self,
                                                                                          int* result_length1);
void publishing_rest_support_transaction_set_is_executed (PublishingRESTSupportTransaction* self,
                                                          gboolean is_executed);
void publishing_rest_support_transaction_send (PublishingRESTSupportTransaction* self,
                                               GError** error);
static void _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued (PublishingRESTSupportSession* _sender,
                                                                                                                     SoupMessage* message,
                                                                                                                     gpointer self);
PublishingRESTSupportHttpMethod publishing_rest_support_transaction_get_method (PublishingRESTSupportTransaction* self);
void publishing_rest_support_transaction_add_header (PublishingRESTSupportTransaction* self,
                                                     const gchar* key,
                                                     const gchar* value);
static void publishing_rest_support_transaction_real_add_header (PublishingRESTSupportTransaction* self,
                                                          const gchar* key,
                                                          const gchar* value);
void publishing_rest_support_transaction_set_custom_payload (PublishingRESTSupportTransaction* self,
                                                             const gchar* custom_payload,
                                                             const gchar* payload_content_type,
                                                             gulong payload_length);
void publishing_rest_support_transaction_set_message (PublishingRESTSupportTransaction* self,
                                                      SoupMessage* message);
gboolean publishing_rest_support_transaction_get_is_executed (PublishingRESTSupportTransaction* self);
guint publishing_rest_support_transaction_get_status_code (PublishingRESTSupportTransaction* self);
void publishing_rest_support_transaction_execute (PublishingRESTSupportTransaction* self,
                                                  GError** error);
static void publishing_rest_support_transaction_real_execute (PublishingRESTSupportTransaction* self,
                                                       GError** error);
static void _vala_SoupURI_free (SoupURI* self);
SoupMessageHeaders* publishing_rest_support_transaction_get_response_headers (PublishingRESTSupportTransaction* self);
SoupMessage* publishing_rest_support_transaction_get_message (PublishingRESTSupportTransaction* self);
void publishing_rest_support_transaction_add_argument (PublishingRESTSupportTransaction* self,
                                                       const gchar* name,
                                                       const gchar* value);
static void _vala_array_add1 (PublishingRESTSupportArgument** * array,
                       int* length,
                       int* size,
                       PublishingRESTSupportArgument* value);
PublishingRESTSupportSession* publishing_rest_support_transaction_get_parent_session (PublishingRESTSupportTransaction* self);
static void g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data);
static void publishing_rest_support_transaction_finalize (PublishingRESTSupportTransaction * obj);
GType publishing_rest_support_upload_transaction_get_type (void) G_GNUC_CONST;
PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new (PublishingRESTSupportSession* session,
                                                                                        SpitPublishingPublishable* publishable);
PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_construct (GType object_type,
                                                                                              PublishingRESTSupportSession* session,
                                                                                              SpitPublishingPublishable* publishable);
static gchar* publishing_rest_support_upload_transaction_media_type_to_mime_type (SpitPublishingPublisherMediaType media_type);
static GHashTable* publishing_rest_support_upload_transaction_create_default_binary_disposition_table (PublishingRESTSupportUploadTransaction* self);
PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session,
                                                                                                          SpitPublishingPublishable* publishable,
                                                                                                          const gchar* endpoint_url);
PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_construct_with_endpoint_url (GType object_type,
                                                                                                                PublishingRESTSupportSession* session,
                                                                                                                SpitPublishingPublishable* publishable,
                                                                                                                const gchar* endpoint_url);
static void publishing_rest_support_upload_transaction_real_add_header (PublishingRESTSupportTransaction* base,
                                                                 const gchar* key,
                                                                 const gchar* value);
const gchar* spit_publishing_publisher_media_type_to_string (SpitPublishingPublisherMediaType self);
static void _g_free0_ (gpointer var);
void publishing_rest_support_upload_transaction_set_binary_disposition_table (PublishingRESTSupportUploadTransaction* self,
                                                                              GHashTable* new_disp_table);
static void publishing_rest_support_upload_transaction_real_execute (PublishingRESTSupportTransaction* base,
                                                              GError** error);
static void _vala_SoupMultipart_free (SoupMultipart* self);
static void _vala_SoupBuffer_free (SoupBuffer* self);
static void publishing_rest_support_upload_transaction_finalize (PublishingRESTSupportTransaction * obj);
gpointer publishing_rest_support_xml_document_ref (gpointer instance);
void publishing_rest_support_xml_document_unref (gpointer instance);
GParamSpec* publishing_rest_support_param_spec_xml_document (const gchar* name,
                                                             const gchar* nick,
                                                             const gchar* blurb,
                                                             GType object_type,
                                                             GParamFlags flags);
void publishing_rest_support_value_set_xml_document (GValue* value,
                                                     gpointer v_object);
void publishing_rest_support_value_take_xml_document (GValue* value,
                                                      gpointer v_object);
gpointer publishing_rest_support_value_get_xml_document (const GValue* value);
GType publishing_rest_support_xml_document_get_type (void) G_GNUC_CONST;
#define PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocumentPrivate))
static PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_new (xmlDoc* doc);
static PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_construct (GType object_type,
                                                                                  xmlDoc* doc);
xmlNode* publishing_rest_support_xml_document_get_root_node (PublishingRESTSupportXmlDocument* self);
xmlNode* publishing_rest_support_xml_document_get_named_child (PublishingRESTSupportXmlDocument* self,
                                                               xmlNode* parent,
                                                               const gchar* child_name,
                                                               GError** error);
gchar* publishing_rest_support_xml_document_get_property_value (PublishingRESTSupportXmlDocument* self,
                                                                xmlNode* node,
                                                                const gchar* property_key,
                                                                GError** error);
PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_parse_string (const gchar* input_string,
                                                                                     PublishingRESTSupportXmlDocumentCheckForErrorResponse check_for_error_response,
                                                                                     void* check_for_error_response_target,
                                                                                     GError** error);
static void publishing_rest_support_xml_document_finalize (PublishingRESTSupportXmlDocument * obj);
gchar* publishing_rest_support_decimal_entity_encode (const gchar* source);
gpointer publishing_rest_support_batch_uploader_ref (gpointer instance);
void publishing_rest_support_batch_uploader_unref (gpointer instance);
GParamSpec* publishing_rest_support_param_spec_batch_uploader (const gchar* name,
                                                               const gchar* nick,
                                                               const gchar* blurb,
                                                               GType object_type,
                                                               GParamFlags flags);
void publishing_rest_support_value_set_batch_uploader (GValue* value,
                                                       gpointer v_object);
void publishing_rest_support_value_take_batch_uploader (GValue* value,
                                                        gpointer v_object);
gpointer publishing_rest_support_value_get_batch_uploader (const GValue* value);
GType publishing_rest_support_batch_uploader_get_type (void) G_GNUC_CONST;
#define PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploaderPrivate))
PublishingRESTSupportBatchUploader* publishing_rest_support_batch_uploader_construct (GType object_type,
                                                                                      PublishingRESTSupportSession* session,
                                                                                      SpitPublishingPublishable** publishables,
                                                                                      int publishables_length1);
static SpitPublishingPublishable** _vala_array_dup2 (SpitPublishingPublishable** self,
                                              int length);
static void publishing_rest_support_batch_uploader_send_files (PublishingRESTSupportBatchUploader* self);
PublishingRESTSupportTransaction* publishing_rest_support_batch_uploader_create_transaction (PublishingRESTSupportBatchUploader* self,
                                                                                             SpitPublishingPublishable* publishable);
static void publishing_rest_support_batch_uploader_on_chunk_transmitted (PublishingRESTSupportBatchUploader* self,
                                                                  gint bytes_written_so_far,
                                                                  gint total_bytes);
static void _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted (PublishingRESTSupportTransaction* _sender,
                                                                                                                         gint bytes_written_so_far,
                                                                                                                         gint total_bytes,
                                                                                                                         gpointer self);
PublishingRESTSupportSession* publishing_rest_support_batch_uploader_get_session (PublishingRESTSupportBatchUploader* self);
SpitPublishingPublishable* publishing_rest_support_batch_uploader_get_current_publishable (PublishingRESTSupportBatchUploader* self);
static PublishingRESTSupportTransaction* publishing_rest_support_batch_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* self,
                                                                                                  SpitPublishingPublishable* publishable);
void publishing_rest_support_batch_uploader_upload (PublishingRESTSupportBatchUploader* self,
                                                    SpitPublishingProgressCallback status_updated,
                                                    void* status_updated_target);
static void publishing_rest_support_batch_uploader_finalize (PublishingRESTSupportBatchUploader * obj);
gchar* publishing_rest_support_asciify_string (const gchar* s);
GType publishing_rest_support_google_session_get_type (void) G_GNUC_CONST;
gchar* publishing_rest_support_google_session_get_user_name (PublishingRESTSupportGoogleSession* self);
static gchar* publishing_rest_support_google_session_real_get_user_name (PublishingRESTSupportGoogleSession* self);
gchar* publishing_rest_support_google_session_get_access_token (PublishingRESTSupportGoogleSession* self);
static gchar* publishing_rest_support_google_session_real_get_access_token (PublishingRESTSupportGoogleSession* self);
void publishing_rest_support_google_session_deauthenticate (PublishingRESTSupportGoogleSession* self);
static void publishing_rest_support_google_session_real_deauthenticate (PublishingRESTSupportGoogleSession* self);
PublishingRESTSupportGoogleSession* publishing_rest_support_google_session_construct (GType object_type);
GType publishing_rest_support_google_publisher_get_type (void) G_GNUC_CONST;
static GType publishing_rest_support_google_publisher_google_session_impl_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisherPrivate))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_ID "1073902228337-gm4uf5etk25s0hnnm0g7uv2tm2bm1j0b.apps.googleusercontent." \
"com"
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_SECRET "_kA4RZz72xqed4DqfO7xMmMN"
PublishingRESTSupportGooglePublisher* publishing_rest_support_google_publisher_construct (GType object_type,
                                                                                          SpitPublishingService* service,
                                                                                          SpitPublishingPluginHost* host,
                                                                                          const gchar* scope);
static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_new (void);
static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_construct (GType object_type);
SpitPublishingAuthenticator* publishing_rest_support_google_publisher_get_authenticator (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_on_authenticator_authenticated (PublishingRESTSupportGooglePublisher* self);
static void _publishing_rest_support_google_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender,
                                                                                                                           gpointer self);
static SpitPublishingAuthenticator* publishing_rest_support_google_publisher_real_get_authenticator (PublishingRESTSupportGooglePublisher* self);
SpitPublishingPluginHost* publishing_rest_support_google_publisher_get_host (PublishingRESTSupportGooglePublisher* self);
PublishingRESTSupportGoogleSession* publishing_rest_support_google_publisher_get_session (PublishingRESTSupportGooglePublisher* self);
void publishing_rest_support_google_publisher_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self);
void publishing_rest_support_google_publisher_do_logout (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* self);
gboolean publishing_rest_support_google_publisher_is_running (PublishingRESTSupportGooglePublisher* self);
static gboolean publishing_rest_support_google_publisher_real_is_running (PublishingRESTSupportGooglePublisher* self);
void publishing_rest_support_google_publisher_start (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_real_start (PublishingRESTSupportGooglePublisher* self);
void publishing_rest_support_google_publisher_stop (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_real_stop (PublishingRESTSupportGooglePublisher* self);
static SpitPublishingService* publishing_rest_support_google_publisher_real_get_service (SpitPublishingPublisher* base);
static gboolean publishing_rest_support_google_publisher_google_session_impl_real_is_authenticated (PublishingRESTSupportSession* base);
static gchar* publishing_rest_support_google_publisher_google_session_impl_real_get_user_name (PublishingRESTSupportGoogleSession* base);
static gchar* publishing_rest_support_google_publisher_google_session_impl_real_get_access_token (PublishingRESTSupportGoogleSession* base);
static void publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate (PublishingRESTSupportGoogleSession* base);
static void publishing_rest_support_google_publisher_google_session_impl_finalize (PublishingRESTSupportSession * obj);
GType publishing_rest_support_google_publisher_authenticated_transaction_get_type (void) G_GNUC_CONST;
static PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new_with_endpoint_url (PublishingRESTSupportGoogleSession* session,
                                                                                                                                                        const gchar* endpoint_url,
                                                                                                                                                        PublishingRESTSupportHttpMethod method);
static PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_construct_with_endpoint_url (GType object_type,
                                                                                                                                                              PublishingRESTSupportGoogleSession* session,
                                                                                                                                                              const gchar* endpoint_url,
                                                                                                                                                              PublishingRESTSupportHttpMethod method);
PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new (PublishingRESTSupportGoogleSession* session,
                                                                                                                                      const gchar* endpoint_url,
                                                                                                                                      PublishingRESTSupportHttpMethod method);
PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_construct (GType object_type,
                                                                                                                                            PublishingRESTSupportGoogleSession* session,
                                                                                                                                            const gchar* endpoint_url,
                                                                                                                                            PublishingRESTSupportHttpMethod method);
static void publishing_rest_support_google_publisher_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 guint8*
string_get_data (const gchar* self,
                 int* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
#line 1442 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 761 "RESTSupport.c"
	}
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 767 "RESTSupport.c"
}


gchar*
publishing_rest_support_hmac_sha1 (const gchar* key,
                                   const gchar* message)
{
	gchar* result = NULL;
	guint8 buffer[PUBLISHING_REST_SUPPORT_SHA1_HMAC_LENGTH] = {0};
	gsize len = 0UL;
	GHmac* mac = NULL;
	guint8* _tmp0_;
	gint _tmp0__length1;
	guint8* _tmp1_;
	gint _tmp1__length1;
	GHmac* _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
	gsize _tmp5_;
	gchar* _tmp6_;
#line 14 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 14 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 16 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	len = (gsize) PUBLISHING_REST_SUPPORT_SHA1_HMAC_LENGTH;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = string_get_data (key, &_tmp0__length1);
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1__length1 = _tmp0__length1;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_hmac_new (G_CHECKSUM_SHA1, _tmp1_, _tmp1__length1);
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	mac = _tmp2_;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = string_get_data (message, &_tmp3__length1);
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = _tmp3_;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4__length1 = _tmp3__length1;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hmac_update (mac, _tmp4_, (gssize) _tmp4__length1);
#line 20 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hmac_get_digest (mac, buffer, &len);
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = len;
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = g_base64_encode (buffer + 0, ((gint) _tmp5_) - 0);
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp6_;
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hmac_unref0 (mac);
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 826 "RESTSupport.c"
}


PublishingRESTSupportSession*
publishing_rest_support_session_construct (GType object_type,
                                           const gchar* endpoint_url)
{
	PublishingRESTSupportSession* self = NULL;
	gchar* _tmp0_;
	SoupSession* _tmp1_;
	SoupSession* _tmp2_;
#line 34 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportSession*) g_type_create_instance (object_type);
#line 35 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strdup (endpoint_url);
#line 35 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 35 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = _tmp0_;
#line 36 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = soup_session_new ();
#line 36 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->soup_session);
#line 36 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->soup_session = _tmp1_;
#line 37 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->soup_session;
#line 37 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_set (_tmp2_, "ssl-use-system-ca-file", TRUE, NULL);
#line 34 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 858 "RESTSupport.c"
}


void
publishing_rest_support_session_notify_wire_message_unqueued (PublishingRESTSupportSession* self,
                                                              SoupMessage* message)
{
#line 40 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 40 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 41 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_WIRE_MESSAGE_UNQUEUED_SIGNAL], 0, message);
#line 872 "RESTSupport.c"
}


void
publishing_rest_support_session_notify_authenticated (PublishingRESTSupportSession* self)
{
#line 44 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 45 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATED_SIGNAL], 0);
#line 883 "RESTSupport.c"
}


void
publishing_rest_support_session_notify_authentication_failed (PublishingRESTSupportSession* self,
                                                              GError* err)
{
#line 48 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 49 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATION_FAILED_SIGNAL], 0, err);
#line 895 "RESTSupport.c"
}


static gboolean
publishing_rest_support_session_real_is_authenticated (PublishingRESTSupportSession* self)
{
	gboolean _tmp0_ = FALSE;
#line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_session_is_authenticated'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return _tmp0_;
#line 907 "RESTSupport.c"
}


gboolean
publishing_rest_support_session_is_authenticated (PublishingRESTSupportSession* self)
{
#line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self), FALSE);
#line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS (self)->is_authenticated (self);
#line 918 "RESTSupport.c"
}


gchar*
publishing_rest_support_session_get_endpoint_url (PublishingRESTSupportSession* self)
{
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 54 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self), NULL);
#line 55 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->endpoint_url;
#line 55 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 55 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 55 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 938 "RESTSupport.c"
}


void
publishing_rest_support_session_stop_transactions (PublishingRESTSupportSession* self)
{
	SoupSession* _tmp0_;
#line 58 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 59 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->transactions_stopped = TRUE;
#line 60 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->soup_session;
#line 60 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_session_abort (_tmp0_);
#line 954 "RESTSupport.c"
}


gboolean
publishing_rest_support_session_are_transactions_stopped (PublishingRESTSupportSession* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
#line 63 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self), FALSE);
#line 64 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->transactions_stopped;
#line 64 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_;
#line 64 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 971 "RESTSupport.c"
}


static void
_publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued (SoupSession* _sender,
                                                                                             SoupMessage* msg,
                                                                                             gpointer self)
{
#line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_notify_wire_message_unqueued ((PublishingRESTSupportSession*) self, msg);
#line 982 "RESTSupport.c"
}


void
publishing_rest_support_session_send_wire_message (PublishingRESTSupportSession* self,
                                                   SoupMessage* message)
{
	SoupSession* _tmp0_;
	SoupSession* _tmp1_;
	SoupSession* _tmp2_;
	guint _tmp3_;
#line 67 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 67 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 68 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (publishing_rest_support_session_are_transactions_stopped (self)) {
#line 69 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 1002 "RESTSupport.c"
	}
#line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->soup_session;
#line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp0_, "request-unqueued", (GCallback) _publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued, self);
#line 72 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->soup_session;
#line 72 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_session_send_message (_tmp1_, message);
#line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->soup_session;
#line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("request-unqueued", soup_session_get_type (), &_tmp3_, NULL, FALSE);
#line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued, self);
#line 1018 "RESTSupport.c"
}


void
publishing_rest_support_session_set_insecure (PublishingRESTSupportSession* self)
{
	SoupSession* _tmp0_;
	SoupSession* _tmp1_;
#line 77 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self));
#line 78 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->soup_session;
#line 78 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_set (_tmp0_, "ssl-use-system-ca-file", FALSE, NULL);
#line 79 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->soup_session;
#line 79 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_set (_tmp1_, "ssl-strict", FALSE, NULL);
#line 1037 "RESTSupport.c"
}


static void
publishing_rest_support_value_session_init (GValue* value)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value->data[0].v_pointer = NULL;
#line 1046 "RESTSupport.c"
}


static void
publishing_rest_support_value_session_free_value (GValue* value)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (value->data[0].v_pointer) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_session_unref (value->data[0].v_pointer);
#line 1057 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_session_copy_value (const GValue* src_value,
                                                  GValue* dest_value)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = publishing_rest_support_session_ref (src_value->data[0].v_pointer);
#line 1070 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1074 "RESTSupport.c"
	}
}


static gpointer
publishing_rest_support_value_session_peek_pointer (const GValue* value)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 1084 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_session_collect_value (GValue* value,
                                                     guint n_collect_values,
                                                     GTypeCValue* collect_values,
                                                     guint collect_flags)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 1096 "RESTSupport.c"
		PublishingRESTSupportSession * object;
		object = collect_values[0].v_pointer;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1103 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1107 "RESTSupport.c"
		}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_session_ref (object);
#line 1111 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1115 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1119 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_session_lcopy_value (const GValue* value,
                                                   guint n_collect_values,
                                                   GTypeCValue* collect_values,
                                                   guint collect_flags)
{
	PublishingRESTSupportSession ** object_p;
	object_p = collect_values[0].v_pointer;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1135 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 1141 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 1145 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_session_ref (value->data[0].v_pointer);
#line 1149 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1153 "RESTSupport.c"
}


GParamSpec*
publishing_rest_support_param_spec_session (const gchar* name,
                                            const gchar* nick,
                                            const gchar* blurb,
                                            GType object_type,
                                            GParamFlags flags)
{
	PublishingRESTSupportParamSpecSession* spec;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_SESSION), NULL);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 1173 "RESTSupport.c"
}


gpointer
publishing_rest_support_value_get_session (const GValue* value)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_SESSION), NULL);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 1184 "RESTSupport.c"
}


void
publishing_rest_support_value_set_session (GValue* value,
                                           gpointer v_object)
{
	PublishingRESTSupportSession * old;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_SESSION));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_SESSION));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_session_ref (value->data[0].v_pointer);
#line 1207 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1211 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_session_unref (old);
#line 1217 "RESTSupport.c"
	}
}


void
publishing_rest_support_value_take_session (GValue* value,
                                            gpointer v_object)
{
	PublishingRESTSupportSession * old;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_SESSION));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_SESSION));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 1239 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1243 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_session_unref (old);
#line 1249 "RESTSupport.c"
	}
}


static void
publishing_rest_support_session_class_init (PublishingRESTSupportSessionClass * klass)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_parent_class = g_type_class_peek_parent (klass);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_rest_support_session_finalize;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportSessionPrivate));
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_rest_support_session_real_is_authenticated;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_WIRE_MESSAGE_UNQUEUED_SIGNAL] = g_signal_new ("wire-message-unqueued", PUBLISHING_REST_SUPPORT_TYPE_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, soup_message_get_type ());
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATED_SIGNAL] = g_signal_new ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATION_FAILED_SIGNAL] = g_signal_new ("authentication-failed", PUBLISHING_REST_SUPPORT_TYPE_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
#line 1271 "RESTSupport.c"
}


static void
publishing_rest_support_session_instance_init (PublishingRESTSupportSession * self)
{
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_SESSION_GET_PRIVATE (self);
#line 26 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = NULL;
#line 27 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->soup_session = NULL;
#line 28 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->transactions_stopped = FALSE;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 1288 "RESTSupport.c"
}


static void
publishing_rest_support_session_finalize (PublishingRESTSupportSession * obj)
{
	PublishingRESTSupportSession * self;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 26 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 27 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->soup_session);
#line 1304 "RESTSupport.c"
}


GType
publishing_rest_support_session_get_type (void)
{
	static volatile gsize publishing_rest_support_session_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_session_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { publishing_rest_support_value_session_init, publishing_rest_support_value_session_free_value, publishing_rest_support_value_session_copy_value, publishing_rest_support_value_session_peek_pointer, "p", publishing_rest_support_value_session_collect_value, "p", publishing_rest_support_value_session_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportSession), 0, (GInstanceInitFunc) publishing_rest_support_session_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType publishing_rest_support_session_type_id;
		publishing_rest_support_session_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingRESTSupportSession", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&publishing_rest_support_session_type_id__volatile, publishing_rest_support_session_type_id);
	}
	return publishing_rest_support_session_type_id__volatile;
}


gpointer
publishing_rest_support_session_ref (gpointer instance)
{
	PublishingRESTSupportSession * self;
	self = instance;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 1333 "RESTSupport.c"
}


void
publishing_rest_support_session_unref (gpointer instance)
{
	PublishingRESTSupportSession * self;
	self = instance;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS (self)->finalize (self);
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1348 "RESTSupport.c"
	}
}


gchar*
publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpMethod self)
{
	gchar* result = NULL;
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	switch (self) {
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET:
#line 1361 "RESTSupport.c"
		{
			gchar* _tmp0_;
#line 91 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp0_ = g_strdup ("GET");
#line 91 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp0_;
#line 91 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1370 "RESTSupport.c"
		}
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT:
#line 1374 "RESTSupport.c"
		{
			gchar* _tmp1_;
#line 94 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = g_strdup ("PUT");
#line 94 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp1_;
#line 94 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1383 "RESTSupport.c"
		}
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST:
#line 1387 "RESTSupport.c"
		{
			gchar* _tmp2_;
#line 97 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = g_strdup ("POST");
#line 97 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp2_;
#line 97 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1396 "RESTSupport.c"
		}
		default:
		{
#line 100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_error ("RESTSupport.vala:100: unrecognized HTTP method enumeration value");
#line 1402 "RESTSupport.c"
		}
	}
}


PublishingRESTSupportHttpMethod
publishing_rest_support_http_method_from_string (const gchar* str)
{
	PublishingRESTSupportHttpMethod result = 0;
#line 104 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (str != NULL, 0);
#line 105 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_strcmp0 (str, "GET") == 0) {
#line 106 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET;
#line 106 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return result;
#line 1420 "RESTSupport.c"
	} else {
#line 107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (str, "PUT") == 0) {
#line 108 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT;
#line 108 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1428 "RESTSupport.c"
		} else {
#line 109 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (g_strcmp0 (str, "POST") == 0) {
#line 110 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST;
#line 110 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return result;
#line 1436 "RESTSupport.c"
			} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_error ("RESTSupport.vala:112: unrecognized HTTP method name: %s", str);
#line 1440 "RESTSupport.c"
			}
		}
	}
}


GType
publishing_rest_support_http_method_get_type (void)
{
	static volatile gsize publishing_rest_support_http_method_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_http_method_type_id__volatile)) {
		static const GEnumValue values[] = {{PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, "PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET", "get"}, {PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST, "PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST", "post"}, {PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT, "PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT", "put"}, {0, NULL, NULL}};
		GType publishing_rest_support_http_method_type_id;
		publishing_rest_support_http_method_type_id = g_enum_register_static ("PublishingRESTSupportHttpMethod", values);
		g_once_init_leave (&publishing_rest_support_http_method_type_id__volatile, publishing_rest_support_http_method_type_id);
	}
	return publishing_rest_support_http_method_type_id__volatile;
}


PublishingRESTSupportArgument*
publishing_rest_support_argument_construct (GType object_type,
                                            const gchar* key,
                                            const gchar* value)
{
	PublishingRESTSupportArgument* self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (value != NULL, NULL);
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportArgument*) g_type_create_instance (object_type);
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strdup (key);
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->key);
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->key = _tmp0_;
#line 123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (value);
#line 123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->value);
#line 123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->value = _tmp1_;
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 1489 "RESTSupport.c"
}


PublishingRESTSupportArgument*
publishing_rest_support_argument_new (const gchar* key,
                                      const gchar* value)
{
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_argument_construct (PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, key, value);
#line 1499 "RESTSupport.c"
}


static gpointer
_publishing_rest_support_argument_ref0 (gpointer self)
{
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? publishing_rest_support_argument_ref (self) : NULL;
#line 1508 "RESTSupport.c"
}


gchar*
publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args,
                                                 int args_length1,
                                                 gboolean escape,
                                                 const gchar* separator)
{
	gchar* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp7_;
	gssize _tmp8_;
	GString* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_string_new ("");
#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	builder = _tmp0_;
#line 1530 "RESTSupport.c"
	{
		PublishingRESTSupportArgument** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection = args;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection_length1 = args_length1;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (arg_it = 0; arg_it < args_length1; arg_it = arg_it + 1) {
#line 1542 "RESTSupport.c"
			PublishingRESTSupportArgument* _tmp1_;
			PublishingRESTSupportArgument* arg = NULL;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]);
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			arg = _tmp1_;
#line 1549 "RESTSupport.c"
			{
				GString* _tmp2_;
				PublishingRESTSupportArgument* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				GString* _tmp6_;
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp2_ = builder;
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = arg;
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = publishing_rest_support_argument_to_string (_tmp3_, escape);
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp5_ = _tmp4_;
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_string_append (_tmp2_, _tmp5_);
#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp5_);
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = builder;
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_string_append (_tmp6_, separator);
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_argument_unref0 (arg);
#line 1574 "RESTSupport.c"
			}
		}
	}
#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = builder;
#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = _tmp7_->len;
#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp8_ > ((gssize) 0)) {
#line 1584 "RESTSupport.c"
		GString* _tmp9_;
		GString* _tmp10_;
		gssize _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = builder;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp10_ = builder;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = _tmp10_->len;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = strlen (separator);
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp13_ = _tmp12_;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_string_truncate (_tmp9_, (gsize) (_tmp11_ - _tmp13_));
#line 1602 "RESTSupport.c"
	}
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp14_ = builder;
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = _tmp14_->str;
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp16_;
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (builder);
#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1616 "RESTSupport.c"
}


gint
publishing_rest_support_argument_compare (PublishingRESTSupportArgument* arg1,
                                          PublishingRESTSupportArgument* arg2)
{
	gint result = 0;
	GCompareFunc _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg1), 0);
#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg2), 0);
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strcmp0;
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = arg1->key;
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = arg2->key;
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_ (_tmp1_, _tmp2_);
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1642 "RESTSupport.c"
}


static gint
_publishing_rest_support_argument_compare_gcompare_data_func (gconstpointer a,
                                                              gconstpointer b,
                                                              gpointer self)
{
	gint result;
	result = publishing_rest_support_argument_compare ((PublishingRESTSupportArgument*) a, (PublishingRESTSupportArgument*) b);
#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1655 "RESTSupport.c"
}


PublishingRESTSupportArgument**
publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray,
                                       int inputArray_length1,
                                       int* result_length1)
{
	PublishingRESTSupportArgument** result = NULL;
	GeeTreeSet* sorted_args = NULL;
	GeeTreeSet* _tmp0_;
	GeeTreeSet* _tmp4_;
	gint _tmp5_;
	gpointer* _tmp6_;
	PublishingRESTSupportArgument** _tmp7_;
	gint _tmp7__length1;
#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = gee_tree_set_new (PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, (GBoxedCopyFunc) publishing_rest_support_argument_ref, (GDestroyNotify) publishing_rest_support_argument_unref, _publishing_rest_support_argument_compare_gcompare_data_func, NULL, NULL);
#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	sorted_args = _tmp0_;
#line 1676 "RESTSupport.c"
	{
		PublishingRESTSupportArgument** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection = inputArray;
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection_length1 = inputArray_length1;
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (arg_it = 0; arg_it < inputArray_length1; arg_it = arg_it + 1) {
#line 1688 "RESTSupport.c"
			PublishingRESTSupportArgument* _tmp1_;
			PublishingRESTSupportArgument* arg = NULL;
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]);
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			arg = _tmp1_;
#line 1695 "RESTSupport.c"
			{
				GeeTreeSet* _tmp2_;
				PublishingRESTSupportArgument* _tmp3_;
#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp2_ = sorted_args;
#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = arg;
#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp3_);
#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_argument_unref0 (arg);
#line 1707 "RESTSupport.c"
			}
		}
	}
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = sorted_args;
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp5_);
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _tmp6_;
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7__length1 = _tmp5_;
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (result_length1) {
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*result_length1 = _tmp7__length1;
#line 1723 "RESTSupport.c"
	}
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp7_;
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (sorted_args);
#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1731 "RESTSupport.c"
}


gchar*
publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self,
                                            gboolean escape)
{
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (self), NULL);
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (escape) {
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = "\"";
#line 1751 "RESTSupport.c"
	} else {
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = "";
#line 1755 "RESTSupport.c"
	}
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (escape) {
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = "\"";
#line 1761 "RESTSupport.c"
	} else {
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = "";
#line 1765 "RESTSupport.c"
	}
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->key;
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->value;
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = g_strdup_printf ("%s=%s%s%s", _tmp2_, _tmp0_, _tmp3_, _tmp1_);
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp4_;
#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1777 "RESTSupport.c"
}


static void
publishing_rest_support_value_argument_init (GValue* value)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value->data[0].v_pointer = NULL;
#line 1786 "RESTSupport.c"
}


static void
publishing_rest_support_value_argument_free_value (GValue* value)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (value->data[0].v_pointer) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_unref (value->data[0].v_pointer);
#line 1797 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_argument_copy_value (const GValue* src_value,
                                                   GValue* dest_value)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = publishing_rest_support_argument_ref (src_value->data[0].v_pointer);
#line 1810 "RESTSupport.c"
	} else {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1814 "RESTSupport.c"
	}
}


static gpointer
publishing_rest_support_value_argument_peek_pointer (const GValue* value)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 1824 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_argument_collect_value (GValue* value,
                                                      guint n_collect_values,
                                                      GTypeCValue* collect_values,
                                                      guint collect_flags)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 1836 "RESTSupport.c"
		PublishingRESTSupportArgument * object;
		object = collect_values[0].v_pointer;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1843 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1847 "RESTSupport.c"
		}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_argument_ref (object);
#line 1851 "RESTSupport.c"
	} else {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1855 "RESTSupport.c"
	}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1859 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_argument_lcopy_value (const GValue* value,
                                                    guint n_collect_values,
                                                    GTypeCValue* collect_values,
                                                    guint collect_flags)
{
	PublishingRESTSupportArgument ** object_p;
	object_p = collect_values[0].v_pointer;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1875 "RESTSupport.c"
	}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 1881 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 1885 "RESTSupport.c"
	} else {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_argument_ref (value->data[0].v_pointer);
#line 1889 "RESTSupport.c"
	}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1893 "RESTSupport.c"
}


GParamSpec*
publishing_rest_support_param_spec_argument (const gchar* name,
                                             const gchar* nick,
                                             const gchar* blurb,
                                             GType object_type,
                                             GParamFlags flags)
{
	PublishingRESTSupportParamSpecArgument* spec;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT), NULL);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 1913 "RESTSupport.c"
}


gpointer
publishing_rest_support_value_get_argument (const GValue* value)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT), NULL);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 1924 "RESTSupport.c"
}


void
publishing_rest_support_value_set_argument (GValue* value,
                                            gpointer v_object)
{
	PublishingRESTSupportArgument * old;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_ref (value->data[0].v_pointer);
#line 1947 "RESTSupport.c"
	} else {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1951 "RESTSupport.c"
	}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_unref (old);
#line 1957 "RESTSupport.c"
	}
}


void
publishing_rest_support_value_take_argument (GValue* value,
                                             gpointer v_object)
{
	PublishingRESTSupportArgument * old;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 1979 "RESTSupport.c"
	} else {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1983 "RESTSupport.c"
	}
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_unref (old);
#line 1989 "RESTSupport.c"
	}
}


static void
publishing_rest_support_argument_class_init (PublishingRESTSupportArgumentClass * klass)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_argument_parent_class = g_type_class_peek_parent (klass);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportArgumentClass *) klass)->finalize = publishing_rest_support_argument_finalize;
#line 2001 "RESTSupport.c"
}


static void
publishing_rest_support_argument_instance_init (PublishingRESTSupportArgument * self)
{
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 2010 "RESTSupport.c"
}


static void
publishing_rest_support_argument_finalize (PublishingRESTSupportArgument * obj)
{
	PublishingRESTSupportArgument * self;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgument);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 118 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->key);
#line 119 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->value);
#line 2026 "RESTSupport.c"
}


GType
publishing_rest_support_argument_get_type (void)
{
	static volatile gsize publishing_rest_support_argument_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_argument_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { publishing_rest_support_value_argument_init, publishing_rest_support_value_argument_free_value, publishing_rest_support_value_argument_copy_value, publishing_rest_support_value_argument_peek_pointer, "p", publishing_rest_support_value_argument_collect_value, "p", publishing_rest_support_value_argument_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportArgumentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_argument_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportArgument), 0, (GInstanceInitFunc) publishing_rest_support_argument_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType publishing_rest_support_argument_type_id;
		publishing_rest_support_argument_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingRESTSupportArgument", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&publishing_rest_support_argument_type_id__volatile, publishing_rest_support_argument_type_id);
	}
	return publishing_rest_support_argument_type_id__volatile;
}


gpointer
publishing_rest_support_argument_ref (gpointer instance)
{
	PublishingRESTSupportArgument * self;
	self = instance;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 2055 "RESTSupport.c"
}


void
publishing_rest_support_argument_unref (gpointer instance)
{
	PublishingRESTSupportArgument * self;
	self = instance;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		PUBLISHING_REST_SUPPORT_ARGUMENT_GET_CLASS (self)->finalize (self);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 2070 "RESTSupport.c"
	}
}


static void
_publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data (SoupMessage* _sender,
                                                                                      SoupBuffer* chunk,
                                                                                      gpointer self)
{
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_on_wrote_body_data ((PublishingRESTSupportTransaction*) self, chunk);
#line 2082 "RESTSupport.c"
}


PublishingRESTSupportTransaction*
publishing_rest_support_transaction_construct (GType object_type,
                                               PublishingRESTSupportSession* parent_session,
                                               PublishingRESTSupportHttpMethod method)
{
	PublishingRESTSupportTransaction* self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	SoupMessage* _tmp6_;
	SoupMessage* _tmp7_;
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL);
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type);
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_session_get_endpoint_url (parent_session);
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_;
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp1_ != NULL, "parent_session.get_endpoint_url() != null");
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp1_);
#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = parent_session;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_http_method_to_string (method);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_session_get_endpoint_url (parent_session);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = soup_message_new (_tmp3_, _tmp5_);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = _tmp6_;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp5_);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp3_);
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = self->priv->message;
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp7_, "wrote-body-data", (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self);
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 2138 "RESTSupport.c"
}


PublishingRESTSupportTransaction*
publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session,
                                         PublishingRESTSupportHttpMethod method)
{
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, parent_session, method);
#line 2148 "RESTSupport.c"
}


PublishingRESTSupportTransaction*
publishing_rest_support_transaction_construct_with_endpoint_url (GType object_type,
                                                                 PublishingRESTSupportSession* parent_session,
                                                                 const gchar* endpoint_url,
                                                                 PublishingRESTSupportHttpMethod method)
{
	PublishingRESTSupportTransaction* self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	SoupMessage* _tmp3_;
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type);
#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = parent_session;
#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strdup (endpoint_url);
#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = _tmp0_;
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_http_method_to_string (method);
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = soup_message_new (_tmp2_, endpoint_url);
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = _tmp3_;
#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp2_);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 2191 "RESTSupport.c"
}


PublishingRESTSupportTransaction*
publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session,
                                                           const gchar* endpoint_url,
                                                           PublishingRESTSupportHttpMethod method)
{
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, parent_session, endpoint_url, method);
#line 2202 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_on_wrote_body_data (PublishingRESTSupportTransaction* self,
                                                        SoupBuffer* written_data)
{
	gint _tmp0_;
	gsize _tmp1_;
	gint _tmp2_;
	SoupMessage* _tmp3_;
	SoupMessageBody* _tmp4_;
	gint64 _tmp5_;
#line 191 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 191 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (written_data != NULL);
#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->bytes_written;
#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = written_data->length;
#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->bytes_written = _tmp0_ + ((gint) _tmp1_);
#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->bytes_written;
#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->message;
#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = _tmp3_->request_body;
#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_->length;
#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_CHUNK_TRANSMITTED_SIGNAL], 0, _tmp2_, (gint) _tmp5_);
#line 2236 "RESTSupport.c"
}


static gpointer
_g_error_copy0 (gpointer self)
{
#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? g_error_copy (self) : NULL;
#line 2245 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_on_message_unqueued (PublishingRESTSupportTransaction* self,
                                                         SoupMessage* message)
{
	SoupMessage* _tmp0_;
	GError * _inner_error_ = NULL;
#line 196 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 196 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_ != message) {
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2265 "RESTSupport.c"
	}
	{
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_check_response (self, message, &_inner_error_);
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 2274 "RESTSupport.c"
				goto __catch0_spit_publishing_publishing_error;
			}
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2283 "RESTSupport.c"
		}
	}
	goto __finally0;
	__catch0_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GError* _tmp5_;
		GError* _tmp6_;
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = err;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = _tmp1_->message;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_warning ("RESTSupport.vala:203: Publishing error: %s", _tmp2_);
#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = publishing_rest_support_transaction_get_response (self);
#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = _tmp3_;
#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_warning ("RESTSupport.vala:204: response validation failed. bad response = '%s'.", _tmp4_);
#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp4_);
#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = err;
#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = _g_error_copy0 (_tmp5_);
#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (self->priv->err);
#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->err = _tmp6_;
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 2324 "RESTSupport.c"
	}
	__finally0:
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2335 "RESTSupport.c"
	}
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? g_object_ref (self) : NULL;
#line 2345 "RESTSupport.c"
}


gchar*
publishing_rest_support_transaction_detailed_error_from_tls_flags (PublishingRESTSupportTransaction* self,
                                                                   GTlsCertificate* * cert)
{
	GTlsCertificate* _vala_cert = NULL;
	gchar* result = NULL;
	GTlsCertificateFlags tls_errors = 0;
	SoupMessage* _tmp0_;
	GTlsCertificate* _tmp1_ = NULL;
	GTlsCertificateFlags _tmp2_ = 0;
	GTlsCertificate* _tmp3_;
	GeeArrayList* list = NULL;
	GeeArrayList* _tmp4_;
	GTlsCertificateFlags _tmp5_;
	GTlsCertificateFlags _tmp7_;
	GTlsCertificateFlags _tmp9_;
	GTlsCertificateFlags _tmp11_;
	GTlsCertificateFlags _tmp13_;
	GTlsCertificateFlags _tmp15_;
	GTlsCertificateFlags _tmp17_;
	GString* builder = NULL;
	GString* _tmp19_;
	GeeArrayList* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	GString* _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
#line 210 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_get_https_status (_tmp0_, &_tmp1_, &_tmp2_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_vala_cert);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _g_object_ref0 (_tmp1_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_cert = _tmp3_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	tls_errors = _tmp2_;
#line 214 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 214 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	list = _tmp4_;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = tls_errors;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp5_ & G_TLS_CERTIFICATE_BAD_IDENTITY) == G_TLS_CERTIFICATE_BAD_IDENTITY) {
#line 2399 "RESTSupport.c"
		GeeArrayList* _tmp6_;
#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = list;
#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("âš« This website presented identification that belongs to a different we" \
"bsite."));
#line 2405 "RESTSupport.c"
	}
#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = tls_errors;
#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp7_ & G_TLS_CERTIFICATE_EXPIRED) == G_TLS_CERTIFICATE_EXPIRED) {
#line 2411 "RESTSupport.c"
		GeeArrayList* _tmp8_;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = list;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification is too old to trust. Check the date on" \
" your computer’s calendar."));
#line 2417 "RESTSupport.c"
	}
#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = tls_errors;
#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp9_ & G_TLS_CERTIFICATE_UNKNOWN_CA) == G_TLS_CERTIFICATE_UNKNOWN_CA) {
#line 2423 "RESTSupport.c"
		GeeArrayList* _tmp10_;
#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp10_ = list;
#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification was not issued by a trusted organizati" \
"on."));
#line 2429 "RESTSupport.c"
	}
#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = tls_errors;
#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp11_ & G_TLS_CERTIFICATE_GENERIC_ERROR) == G_TLS_CERTIFICATE_GENERIC_ERROR) {
#line 2435 "RESTSupport.c"
		GeeArrayList* _tmp12_;
#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = list;
#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification could not be processed. It may be corr" \
"upted."));
#line 2441 "RESTSupport.c"
	}
#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = tls_errors;
#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp13_ & G_TLS_CERTIFICATE_REVOKED) == G_TLS_CERTIFICATE_REVOKED) {
#line 2447 "RESTSupport.c"
		GeeArrayList* _tmp14_;
#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = list;
#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification has been revoked by the trusted organi" \
"zation that issued it."));
#line 2453 "RESTSupport.c"
	}
#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = tls_errors;
#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp15_ & G_TLS_CERTIFICATE_INSECURE) == G_TLS_CERTIFICATE_INSECURE) {
#line 2459 "RESTSupport.c"
		GeeArrayList* _tmp16_;
#line 242 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp16_ = list;
#line 242 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification cannot be trusted because it uses very" \
" weak encryption."));
#line 2465 "RESTSupport.c"
	}
#line 245 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp17_ = tls_errors;
#line 245 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((_tmp17_ & G_TLS_CERTIFICATE_NOT_ACTIVATED) == G_TLS_CERTIFICATE_NOT_ACTIVATED) {
#line 2471 "RESTSupport.c"
		GeeArrayList* _tmp18_;
#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = list;
#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification is only valid for future dates. Check " \
"the date on your computer’s calendar."));
#line 2477 "RESTSupport.c"
	}
#line 250 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp19_ = g_string_new ("");
#line 250 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	builder = _tmp19_;
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = list;
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = _tmp21_;
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp22_ == 1) {
#line 2491 "RESTSupport.c"
		GString* _tmp23_;
		GeeArrayList* _tmp24_;
		gpointer _tmp25_;
		gchar* _tmp26_;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp23_ = builder;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = list;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp25_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp26_ = (gchar*) _tmp25_;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_string_append (_tmp23_, _tmp26_);
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp26_);
#line 2508 "RESTSupport.c"
	} else {
		{
			GeeArrayList* _entry_list = NULL;
			GeeArrayList* _tmp27_;
			GeeArrayList* _tmp28_;
			gint _entry_size = 0;
			GeeArrayList* _tmp29_;
			gint _tmp30_;
			gint _tmp31_;
			gint _entry_index = 0;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp27_ = list;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp28_ = _g_object_ref0 (_tmp27_);
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_entry_list = _tmp28_;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp29_ = _entry_list;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp30_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp31_ = _tmp30_;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_entry_size = _tmp31_;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_entry_index = -1;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			while (TRUE) {
#line 2537 "RESTSupport.c"
				gint _tmp32_;
				gint _tmp33_;
				gint _tmp34_;
				gchar* entry = NULL;
				GeeArrayList* _tmp35_;
				gint _tmp36_;
				gpointer _tmp37_;
				GString* _tmp38_;
				const gchar* _tmp39_;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp32_ = _entry_index;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_entry_index = _tmp32_ + 1;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp33_ = _entry_index;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp34_ = _entry_size;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!(_tmp33_ < _tmp34_)) {
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 2559 "RESTSupport.c"
				}
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp35_ = _entry_list;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp36_ = _entry_index;
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp37_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp36_);
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				entry = (gchar*) _tmp37_;
#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp38_ = builder;
#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp39_ = entry;
#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_string_append_printf (_tmp38_, "%s\n", _tmp39_);
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (entry);
#line 2577 "RESTSupport.c"
			}
#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (_entry_list);
#line 2581 "RESTSupport.c"
		}
	}
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp40_ = builder;
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp41_ = _tmp40_->str;
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp42_ = g_strdup (_tmp41_);
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp42_;
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (builder);
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (list);
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (cert) {
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*cert = _vala_cert;
#line 2600 "RESTSupport.c"
	} else {
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (_vala_cert);
#line 2604 "RESTSupport.c"
	}
#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 2608 "RESTSupport.c"
}


void
publishing_rest_support_transaction_check_response (PublishingRESTSupportTransaction* self,
                                                    SoupMessage* message,
                                                    GError** error)
{
	guint _tmp0_;
	guint _tmp1_;
	gboolean _tmp35_ = FALSE;
	SoupMessageBody* _tmp36_;
	guint8* _tmp37_;
	gint _tmp37__length1;
	GError * _inner_error_ = NULL;
#line 262 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 262 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_get (message, "status-code", &_tmp0_, NULL);
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_;
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	switch (_tmp1_) {
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_OK:
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CREATED:
#line 2638 "RESTSupport.c"
		{
#line 267 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 2642 "RESTSupport.c"
		}
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_RESOLVE:
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_RESOLVE_PROXY:
#line 2648 "RESTSupport.c"
		{
			gchar* _tmp2_;
			gchar* _tmp3_;
			guint _tmp4_;
			guint _tmp5_;
			GError* _tmp6_;
			GError* _tmp7_;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp3_ = _tmp2_;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (message, "status-code", &_tmp4_, NULL);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = _tmp4_;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to resolve %s (error code %u)", _tmp3_, _tmp5_);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = _tmp6_;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp3_);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp7_;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2678 "RESTSupport.c"
			} else {
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2686 "RESTSupport.c"
			}
		}
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_CONNECT:
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_CONNECT_PROXY:
#line 2693 "RESTSupport.c"
		{
			gchar* _tmp8_;
			gchar* _tmp9_;
			guint _tmp10_;
			guint _tmp11_;
			GError* _tmp12_;
			GError* _tmp13_;
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp9_ = _tmp8_;
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (message, "status-code", &_tmp10_, NULL);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp11_ = _tmp10_;
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp12_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to connect to %s (error code %u)", _tmp9_, _tmp11_);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp13_ = _tmp12_;
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp9_);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp13_;
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2723 "RESTSupport.c"
			} else {
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2731 "RESTSupport.c"
			}
		}
#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_SSL_FAILED:
#line 2736 "RESTSupport.c"
		{
			gchar* _tmp14_;
			gchar* _tmp15_;
			GError* _tmp16_;
			GError* _tmp17_;
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp14_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp15_ = _tmp14_;
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp16_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SSL_FAILED, "Unable to connect to %s: Secure connection failed", _tmp15_);
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp17_ = _tmp16_;
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp15_);
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp17_;
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2760 "RESTSupport.c"
			} else {
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2768 "RESTSupport.c"
			}
		}
		default:
		{
			guint _tmp18_;
			guint _tmp19_;
#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (message, "status-code", &_tmp18_, NULL);
#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp19_ = _tmp18_;
#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_tmp19_ >= ((guint) 100)) {
#line 2781 "RESTSupport.c"
				gchar* _tmp20_;
				gchar* _tmp21_;
				guint _tmp22_;
				guint _tmp23_;
				gchar* _tmp24_;
				gchar* _tmp25_;
				gchar* _tmp26_;
				GError* _tmp27_;
				GError* _tmp28_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp20_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp21_ = _tmp20_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (message, "status-code", &_tmp22_, NULL);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp23_ = _tmp22_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (message, "reason-phrase", &_tmp24_, NULL);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp25_ = _tmp24_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp26_ = _tmp25_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp27_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Service %s returned HTTP status code %u %s", _tmp21_, _tmp23_, _tmp26_);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp28_ = _tmp27_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp26_);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp21_);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_inner_error_ = _tmp28_;
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_propagate_error (error, _inner_error_);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2821 "RESTSupport.c"
				} else {
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2829 "RESTSupport.c"
				}
			} else {
				gchar* _tmp29_;
				gchar* _tmp30_;
				guint _tmp31_;
				guint _tmp32_;
				GError* _tmp33_;
				GError* _tmp34_;
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp29_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp30_ = _tmp29_;
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (message, "status-code", &_tmp31_, NULL);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp32_ = _tmp31_;
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp33_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Failure communicating with %s (error code %u)", _tmp30_, _tmp32_);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp34_ = _tmp33_;
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp30_);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_inner_error_ = _tmp34_;
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_propagate_error (error, _inner_error_);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2860 "RESTSupport.c"
				} else {
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2868 "RESTSupport.c"
				}
			}
		}
	}
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp36_ = message->response_body;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp37_ = _tmp36_->data;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp37__length1 = (gint) _tmp36_->length;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp37_ == NULL) {
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp35_ = TRUE;
#line 2883 "RESTSupport.c"
	} else {
		SoupMessageBody* _tmp38_;
		guint8* _tmp39_;
		gint _tmp39__length1;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp38_ = message->response_body;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp39_ = _tmp38_->data;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp39__length1 = (gint) _tmp38_->length;
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp35_ = _tmp39__length1 == 0;
#line 2896 "RESTSupport.c"
	}
#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp35_) {
#line 2900 "RESTSupport.c"
		gchar* _tmp40_;
		gchar* _tmp41_;
		GError* _tmp42_;
		GError* _tmp43_;
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp40_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp41_ = _tmp40_;
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp42_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "No response data from %s", _tmp41_);
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp43_ = _tmp42_;
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp41_);
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp43_;
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2923 "RESTSupport.c"
		} else {
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2931 "RESTSupport.c"
		}
	}
}


static PublishingRESTSupportArgument**
_vala_array_dup1 (PublishingRESTSupportArgument** self,
                  int length)
{
	PublishingRESTSupportArgument** result;
	int i;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = g_new0 (PublishingRESTSupportArgument*, length + 1);
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	for (i = 0; i < length; i++) {
#line 2947 "RESTSupport.c"
		PublishingRESTSupportArgument* _tmp0_;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _publishing_rest_support_argument_ref0 (self[i]);
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result[i] = _tmp0_;
#line 2953 "RESTSupport.c"
	}
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 2957 "RESTSupport.c"
}


PublishingRESTSupportArgument**
publishing_rest_support_transaction_get_arguments (PublishingRESTSupportTransaction* self,
                                                   int* result_length1)
{
	PublishingRESTSupportArgument** result = NULL;
	PublishingRESTSupportArgument** _tmp0_;
	gint _tmp0__length1;
	PublishingRESTSupportArgument** _tmp1_;
	gint _tmp1__length1;
	PublishingRESTSupportArgument** _tmp2_;
	gint _tmp2__length1;
#line 299 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->arguments;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->arguments_length1;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1__length1 = _tmp0__length1;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = _tmp1__length1;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (result_length1) {
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*result_length1 = _tmp2__length1;
#line 2990 "RESTSupport.c"
	}
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 2996 "RESTSupport.c"
}


PublishingRESTSupportArgument**
publishing_rest_support_transaction_get_sorted_arguments (PublishingRESTSupportTransaction* self,
                                                          int* result_length1)
{
	PublishingRESTSupportArgument** result = NULL;
	gint _tmp0_;
	PublishingRESTSupportArgument** _tmp1_;
	PublishingRESTSupportArgument** _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_;
	PublishingRESTSupportArgument** _tmp4_;
	PublishingRESTSupportArgument** _tmp5_;
	gint _tmp5__length1;
	PublishingRESTSupportArgument** _tmp6_;
	gint _tmp6__length1;
#line 303 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_transaction_get_arguments (self, &_tmp0_);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = _tmp0_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_argument_sort (_tmp2_, _tmp0_, &_tmp3_);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5__length1 = _tmp3_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6__length1 = _tmp5__length1;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (result_length1) {
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*result_length1 = _tmp6__length1;
#line 3039 "RESTSupport.c"
	}
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp6_;
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3045 "RESTSupport.c"
}


void
publishing_rest_support_transaction_set_is_executed (PublishingRESTSupportTransaction* self,
                                                     gboolean is_executed)
{
#line 307 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 308 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = is_executed;
#line 3057 "RESTSupport.c"
}


static void
_publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued (PublishingRESTSupportSession* _sender,
                                                                                                                SoupMessage* message,
                                                                                                                gpointer self)
{
#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_on_message_unqueued ((PublishingRESTSupportTransaction*) self, message);
#line 3068 "RESTSupport.c"
}


void
publishing_rest_support_transaction_send (PublishingRESTSupportTransaction* self,
                                          GError** error)
{
	PublishingRESTSupportSession* _tmp0_;
	SoupMessage* _tmp1_;
	PublishingRESTSupportSession* _tmp2_;
	SoupMessage* _tmp3_;
	PublishingRESTSupportSession* _tmp4_;
	guint _tmp5_;
	SoupMessage* _tmp6_;
	guint _tmp7_;
	GError* _tmp8_;
	GError* _tmp10_;
	GError * _inner_error_ = NULL;
#line 311 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->parent_session;
#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp0_, "wire-message-unqueued", (GCallback) _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued, self);
#line 313 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->message;
#line 313 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp1_, "wrote-body-data", (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self);
#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->parent_session;
#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->message;
#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_send_wire_message (_tmp2_, _tmp3_);
#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->parent_session;
#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("wire-message-unqueued", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp5_, NULL, FALSE);
#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued, self);
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = self->priv->message;
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("wrote-body-data", soup_message_get_type (), &_tmp7_, NULL, FALSE);
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self);
#line 319 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->err;
#line 319 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp8_ != NULL) {
#line 3119 "RESTSupport.c"
		GError* _tmp9_;
#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = self->priv->err;
#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_NETWORK_ERROR_SIGNAL], 0, _tmp9_);
#line 3125 "RESTSupport.c"
	} else {
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_COMPLETED_SIGNAL], 0);
#line 3129 "RESTSupport.c"
	}
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = self->priv->err;
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp10_ != NULL) {
#line 3135 "RESTSupport.c"
		GError* _tmp11_;
		GError* _tmp12_;
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = self->priv->err;
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = _g_error_copy0 (_tmp11_);
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp12_;
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3150 "RESTSupport.c"
		} else {
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3158 "RESTSupport.c"
		}
	}
}


PublishingRESTSupportHttpMethod
publishing_rest_support_transaction_get_method (PublishingRESTSupportTransaction* self)
{
	PublishingRESTSupportHttpMethod result = 0;
	SoupMessage* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	PublishingRESTSupportHttpMethod _tmp4_;
#line 328 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), 0);
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_get (_tmp0_, "method", &_tmp1_, NULL);
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_http_method_from_string (_tmp3_);
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp3_);
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp4_;
#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3191 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_real_add_header (PublishingRESTSupportTransaction* self,
                                                     const gchar* key,
                                                     const gchar* value)
{
	SoupMessage* _tmp0_;
	SoupMessageHeaders* _tmp1_;
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (key != NULL);
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (value != NULL);
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_->request_headers;
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_headers_append (_tmp1_, key, value);
#line 3212 "RESTSupport.c"
}


void
publishing_rest_support_transaction_add_header (PublishingRESTSupportTransaction* self,
                                                const gchar* key,
                                                const gchar* value)
{
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->add_header (self, key, value);
#line 3225 "RESTSupport.c"
}


void
publishing_rest_support_transaction_set_custom_payload (PublishingRESTSupportTransaction* self,
                                                        const gchar* custom_payload,
                                                        const gchar* payload_content_type,
                                                        gulong payload_length)
{
	gulong _tmp0_ = 0UL;
	gulong length = 0UL;
	SoupMessage* _tmp3_;
	guint8* _tmp4_;
	gint _tmp4__length1;
	guint8* _tmp5_;
	gint _tmp5__length1;
	gulong _tmp6_;
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (payload_content_type != NULL);
#line 346 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_transaction_get_method (self) != PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, "get_method() != HttpMethod.GET");
#line 348 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (custom_payload == NULL) {
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->use_custom_payload = FALSE;
#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 3255 "RESTSupport.c"
	}
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (payload_length > ((gulong) 0)) {
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = payload_length;
#line 3261 "RESTSupport.c"
	} else {
		gint _tmp1_;
		gint _tmp2_;
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = strlen (custom_payload);
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = _tmp1_;
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = (gulong) _tmp2_;
#line 3271 "RESTSupport.c"
	}
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	length = _tmp0_;
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->message;
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = string_get_data (custom_payload, &_tmp4__length1);
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_;
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5__length1 = _tmp4__length1;
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = length;
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_set_request (_tmp3_, payload_content_type, SOUP_MEMORY_COPY, _tmp5_ + 0, (gsize) (((gint) _tmp6_) - 0));
#line 356 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->use_custom_payload = TRUE;
#line 3289 "RESTSupport.c"
}


void
publishing_rest_support_transaction_set_message (PublishingRESTSupportTransaction* self,
                                                 SoupMessage* message)
{
	SoupMessage* _tmp0_;
#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = _g_object_ref0 (message);
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = _tmp0_;
#line 3308 "RESTSupport.c"
}


gboolean
publishing_rest_support_transaction_get_is_executed (PublishingRESTSupportTransaction* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), FALSE);
#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->is_executed;
#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_;
#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3325 "RESTSupport.c"
}


guint
publishing_rest_support_transaction_get_status_code (PublishingRESTSupportTransaction* self)
{
	guint result = 0U;
	SoupMessage* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
#line 372 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), 0U);
#line 373 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_transaction_get_is_executed (self), "get_is_executed()");
#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_get (_tmp0_, "status-code", &_tmp1_, NULL);
#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3350 "RESTSupport.c"
}


static void
_vala_SoupURI_free (SoupURI* self)
{
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_boxed_free (soup_uri_get_type (), self);
#line 3359 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_real_execute (PublishingRESTSupportTransaction* self,
                                                  GError** error)
{
	gboolean _tmp0_;
	gchar* formdata_string = NULL;
	gchar* _tmp2_;
	gchar* old_url = NULL;
	gchar* url_with_query = NULL;
	gboolean _tmp18_ = FALSE;
	GError * _inner_error_ = NULL;
#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->use_custom_payload;
#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->is_executed = TRUE;
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_send (self, &_inner_error_);
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 3390 "RESTSupport.c"
			} else {
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 3398 "RESTSupport.c"
			}
		}
#line 385 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 3403 "RESTSupport.c"
	}
#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (publishing_rest_support_transaction_get_method (self) == PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST) {
#line 3407 "RESTSupport.c"
		PublishingRESTSupportArgument** _tmp1_;
		gint _tmp1__length1;
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = self->priv->arguments;
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1__length1 = self->priv->arguments_length1;
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_vala_assert (_tmp1__length1 > 0, "arguments.length > 0");
#line 3416 "RESTSupport.c"
	}
#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup ("");
#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	formdata_string = _tmp2_;
#line 3422 "RESTSupport.c"
	{
		gint i = 0;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		i = 0;
#line 3427 "RESTSupport.c"
		{
			gboolean _tmp3_ = FALSE;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp3_ = TRUE;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			while (TRUE) {
#line 3434 "RESTSupport.c"
				gint _tmp5_;
				PublishingRESTSupportArgument** _tmp6_;
				gint _tmp6__length1;
				const gchar* _tmp7_;
				PublishingRESTSupportArgument** _tmp8_;
				gint _tmp8__length1;
				gint _tmp9_;
				PublishingRESTSupportArgument* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				gint _tmp14_;
				PublishingRESTSupportArgument** _tmp15_;
				gint _tmp15__length1;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!_tmp3_) {
#line 3451 "RESTSupport.c"
					gint _tmp4_;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp4_ = i;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					i = _tmp4_ + 1;
#line 3457 "RESTSupport.c"
				}
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = FALSE;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp5_ = i;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = self->priv->arguments;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6__length1 = self->priv->arguments_length1;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!(_tmp5_ < _tmp6__length1)) {
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 3471 "RESTSupport.c"
				}
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = formdata_string;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = self->priv->arguments;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8__length1 = self->priv->arguments_length1;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = i;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp10_ = _tmp8_[_tmp9_];
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp11_ = publishing_rest_support_argument_to_string (_tmp10_, FALSE);
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12_ = _tmp11_;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp13_ = g_strconcat (_tmp7_, _tmp12_, NULL);
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (formdata_string);
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				formdata_string = _tmp13_;
#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp12_);
#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp14_ = i;
#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp15_ = self->priv->arguments;
#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp15__length1 = self->priv->arguments_length1;
#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp14_ < (_tmp15__length1 - 1)) {
#line 3503 "RESTSupport.c"
					const gchar* _tmp16_;
					gchar* _tmp17_;
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp16_ = formdata_string;
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp17_ = g_strconcat (_tmp16_, "&", NULL);
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_free0 (formdata_string);
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					formdata_string = _tmp17_;
#line 3514 "RESTSupport.c"
				}
			}
		}
	}
#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old_url = NULL;
#line 404 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	url_with_query = NULL;
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (publishing_rest_support_transaction_get_method (self) == PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET) {
#line 3525 "RESTSupport.c"
		PublishingRESTSupportArgument** _tmp19_;
		gint _tmp19__length1;
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = self->priv->arguments;
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19__length1 = self->priv->arguments_length1;
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = _tmp19__length1 > 0;
#line 3534 "RESTSupport.c"
	} else {
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = FALSE;
#line 3538 "RESTSupport.c"
	}
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp18_) {
#line 3542 "RESTSupport.c"
		SoupMessage* _tmp20_;
		SoupURI* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
		SoupMessage* _tmp29_;
		const gchar* _tmp30_;
		SoupURI* _tmp31_;
		SoupURI* _tmp32_;
#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp20_ = self->priv->message;
#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp21_ = soup_message_get_uri (_tmp20_);
#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp22_ = soup_uri_to_string (_tmp21_, FALSE);
#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (old_url);
#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		old_url = _tmp22_;
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp23_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = _tmp23_;
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp25_ = g_strconcat (_tmp24_, "?", NULL);
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp26_ = _tmp25_;
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp27_ = formdata_string;
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp28_ = g_strconcat (_tmp26_, _tmp27_, NULL);
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (url_with_query);
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		url_with_query = _tmp28_;
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp26_);
#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp24_);
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp29_ = self->priv->message;
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp30_ = url_with_query;
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp31_ = soup_uri_new (_tmp30_);
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp32_ = _tmp31_;
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_set_uri (_tmp29_, _tmp32_);
#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		__vala_SoupURI_free0 (_tmp32_);
#line 3598 "RESTSupport.c"
	} else {
		SoupMessage* _tmp33_;
		const gchar* _tmp34_;
		guint8* _tmp35_;
		gint _tmp35__length1;
		guint8* _tmp36_;
		gint _tmp36__length1;
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp33_ = self->priv->message;
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp34_ = formdata_string;
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp35_ = string_get_data (_tmp34_, &_tmp35__length1);
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp36_ = _tmp35_;
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp36__length1 = _tmp35__length1;
#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_set_request (_tmp33_, "application/x-www-form-urlencoded", SOUP_MEMORY_COPY, _tmp36_, (gsize) _tmp36__length1);
#line 3618 "RESTSupport.c"
	}
#line 414 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = TRUE;
#line 3622 "RESTSupport.c"
	{
		SoupMessage* _tmp37_;
		SoupURI* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp37_ = self->priv->message;
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp38_ = soup_message_get_uri (_tmp37_);
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp39_ = soup_uri_to_string (_tmp38_, FALSE);
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp40_ = _tmp39_;
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_debug ("RESTSupport.vala:417: sending message to URI = '%s'", _tmp40_);
#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp40_);
#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_send (self, &_inner_error_);
#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3644 "RESTSupport.c"
			goto __finally1;
		}
	}
	__finally1:
	{
		const gchar* _tmp41_;
#line 421 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp41_ = old_url;
#line 421 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp41_ != NULL) {
#line 3655 "RESTSupport.c"
			SoupMessage* _tmp42_;
			const gchar* _tmp43_;
			SoupURI* _tmp44_;
			SoupURI* _tmp45_;
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp42_ = self->priv->message;
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp43_ = old_url;
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp44_ = soup_uri_new (_tmp43_);
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp45_ = _tmp44_;
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			soup_message_set_uri (_tmp42_, _tmp45_);
#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupURI_free0 (_tmp45_);
#line 3672 "RESTSupport.c"
		}
	}
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (url_with_query);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (old_url);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (formdata_string);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3689 "RESTSupport.c"
		} else {
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (url_with_query);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (old_url);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (formdata_string);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3703 "RESTSupport.c"
		}
	}
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (url_with_query);
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (old_url);
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (formdata_string);
#line 3712 "RESTSupport.c"
}


void
publishing_rest_support_transaction_execute (PublishingRESTSupportTransaction* self,
                                             GError** error)
{
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->execute (self, error);
#line 3724 "RESTSupport.c"
}


gchar*
publishing_rest_support_transaction_get_response (PublishingRESTSupportTransaction* self)
{
	gchar* result = NULL;
	SoupMessage* _tmp0_;
	SoupMessageBody* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	gchar* _tmp3_;
#line 426 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_transaction_get_is_executed (self), "get_is_executed()");
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_->response_body;
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_->data;
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = (gint) _tmp1_->length;
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = g_strdup ((const gchar*) _tmp2_);
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp3_;
#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3755 "RESTSupport.c"
}


SoupMessageHeaders*
publishing_rest_support_transaction_get_response_headers (PublishingRESTSupportTransaction* self)
{
	SoupMessageHeaders* result = NULL;
	SoupMessage* _tmp0_;
	SoupMessageHeaders* _tmp1_;
#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 432 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_transaction_get_is_executed (self), "get_is_executed()");
#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_->response_headers;
#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3777 "RESTSupport.c"
}


SoupMessage*
publishing_rest_support_transaction_get_message (PublishingRESTSupportTransaction* self)
{
	SoupMessage* result = NULL;
	SoupMessage* _tmp0_;
	SoupMessage* _tmp1_;
#line 436 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_transaction_get_is_executed (self), "get_is_executed()");
#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3799 "RESTSupport.c"
}


static void
_vala_array_add1 (PublishingRESTSupportArgument** * array,
                  int* length,
                  int* size,
                  PublishingRESTSupportArgument* value)
{
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if ((*length) == (*size)) {
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1);
#line 3815 "RESTSupport.c"
	}
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	(*array)[(*length)++] = value;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	(*array)[*length] = NULL;
#line 3821 "RESTSupport.c"
}


void
publishing_rest_support_transaction_add_argument (PublishingRESTSupportTransaction* self,
                                                  const gchar* name,
                                                  const gchar* value)
{
	PublishingRESTSupportArgument** _tmp0_;
	gint _tmp0__length1;
	PublishingRESTSupportArgument* _tmp1_;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (name != NULL);
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (value != NULL);
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->arguments;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->arguments_length1;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_argument_new (name, value);
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_array_add1 (&self->priv->arguments, &self->priv->arguments_length1, &self->priv->_arguments_size_, _tmp1_);
#line 3847 "RESTSupport.c"
}


gchar*
publishing_rest_support_transaction_get_endpoint_url (PublishingRESTSupportTransaction* self)
{
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->endpoint_url;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ != NULL) {
#line 3863 "RESTSupport.c"
		const gchar* _tmp2_;
		gchar* _tmp3_;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = self->priv->endpoint_url;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = g_strdup (_tmp2_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp0_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _tmp3_;
#line 3874 "RESTSupport.c"
	} else {
		PublishingRESTSupportSession* _tmp4_;
		gchar* _tmp5_;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = self->priv->parent_session;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = publishing_rest_support_session_get_endpoint_url (_tmp4_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp0_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _tmp5_;
#line 3886 "RESTSupport.c"
	}
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3892 "RESTSupport.c"
}


static gpointer
_publishing_rest_support_session_ref0 (gpointer self)
{
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? publishing_rest_support_session_ref (self) : NULL;
#line 3901 "RESTSupport.c"
}


PublishingRESTSupportSession*
publishing_rest_support_transaction_get_parent_session (PublishingRESTSupportTransaction* self)
{
	PublishingRESTSupportSession* result = NULL;
	PublishingRESTSupportSession* _tmp0_;
	PublishingRESTSupportSession* _tmp1_;
#line 449 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->parent_session;
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _publishing_rest_support_session_ref0 (_tmp0_);
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3921 "RESTSupport.c"
}


static void
g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure,
                                       GValue * return_value,
                                       guint n_param_values,
                                       const GValue * param_values,
                                       gpointer invocation_hint,
                                       gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1, gint arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__INT_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (n_param_values == 3);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data1 = closure->data;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data2 = param_values->data[0].v_pointer;
#line 3947 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data1 = param_values->data[0].v_pointer;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data2 = closure->data;
#line 3953 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), data2);
#line 3959 "RESTSupport.c"
}


static void
publishing_rest_support_value_transaction_init (GValue* value)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value->data[0].v_pointer = NULL;
#line 3968 "RESTSupport.c"
}


static void
publishing_rest_support_value_transaction_free_value (GValue* value)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (value->data[0].v_pointer) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_unref (value->data[0].v_pointer);
#line 3979 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_transaction_copy_value (const GValue* src_value,
                                                      GValue* dest_value)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = publishing_rest_support_transaction_ref (src_value->data[0].v_pointer);
#line 3992 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3996 "RESTSupport.c"
	}
}


static gpointer
publishing_rest_support_value_transaction_peek_pointer (const GValue* value)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 4006 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_transaction_collect_value (GValue* value,
                                                         guint n_collect_values,
                                                         GTypeCValue* collect_values,
                                                         guint collect_flags)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 4018 "RESTSupport.c"
		PublishingRESTSupportTransaction * object;
		object = collect_values[0].v_pointer;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4025 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4029 "RESTSupport.c"
		}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_transaction_ref (object);
#line 4033 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 4037 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 4041 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_transaction_lcopy_value (const GValue* value,
                                                       guint n_collect_values,
                                                       GTypeCValue* collect_values,
                                                       guint collect_flags)
{
	PublishingRESTSupportTransaction ** object_p;
	object_p = collect_values[0].v_pointer;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 4057 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 4063 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 4067 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_transaction_ref (value->data[0].v_pointer);
#line 4071 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 4075 "RESTSupport.c"
}


GParamSpec*
publishing_rest_support_param_spec_transaction (const gchar* name,
                                                const gchar* nick,
                                                const gchar* blurb,
                                                GType object_type,
                                                GParamFlags flags)
{
	PublishingRESTSupportParamSpecTransaction* spec;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION), NULL);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 4095 "RESTSupport.c"
}


gpointer
publishing_rest_support_value_get_transaction (const GValue* value)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION), NULL);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 4106 "RESTSupport.c"
}


void
publishing_rest_support_value_set_transaction (GValue* value,
                                               gpointer v_object)
{
	PublishingRESTSupportTransaction * old;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_ref (value->data[0].v_pointer);
#line 4129 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 4133 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_unref (old);
#line 4139 "RESTSupport.c"
	}
}


void
publishing_rest_support_value_take_transaction (GValue* value,
                                                gpointer v_object)
{
	PublishingRESTSupportTransaction * old;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 4161 "RESTSupport.c"
	} else {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 4165 "RESTSupport.c"
	}
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_unref (old);
#line 4171 "RESTSupport.c"
	}
}


static void
publishing_rest_support_transaction_class_init (PublishingRESTSupportTransactionClass * klass)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_parent_class = g_type_class_peek_parent (klass);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_transaction_finalize;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportTransactionPrivate));
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->add_header = (void (*) (PublishingRESTSupportTransaction *, const gchar*, const gchar*)) publishing_rest_support_transaction_real_add_header;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_rest_support_transaction_real_execute;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_CHUNK_TRANSMITTED_SIGNAL] = g_signal_new ("chunk-transmitted", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_NETWORK_ERROR_SIGNAL] = g_signal_new ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_COMPLETED_SIGNAL] = g_signal_new ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 4195 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_instance_init (PublishingRESTSupportTransaction * self)
{
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_TRANSACTION_GET_PRIVATE (self);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = FALSE;
#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = NULL;
#line 162 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = NULL;
#line 163 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->bytes_written = 0;
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->err = NULL;
#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = NULL;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 4218 "RESTSupport.c"
}


static void
publishing_rest_support_transaction_finalize (PublishingRESTSupportTransaction * obj)
{
	PublishingRESTSupportTransaction * self;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 159 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->arguments = (_vala_array_free (self->priv->arguments, self->priv->arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 162 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_error_free0 (self->priv->err);
#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 4238 "RESTSupport.c"
}


GType
publishing_rest_support_transaction_get_type (void)
{
	static volatile gsize publishing_rest_support_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_transaction_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { publishing_rest_support_value_transaction_init, publishing_rest_support_value_transaction_free_value, publishing_rest_support_value_transaction_copy_value, publishing_rest_support_value_transaction_peek_pointer, "p", publishing_rest_support_value_transaction_collect_value, "p", publishing_rest_support_value_transaction_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportTransaction), 0, (GInstanceInitFunc) publishing_rest_support_transaction_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType publishing_rest_support_transaction_type_id;
		publishing_rest_support_transaction_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingRESTSupportTransaction", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&publishing_rest_support_transaction_type_id__volatile, publishing_rest_support_transaction_type_id);
	}
	return publishing_rest_support_transaction_type_id__volatile;
}


gpointer
publishing_rest_support_transaction_ref (gpointer instance)
{
	PublishingRESTSupportTransaction * self;
	self = instance;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 4267 "RESTSupport.c"
}


void
publishing_rest_support_transaction_unref (gpointer instance)
{
	PublishingRESTSupportTransaction * self;
	self = instance;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->finalize (self);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 4282 "RESTSupport.c"
	}
}


PublishingRESTSupportUploadTransaction*
publishing_rest_support_upload_transaction_construct (GType object_type,
                                                      PublishingRESTSupportSession* session,
                                                      SpitPublishingPublishable* publishable)
{
	PublishingRESTSupportUploadTransaction* self = NULL;
	SpitPublishingPublishable* _tmp0_;
	gchar* _tmp1_;
	GHashTable* _tmp2_;
	GeeHashMap* _tmp3_;
#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL);
#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct (object_type, session, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = _g_object_ref0 (publishable);
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->publishable = _tmp0_;
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (spit_publishing_publishable_get_media_type (publishable));
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->mime_type = _tmp1_;
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self);
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = _tmp2_;
#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->message_headers = _tmp3_;
#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 4329 "RESTSupport.c"
}


PublishingRESTSupportUploadTransaction*
publishing_rest_support_upload_transaction_new (PublishingRESTSupportSession* session,
                                                SpitPublishingPublishable* publishable)
{
#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_upload_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, session, publishable);
#line 4339 "RESTSupport.c"
}


PublishingRESTSupportUploadTransaction*
publishing_rest_support_upload_transaction_construct_with_endpoint_url (GType object_type,
                                                                        PublishingRESTSupportSession* session,
                                                                        SpitPublishingPublishable* publishable,
                                                                        const gchar* endpoint_url)
{
	PublishingRESTSupportUploadTransaction* self = NULL;
	SpitPublishingPublishable* _tmp0_;
	gchar* _tmp1_;
	GHashTable* _tmp2_;
	GeeHashMap* _tmp3_;
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL);
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, session, endpoint_url, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = _g_object_ref0 (publishable);
#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->publishable = _tmp0_;
#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (spit_publishing_publishable_get_media_type (publishable));
#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->mime_type = _tmp1_;
#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self);
#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = _tmp2_;
#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->message_headers = _tmp3_;
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 4388 "RESTSupport.c"
}


PublishingRESTSupportUploadTransaction*
publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session,
                                                                  SpitPublishingPublishable* publishable,
                                                                  const gchar* endpoint_url)
{
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_upload_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, session, publishable, endpoint_url);
#line 4399 "RESTSupport.c"
}


static void
publishing_rest_support_upload_transaction_real_add_header (PublishingRESTSupportTransaction* base,
                                                            const gchar* key,
                                                            const gchar* value)
{
	PublishingRESTSupportUploadTransaction * self;
	GeeHashMap* _tmp0_;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction);
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (key != NULL);
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (value != NULL);
#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->message_headers;
#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, value);
#line 4420 "RESTSupport.c"
}


static gchar*
publishing_rest_support_upload_transaction_media_type_to_mime_type (SpitPublishingPublisherMediaType media_type)
{
	gchar* result = NULL;
#line 486 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (media_type == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) {
#line 4430 "RESTSupport.c"
		gchar* _tmp0_;
#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = g_strdup ("image/jpeg");
#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result = _tmp0_;
#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return result;
#line 4438 "RESTSupport.c"
	} else {
#line 488 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (media_type == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) {
#line 4442 "RESTSupport.c"
			gchar* _tmp1_;
#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = g_strdup ("video/mpeg");
#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp1_;
#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 4450 "RESTSupport.c"
		} else {
			GEnumValue* _tmp2_;
#line 491 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = g_enum_get_value (g_type_class_ref (SPIT_PUBLISHING_PUBLISHER_TYPE_MEDIA_TYPE), media_type);
#line 491 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_error ("RESTSupport.vala:491: UploadTransaction: unknown media type %s.", (_tmp2_ != NULL) ? _tmp2_->value_name : NULL);
#line 4457 "RESTSupport.c"
		}
	}
}


static void
_g_free0_ (gpointer var)
{
#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	var = (g_free (var), NULL);
#line 4468 "RESTSupport.c"
}


static GHashTable*
publishing_rest_support_upload_transaction_create_default_binary_disposition_table (PublishingRESTSupportUploadTransaction* self)
{
	GHashTable* result = NULL;
	GHashTable* _result_ = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	gchar* _tmp3_;
	SpitPublishingPublishable* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION (self), NULL);
#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_str_hash;
#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_str_equal;
#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_result_ = _tmp2_;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = g_strdup ("filename");
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->publishable;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = spit_publishing_publishable_get_serialized_file (_tmp4_);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = g_file_get_basename (_tmp6_);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = _tmp7_;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = soup_uri_encode (_tmp8_, NULL);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hash_table_insert (_result_, _tmp3_, _tmp9_);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp8_);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_tmp6_);
#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _result_;
#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 4521 "RESTSupport.c"
}


static gpointer
_g_hash_table_ref0 (gpointer self)
{
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? g_hash_table_ref (self) : NULL;
#line 4530 "RESTSupport.c"
}


void
publishing_rest_support_upload_transaction_set_binary_disposition_table (PublishingRESTSupportUploadTransaction* self,
                                                                         GHashTable* new_disp_table)
{
	GHashTable* _tmp0_;
#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION (self));
#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (new_disp_table != NULL);
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = _g_hash_table_ref0 (new_disp_table);
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = _tmp0_;
#line 4549 "RESTSupport.c"
}


static void
_vala_SoupMultipart_free (SoupMultipart* self)
{
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_boxed_free (soup_multipart_get_type (), self);
#line 4558 "RESTSupport.c"
}


static void
_vala_SoupBuffer_free (SoupBuffer* self)
{
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_boxed_free (soup_buffer_get_type (), self);
#line 4567 "RESTSupport.c"
}


static void
publishing_rest_support_upload_transaction_real_execute (PublishingRESTSupportTransaction* base,
                                                         GError** error)
{
	PublishingRESTSupportUploadTransaction * self;
	PublishingRESTSupportArgument** request_arguments = NULL;
	gint _tmp0_;
	PublishingRESTSupportArgument** _tmp1_;
	gint request_arguments_length1;
	gint _request_arguments_size_;
	PublishingRESTSupportArgument** _tmp2_;
	gint _tmp2__length1;
	SoupMultipart* message_parts = NULL;
	SoupMultipart* _tmp3_;
	PublishingRESTSupportArgument** _tmp4_;
	gint _tmp4__length1;
	gchar* payload = NULL;
	gsize payload_length = 0UL;
	gint payload_part_num = 0;
	SoupMultipart* _tmp19_;
	SoupBuffer* bindable_data = NULL;
	const gchar* _tmp20_;
	guint8* _tmp21_;
	gint _tmp21__length1;
	guint8* _tmp22_;
	gint _tmp22__length1;
	gsize _tmp23_;
	SoupBuffer* _tmp24_;
	SoupMultipart* _tmp25_;
	SpitPublishingPublishable* _tmp26_;
	GFile* _tmp27_;
	GFile* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	const gchar* _tmp31_;
	SoupBuffer* _tmp32_;
	SoupMessageHeaders* image_part_header = NULL;
	SoupBuffer* image_part_body = NULL;
	SoupMultipart* _tmp33_;
	gint _tmp34_;
	SoupMessageHeaders* _tmp35_ = NULL;
	SoupBuffer* _tmp36_ = NULL;
	SoupMessageHeaders* _tmp37_;
	GHashTable* _tmp38_;
	SoupMessage* outbound_message = NULL;
	gchar* _tmp39_;
	gchar* _tmp40_;
	SoupMultipart* _tmp41_;
	SoupMessage* _tmp42_;
	SoupMessage* _tmp43_;
	GeeMapIterator* i = NULL;
	GeeHashMap* _tmp44_;
	GeeMapIterator* _tmp45_;
	gboolean cont = FALSE;
	GeeMapIterator* _tmp46_;
	SoupMessage* _tmp57_;
	GError * _inner_error_ = NULL;
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction);
#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_transaction_get_arguments (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_tmp0_);
#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	request_arguments = _tmp1_;
#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	request_arguments_length1 = _tmp0_;
#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_request_arguments_size_ = request_arguments_length1;
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = request_arguments;
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = request_arguments_length1;
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp2__length1 > 0, "request_arguments.length > 0");
#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = soup_multipart_new ("multipart/form-data");
#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	message_parts = _tmp3_;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = request_arguments;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4__length1 = request_arguments_length1;
#line 4652 "RESTSupport.c"
	{
		PublishingRESTSupportArgument** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection = _tmp4_;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection_length1 = _tmp4__length1;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (arg_it = 0; arg_it < _tmp4__length1; arg_it = arg_it + 1) {
#line 4664 "RESTSupport.c"
			PublishingRESTSupportArgument* _tmp5_;
			PublishingRESTSupportArgument* arg = NULL;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]);
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			arg = _tmp5_;
#line 4671 "RESTSupport.c"
			{
				SoupMultipart* _tmp6_;
				PublishingRESTSupportArgument* _tmp7_;
				const gchar* _tmp8_;
				PublishingRESTSupportArgument* _tmp9_;
				const gchar* _tmp10_;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = message_parts;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = arg;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = _tmp7_->key;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = arg;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp10_ = _tmp9_->value;
#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				soup_multipart_append_form_string (_tmp6_, _tmp8_, _tmp10_);
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_argument_unref0 (arg);
#line 4692 "RESTSupport.c"
			}
		}
	}
	{
		SpitPublishingPublishable* _tmp11_;
		GFile* _tmp12_;
		GFile* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_ = NULL;
		gsize _tmp17_ = 0UL;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = self->publishable;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = spit_publishing_publishable_get_serialized_file (_tmp11_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp13_ = _tmp12_;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = g_file_get_path (_tmp13_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp15_ = _tmp14_;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_file_get_contents (_tmp15_, &_tmp16_, &_tmp17_, &_inner_error_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (payload);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		payload = _tmp16_;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		payload_length = _tmp17_;
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp15_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (_tmp13_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 4730 "RESTSupport.c"
				goto __catch2_g_file_error;
			}
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4745 "RESTSupport.c"
		}
	}
	goto __finally2;
	__catch2_g_file_error:
	{
		GError* e = NULL;
		GError* _tmp18_;
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		e = _inner_error_;
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A temporary file needed for publishing is unavailable"));
#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp18_;
#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (e);
#line 4763 "RESTSupport.c"
		goto __finally2;
	}
	__finally2:
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4781 "RESTSupport.c"
		} else {
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4795 "RESTSupport.c"
		}
	}
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp19_ = message_parts;
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	payload_part_num = soup_multipart_get_length (_tmp19_);
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = payload;
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = string_get_data (_tmp20_, &_tmp21__length1);
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = _tmp21_;
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22__length1 = _tmp21__length1;
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = payload_length;
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp22_ + 0, ((gint) _tmp23_) - 0);
#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	bindable_data = _tmp24_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = message_parts;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp26_ = self->publishable;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp27_ = spit_publishing_publishable_get_serialized_file (_tmp26_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp28_ = _tmp27_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp29_ = g_file_get_path (_tmp28_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp30_ = _tmp29_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp31_ = self->mime_type;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp32_ = bindable_data;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_multipart_append_form_file (_tmp25_, "", _tmp30_, _tmp31_, _tmp32_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp30_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_tmp28_);
#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp33_ = message_parts;
#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp34_ = payload_part_num;
#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_multipart_get_part (_tmp33_, _tmp34_, &_tmp35_, &_tmp36_);
#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	image_part_header = _tmp35_;
#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	image_part_body = _tmp36_;
#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp37_ = image_part_header;
#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp38_ = self->binary_disposition_table;
#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_headers_set_content_disposition (_tmp37_, "form-data", _tmp38_);
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp39_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction));
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp40_ = _tmp39_;
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp41_ = message_parts;
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp42_ = soup_form_request_new_from_multipart (_tmp40_, _tmp41_);
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp43_ = _tmp42_;
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp40_);
#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	outbound_message = _tmp43_;
#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp44_ = self->message_headers;
#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp45_ = gee_abstract_map_map_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	i = _tmp45_;
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp46_ = i;
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	cont = gee_map_iterator_next (_tmp46_);
#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	while (TRUE) {
#line 4880 "RESTSupport.c"
		gboolean _tmp47_;
		SoupMessage* _tmp48_;
		SoupMessageHeaders* _tmp49_;
		GeeMapIterator* _tmp50_;
		gpointer _tmp51_;
		gchar* _tmp52_;
		GeeMapIterator* _tmp53_;
		gpointer _tmp54_;
		gchar* _tmp55_;
		GeeMapIterator* _tmp56_;
#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp47_ = cont;
#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (!_tmp47_) {
#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 4897 "RESTSupport.c"
		}
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp48_ = outbound_message;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp49_ = _tmp48_->request_headers;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp50_ = i;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp51_ = gee_map_iterator_get_key (_tmp50_);
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp52_ = (gchar*) _tmp51_;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp53_ = i;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp54_ = gee_map_iterator_get_value (_tmp53_);
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp55_ = (gchar*) _tmp54_;
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_headers_append (_tmp49_, _tmp52_, _tmp55_);
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp55_);
#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp52_);
#line 545 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp56_ = i;
#line 545 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		cont = gee_map_iterator_next (_tmp56_);
#line 4925 "RESTSupport.c"
	}
#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp57_ = outbound_message;
#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp57_);
#line 549 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (i);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (outbound_message);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupBuffer_free0 (bindable_data);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4955 "RESTSupport.c"
		} else {
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (i);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (outbound_message);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupBuffer_free0 (bindable_data);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4975 "RESTSupport.c"
		}
	}
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (i);
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (outbound_message);
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	__vala_SoupBuffer_free0 (bindable_data);
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (payload);
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	__vala_SoupMultipart_free0 (message_parts);
#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
#line 4990 "RESTSupport.c"
}


static void
publishing_rest_support_upload_transaction_class_init (PublishingRESTSupportUploadTransactionClass * klass)
{
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_upload_transaction_parent_class = g_type_class_peek_parent (klass);
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_upload_transaction_finalize;
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->add_header = (void (*) (PublishingRESTSupportTransaction *, const gchar*, const gchar*)) publishing_rest_support_upload_transaction_real_add_header;
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_rest_support_upload_transaction_real_execute;
#line 5005 "RESTSupport.c"
}


static void
publishing_rest_support_upload_transaction_instance_init (PublishingRESTSupportUploadTransaction * self)
{
#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = NULL;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->publishable = NULL;
#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->message_headers = NULL;
#line 5018 "RESTSupport.c"
}


static void
publishing_rest_support_upload_transaction_finalize (PublishingRESTSupportTransaction * obj)
{
	PublishingRESTSupportUploadTransaction * self;
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction);
#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_rest_support_upload_transaction_parent_class)->finalize (obj);
#line 5038 "RESTSupport.c"
}


GType
publishing_rest_support_upload_transaction_get_type (void)
{
	static volatile gsize publishing_rest_support_upload_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_upload_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportUploadTransaction), 0, (GInstanceInitFunc) publishing_rest_support_upload_transaction_instance_init, NULL };
		GType publishing_rest_support_upload_transaction_type_id;
		publishing_rest_support_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingRESTSupportUploadTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_upload_transaction_type_id__volatile, publishing_rest_support_upload_transaction_type_id);
	}
	return publishing_rest_support_upload_transaction_type_id__volatile;
}


static PublishingRESTSupportXmlDocument*
publishing_rest_support_xml_document_construct (GType object_type,
                                                xmlDoc* doc)
{
	PublishingRESTSupportXmlDocument* self = NULL;
#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportXmlDocument*) g_type_create_instance (object_type);
#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->document = doc;
#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 5067 "RESTSupport.c"
}


static PublishingRESTSupportXmlDocument*
publishing_rest_support_xml_document_new (xmlDoc* doc)
{
#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_xml_document_construct (PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, doc);
#line 5076 "RESTSupport.c"
}


xmlNode*
publishing_rest_support_xml_document_get_root_node (PublishingRESTSupportXmlDocument* self)
{
	xmlNode* result = NULL;
	xmlDoc* _tmp0_;
	xmlNode* _tmp1_;
#line 570 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->document;
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = xmlDocGetRootElement (_tmp0_);
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 5096 "RESTSupport.c"
}


xmlNode*
publishing_rest_support_xml_document_get_named_child (PublishingRESTSupportXmlDocument* self,
                                                      xmlNode* parent,
                                                      const gchar* child_name,
                                                      GError** error)
{
	xmlNode* result = NULL;
	xmlNode* doc_node_iter = NULL;
	xmlNode* _tmp0_;
	GError* _tmp8_;
	GError * _inner_error_ = NULL;
#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (child_name != NULL, NULL);
#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = parent->children;
#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	doc_node_iter = _tmp0_;
#line 5119 "RESTSupport.c"
	{
		gboolean _tmp1_ = FALSE;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = TRUE;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		while (TRUE) {
#line 5126 "RESTSupport.c"
			xmlNode* _tmp4_;
			xmlNode* _tmp5_;
			const gchar* _tmp6_;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (!_tmp1_) {
#line 5132 "RESTSupport.c"
				xmlNode* _tmp2_;
				xmlNode* _tmp3_;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp2_ = doc_node_iter;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = _tmp2_->next;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				doc_node_iter = _tmp3_;
#line 5141 "RESTSupport.c"
			}
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = FALSE;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = doc_node_iter;
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (!(_tmp4_ != NULL)) {
#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				break;
#line 5151 "RESTSupport.c"
			}
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = doc_node_iter;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = _tmp5_->name;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (g_strcmp0 (_tmp6_, child_name) == 0) {
#line 5159 "RESTSupport.c"
				xmlNode* _tmp7_;
#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = doc_node_iter;
#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				result = _tmp7_;
#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return result;
#line 5167 "RESTSupport.c"
			}
		}
	}
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML node %s", child_name);
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_inner_error_ = _tmp8_;
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_propagate_error (error, _inner_error_);
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return NULL;
#line 5181 "RESTSupport.c"
	} else {
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return NULL;
#line 5189 "RESTSupport.c"
	}
}


gchar*
publishing_rest_support_xml_document_get_property_value (PublishingRESTSupportXmlDocument* self,
                                                         xmlNode* node,
                                                         const gchar* property_key,
                                                         GError** error)
{
	gchar* result = NULL;
	gchar* value_string = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	GError * _inner_error_ = NULL;
#line 587 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 587 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (property_key != NULL, NULL);
#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = (gchar*) xmlGetProp (node, (xmlChar*) property_key);
#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value_string = _tmp0_;
#line 590 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = value_string;
#line 590 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ == NULL) {
#line 5217 "RESTSupport.c"
		const gchar* _tmp2_;
		GError* _tmp3_;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = node->name;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML " "property %s on node %s", property_key, _tmp2_);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp3_;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (value_string);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5234 "RESTSupport.c"
		} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (value_string);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5244 "RESTSupport.c"
		}
	}
#line 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = value_string;
#line 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 5251 "RESTSupport.c"
}


static gchar*
string_chug (const gchar* self)
{
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
#line 1240 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1241 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = g_strdup (self);
#line 1241 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1242 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1242 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_strchug (_tmp1_);
#line 1243 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _result_;
#line 1243 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 5276 "RESTSupport.c"
}


static gchar*
string_chomp (const gchar* self)
{
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
#line 1232 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1233 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = g_strdup (self);
#line 1233 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1234 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1234 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_strchomp (_tmp1_);
#line 1235 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _result_;
#line 1235 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 5301 "RESTSupport.c"
}


PublishingRESTSupportXmlDocument*
publishing_rest_support_xml_document_parse_string (const gchar* input_string,
                                                   PublishingRESTSupportXmlDocumentCheckForErrorResponse check_for_error_response,
                                                   void* check_for_error_response_target,
                                                   GError** error)
{
	PublishingRESTSupportXmlDocument* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	xmlDoc* doc = NULL;
	gint _tmp15_;
	gint _tmp16_;
	xmlDoc* _tmp17_;
	xmlDoc* _tmp18_;
	xmlDoc* _tmp20_;
	xmlNode* _tmp21_;
	PublishingRESTSupportXmlDocument* rest_doc = NULL;
	xmlDoc* _tmp23_;
	PublishingRESTSupportXmlDocument* _tmp24_;
	gchar* _result_ = NULL;
	PublishingRESTSupportXmlDocument* _tmp25_;
	gchar* _tmp26_;
	const gchar* _tmp27_;
	GError * _inner_error_ = NULL;
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (input_string == NULL) {
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = TRUE;
#line 5338 "RESTSupport.c"
	} else {
		gint _tmp1_;
		gint _tmp2_;
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = strlen (input_string);
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = _tmp1_;
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _tmp2_ == 0;
#line 5348 "RESTSupport.c"
	}
#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#line 5352 "RESTSupport.c"
		GError* _tmp3_;
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Empty XML string");
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp3_;
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5364 "RESTSupport.c"
		} else {
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5372 "RESTSupport.c"
		}
	}
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = string_chug (input_string);
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = string_chomp (_tmp6_);
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = _tmp7_;
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = !g_str_has_prefix (_tmp8_, "<");
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp8_);
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp6_);
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp9_) {
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = TRUE;
#line 5393 "RESTSupport.c"
	} else {
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp10_ = string_chug (input_string);
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = _tmp10_;
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = string_chomp (_tmp11_);
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp13_ = _tmp12_;
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = !g_str_has_suffix (_tmp13_, ">");
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp13_);
#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp11_);
#line 5413 "RESTSupport.c"
	}
#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp4_) {
#line 5417 "RESTSupport.c"
		GError* _tmp14_;
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp14_;
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5429 "RESTSupport.c"
		} else {
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5437 "RESTSupport.c"
		}
	}
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = strlen (input_string);
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = _tmp15_;
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp17_ = xmlReadMemory (input_string, (gint) _tmp16_, NULL, NULL, (gint) (XML_PARSE_NOBLANKS | XML_PARSE_RECOVER));
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	doc = _tmp17_;
#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp18_ = doc;
#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp18_ == NULL) {
#line 5452 "RESTSupport.c"
		GError* _tmp19_;
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp19_;
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5464 "RESTSupport.c"
		} else {
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5472 "RESTSupport.c"
		}
	}
#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = doc;
#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = _tmp20_->children;
#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp21_ == NULL) {
#line 5481 "RESTSupport.c"
		GError* _tmp22_;
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp22_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp22_;
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5493 "RESTSupport.c"
		} else {
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5501 "RESTSupport.c"
		}
	}
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = doc;
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = publishing_rest_support_xml_document_new (_tmp23_);
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	rest_doc = _tmp24_;
#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = rest_doc;
#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp26_ = check_for_error_response (_tmp25_, check_for_error_response_target);
#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_result_ = _tmp26_;
#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp27_ = _result_;
#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp27_ != NULL) {
#line 5520 "RESTSupport.c"
		const gchar* _tmp28_;
		GError* _tmp29_;
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp28_ = _result_;
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp29_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SERVICE_ERROR, "%s", _tmp28_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp29_;
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_result_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_xml_document_unref0 (rest_doc);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5539 "RESTSupport.c"
		} else {
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_result_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_xml_document_unref0 (rest_doc);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5551 "RESTSupport.c"
		}
	}
#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = rest_doc;
#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_result_);
#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 5560 "RESTSupport.c"
}


static void
publishing_rest_support_value_xml_document_init (GValue* value)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value->data[0].v_pointer = NULL;
#line 5569 "RESTSupport.c"
}


static void
publishing_rest_support_value_xml_document_free_value (GValue* value)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (value->data[0].v_pointer) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_unref (value->data[0].v_pointer);
#line 5580 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_xml_document_copy_value (const GValue* src_value,
                                                       GValue* dest_value)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = publishing_rest_support_xml_document_ref (src_value->data[0].v_pointer);
#line 5593 "RESTSupport.c"
	} else {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 5597 "RESTSupport.c"
	}
}


static gpointer
publishing_rest_support_value_xml_document_peek_pointer (const GValue* value)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 5607 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_xml_document_collect_value (GValue* value,
                                                          guint n_collect_values,
                                                          GTypeCValue* collect_values,
                                                          guint collect_flags)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 5619 "RESTSupport.c"
		PublishingRESTSupportXmlDocument * object;
		object = collect_values[0].v_pointer;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 5626 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 5630 "RESTSupport.c"
		}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_xml_document_ref (object);
#line 5634 "RESTSupport.c"
	} else {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5638 "RESTSupport.c"
	}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 5642 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_xml_document_lcopy_value (const GValue* value,
                                                        guint n_collect_values,
                                                        GTypeCValue* collect_values,
                                                        guint collect_flags)
{
	PublishingRESTSupportXmlDocument ** object_p;
	object_p = collect_values[0].v_pointer;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 5658 "RESTSupport.c"
	}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 5664 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 5668 "RESTSupport.c"
	} else {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_xml_document_ref (value->data[0].v_pointer);
#line 5672 "RESTSupport.c"
	}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 5676 "RESTSupport.c"
}


GParamSpec*
publishing_rest_support_param_spec_xml_document (const gchar* name,
                                                 const gchar* nick,
                                                 const gchar* blurb,
                                                 GType object_type,
                                                 GParamFlags flags)
{
	PublishingRESTSupportParamSpecXmlDocument* spec;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT), NULL);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 5696 "RESTSupport.c"
}


gpointer
publishing_rest_support_value_get_xml_document (const GValue* value)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT), NULL);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 5707 "RESTSupport.c"
}


void
publishing_rest_support_value_set_xml_document (GValue* value,
                                                gpointer v_object)
{
	PublishingRESTSupportXmlDocument * old;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_ref (value->data[0].v_pointer);
#line 5730 "RESTSupport.c"
	} else {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5734 "RESTSupport.c"
	}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_unref (old);
#line 5740 "RESTSupport.c"
	}
}


void
publishing_rest_support_value_take_xml_document (GValue* value,
                                                 gpointer v_object)
{
	PublishingRESTSupportXmlDocument * old;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 5762 "RESTSupport.c"
	} else {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5766 "RESTSupport.c"
	}
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_unref (old);
#line 5772 "RESTSupport.c"
	}
}


static void
publishing_rest_support_xml_document_class_init (PublishingRESTSupportXmlDocumentClass * klass)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_xml_document_parent_class = g_type_class_peek_parent (klass);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportXmlDocumentClass *) klass)->finalize = publishing_rest_support_xml_document_finalize;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportXmlDocumentPrivate));
#line 5786 "RESTSupport.c"
}


static void
publishing_rest_support_xml_document_instance_init (PublishingRESTSupportXmlDocument * self)
{
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_PRIVATE (self);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 5797 "RESTSupport.c"
}


static void
publishing_rest_support_xml_document_finalize (PublishingRESTSupportXmlDocument * obj)
{
	PublishingRESTSupportXmlDocument * self;
	xmlDoc* _tmp0_;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocument);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 567 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->document;
#line 567 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	xmlFreeDoc (_tmp0_);
#line 5814 "RESTSupport.c"
}


GType
publishing_rest_support_xml_document_get_type (void)
{
	static volatile gsize publishing_rest_support_xml_document_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_xml_document_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { publishing_rest_support_value_xml_document_init, publishing_rest_support_value_xml_document_free_value, publishing_rest_support_value_xml_document_copy_value, publishing_rest_support_value_xml_document_peek_pointer, "p", publishing_rest_support_value_xml_document_collect_value, "p", publishing_rest_support_value_xml_document_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportXmlDocumentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_xml_document_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportXmlDocument), 0, (GInstanceInitFunc) publishing_rest_support_xml_document_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType publishing_rest_support_xml_document_type_id;
		publishing_rest_support_xml_document_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingRESTSupportXmlDocument", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&publishing_rest_support_xml_document_type_id__volatile, publishing_rest_support_xml_document_type_id);
	}
	return publishing_rest_support_xml_document_type_id__volatile;
}


gpointer
publishing_rest_support_xml_document_ref (gpointer instance)
{
	PublishingRESTSupportXmlDocument * self;
	self = instance;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 5843 "RESTSupport.c"
}


void
publishing_rest_support_xml_document_unref (gpointer instance)
{
	PublishingRESTSupportXmlDocument * self;
	self = instance;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_CLASS (self)->finalize (self);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 5858 "RESTSupport.c"
	}
}


gchar*
publishing_rest_support_decimal_entity_encode (const gchar* source)
{
	gchar* result = NULL;
	GString* encoded_str_builder = NULL;
	GString* _tmp0_;
	gchar* current_char = NULL;
	gchar* _tmp1_;
	GString* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
#line 640 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_string_new ("");
#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	encoded_str_builder = _tmp0_;
#line 642 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (source);
#line 642 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	current_char = _tmp1_;
#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	while (TRUE) {
#line 5886 "RESTSupport.c"
		gint current_char_value = 0;
		const gchar* _tmp2_;
		gint _tmp3_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gint _tmp7_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = current_char;
#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		current_char_value = (gint) g_utf8_get_char_validated (_tmp2_, (gssize) -1);
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = current_char_value;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp3_ < 1) {
#line 648 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 5907 "RESTSupport.c"
		}
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = current_char_value;
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp7_ < 128) {
#line 5913 "RESTSupport.c"
			gint _tmp8_;
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = current_char_value;
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = _tmp8_ != ((gint) '&');
#line 5919 "RESTSupport.c"
		} else {
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = FALSE;
#line 5923 "RESTSupport.c"
		}
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp6_) {
#line 5927 "RESTSupport.c"
			gint _tmp9_;
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp9_ = current_char_value;
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = _tmp9_ != ((gint) '<');
#line 5933 "RESTSupport.c"
		} else {
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = FALSE;
#line 5937 "RESTSupport.c"
		}
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp5_) {
#line 5941 "RESTSupport.c"
			gint _tmp10_;
#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp10_ = current_char_value;
#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = _tmp10_ != ((gint) '>');
#line 5947 "RESTSupport.c"
		} else {
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = FALSE;
#line 5951 "RESTSupport.c"
		}
#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp4_) {
#line 5955 "RESTSupport.c"
			GString* _tmp11_;
			const gchar* _tmp12_;
#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp11_ = encoded_str_builder;
#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp12_ = current_char;
#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_string_append_unichar (_tmp11_, g_utf8_get_char_validated (_tmp12_, (gssize) -1));
#line 5964 "RESTSupport.c"
		} else {
			GString* _tmp13_;
			gint _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp13_ = encoded_str_builder;
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp14_ = current_char_value;
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp15_ = g_strdup_printf ("&#%d;", _tmp14_);
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp16_ = _tmp15_;
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_string_append (_tmp13_, _tmp16_);
#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp16_);
#line 5982 "RESTSupport.c"
		}
#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp17_ = current_char;
#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = g_utf8_next_char (_tmp17_);
#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = g_strdup (_tmp18_);
#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (current_char);
#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		current_char = _tmp19_;
#line 5994 "RESTSupport.c"
	}
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = encoded_str_builder;
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = _tmp20_->str;
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = g_strdup (_tmp21_);
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp22_;
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (current_char);
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (encoded_str_builder);
#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6010 "RESTSupport.c"
}


static SpitPublishingPublishable**
_vala_array_dup2 (SpitPublishingPublishable** self,
                  int length)
{
	SpitPublishingPublishable** result;
	int i;
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = g_new0 (SpitPublishingPublishable*, length + 1);
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	for (i = 0; i < length; i++) {
#line 6024 "RESTSupport.c"
		SpitPublishingPublishable* _tmp0_;
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _g_object_ref0 (self[i]);
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result[i] = _tmp0_;
#line 6030 "RESTSupport.c"
	}
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6034 "RESTSupport.c"
}


PublishingRESTSupportBatchUploader*
publishing_rest_support_batch_uploader_construct (GType object_type,
                                                  PublishingRESTSupportSession* session,
                                                  SpitPublishingPublishable** publishables,
                                                  int publishables_length1)
{
	PublishingRESTSupportBatchUploader* self = NULL;
	SpitPublishingPublishable** _tmp0_;
	gint _tmp0__length1;
	PublishingRESTSupportSession* _tmp1_;
#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportBatchUploader*) g_type_create_instance (object_type);
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = (publishables != NULL) ? _vala_array_dup2 (publishables, publishables_length1) : ((gpointer) publishables);
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = publishables_length1;
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL);
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = _tmp0_;
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables_length1 = _tmp0__length1;
#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->_publishables_size_ = self->priv->publishables_length1;
#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _publishing_rest_support_session_ref0 (session);
#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = _tmp1_;
#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 6072 "RESTSupport.c"
}


static void
_publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted (PublishingRESTSupportTransaction* _sender,
                                                                                                                    gint bytes_written_so_far,
                                                                                                                    gint total_bytes,
                                                                                                                    gpointer self)
{
#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_batch_uploader_on_chunk_transmitted ((PublishingRESTSupportBatchUploader*) self, bytes_written_so_far, total_bytes);
#line 6084 "RESTSupport.c"
}


static void
publishing_rest_support_batch_uploader_send_files (PublishingRESTSupportBatchUploader* self)
{
	gboolean stop = FALSE;
	SpitPublishingPublishable** _tmp0_;
	gint _tmp0__length1;
	gboolean _tmp23_;
	GError * _inner_error_ = NULL;
#line 678 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->current_file = 0;
#line 680 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	stop = FALSE;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 6106 "RESTSupport.c"
	{
		SpitPublishingPublishable** publishable_collection = NULL;
		gint publishable_collection_length1 = 0;
		gint _publishable_collection_size_ = 0;
		gint publishable_it = 0;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishable_collection = _tmp0_;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishable_collection_length1 = _tmp0__length1;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (publishable_it = 0; publishable_it < _tmp0__length1; publishable_it = publishable_it + 1) {
#line 6118 "RESTSupport.c"
			SpitPublishingPublishable* _tmp1_;
			SpitPublishingPublishable* publishable = NULL;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = _g_object_ref0 (publishable_collection[publishable_it]);
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishable = _tmp1_;
#line 6125 "RESTSupport.c"
			{
				GFile* file = NULL;
				SpitPublishingPublishable* _tmp2_;
				GFile* _tmp3_;
				GFile* _tmp4_;
				gdouble fraction_complete = 0.0;
				gint _tmp6_;
				SpitPublishingPublishable** _tmp7_;
				gint _tmp7__length1;
				SpitPublishingProgressCallback _tmp8_;
				void* _tmp8__target;
				PublishingRESTSupportTransaction* txn = NULL;
				SpitPublishingPublishable** _tmp12_;
				gint _tmp12__length1;
				gint _tmp13_;
				SpitPublishingPublishable* _tmp14_;
				PublishingRESTSupportTransaction* _tmp15_;
				PublishingRESTSupportTransaction* _tmp16_;
				PublishingRESTSupportTransaction* _tmp19_;
				guint _tmp20_;
				gboolean _tmp21_;
				gint _tmp22_;
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp2_ = publishable;
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = spit_publishing_publishable_get_serialized_file (_tmp2_);
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				file = _tmp3_;
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = file;
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp4_ == NULL) {
#line 6158 "RESTSupport.c"
					gint _tmp5_;
#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp5_ = self->priv->current_file;
#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					self->priv->current_file = _tmp5_ + 1;
#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					continue;
#line 6170 "RESTSupport.c"
				}
#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = self->priv->current_file;
#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = self->priv->publishables;
#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7__length1 = self->priv->publishables_length1;
#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				fraction_complete = ((gdouble) _tmp6_) / _tmp7__length1;
#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = self->priv->status_updated;
#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8__target = self->priv->status_updated_target;
#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp8_ != NULL) {
#line 6186 "RESTSupport.c"
					SpitPublishingProgressCallback _tmp9_;
					void* _tmp9__target;
					gint _tmp10_;
					gdouble _tmp11_;
#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9_ = self->priv->status_updated;
#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9__target = self->priv->status_updated_target;
#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp10_ = self->priv->current_file;
#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp11_ = fraction_complete;
#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9_ (_tmp10_ + 1, _tmp11_, _tmp9__target);
#line 6201 "RESTSupport.c"
				}
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12_ = self->priv->publishables;
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12__length1 = self->priv->publishables_length1;
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp13_ = self->priv->current_file;
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp14_ = _tmp12_[_tmp13_];
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp15_ = publishing_rest_support_batch_uploader_create_transaction (self, _tmp14_);
#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				txn = _tmp15_;
#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp16_ = txn;
#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_signal_connect (_tmp16_, "chunk-transmitted", (GCallback) _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted, self);
#line 6219 "RESTSupport.c"
				{
					PublishingRESTSupportTransaction* _tmp17_;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp17_ = txn;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					publishing_rest_support_transaction_execute (_tmp17_, &_inner_error_);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 6230 "RESTSupport.c"
							goto __catch3_spit_publishing_publishing_error;
						}
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_publishing_rest_support_transaction_unref0 (txn);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_g_object_unref0 (file);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_g_object_unref0 (publishable);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						g_clear_error (&_inner_error_);
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						return;
#line 6245 "RESTSupport.c"
					}
				}
				goto __finally3;
				__catch3_spit_publishing_publishing_error:
				{
					GError* err = NULL;
					GError* _tmp18_;
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					err = _inner_error_;
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_inner_error_ = NULL;
#line 701 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp18_ = err;
#line 701 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_signal_emit (self, publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_ERROR_SIGNAL], 0, _tmp18_);
#line 702 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					stop = TRUE;
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_error_free0 (err);
#line 6265 "RESTSupport.c"
				}
				__finally3:
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_publishing_rest_support_transaction_unref0 (txn);
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.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 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 6282 "RESTSupport.c"
				}
#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp19_ = txn;
#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_signal_parse_name ("chunk-transmitted", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp20_, NULL, FALSE);
#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_signal_handlers_disconnect_matched (_tmp19_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted, self);
#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp21_ = stop;
#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp21_) {
#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_publishing_rest_support_transaction_unref0 (txn);
#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 6302 "RESTSupport.c"
				}
#line 710 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp22_ = self->priv->current_file;
#line 710 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				self->priv->current_file = _tmp22_ + 1;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_transaction_unref0 (txn);
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_object_unref0 (file);
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_object_unref0 (publishable);
#line 6314 "RESTSupport.c"
			}
		}
	}
#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = stop;
#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp23_) {
#line 6322 "RESTSupport.c"
		gint _tmp24_;
#line 714 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = self->priv->current_file;
#line 714 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit (self, publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_COMPLETE_SIGNAL], 0, _tmp24_);
#line 6328 "RESTSupport.c"
	}
}


static void
publishing_rest_support_batch_uploader_on_chunk_transmitted (PublishingRESTSupportBatchUploader* self,
                                                             gint bytes_written_so_far,
                                                             gint total_bytes)
{
	gdouble file_span = 0.0;
	SpitPublishingPublishable** _tmp0_;
	gint _tmp0__length1;
	gdouble this_file_fraction_complete = 0.0;
	gdouble fraction_complete = 0.0;
	gint _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	SpitPublishingProgressCallback _tmp5_;
	void* _tmp5__target;
#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	file_span = 1.0 / _tmp0__length1;
#line 719 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	this_file_fraction_complete = ((gdouble) bytes_written_so_far) / total_bytes;
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->current_file;
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = file_span;
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = this_file_fraction_complete;
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = file_span;
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	fraction_complete = (_tmp1_ * _tmp2_) + (_tmp3_ * _tmp4_);
#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = self->priv->status_updated;
#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5__target = self->priv->status_updated_target;
#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp5_ != NULL) {
#line 6375 "RESTSupport.c"
		SpitPublishingProgressCallback _tmp6_;
		void* _tmp6__target;
		gint _tmp7_;
		gdouble _tmp8_;
#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = self->priv->status_updated;
#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6__target = self->priv->status_updated_target;
#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = self->priv->current_file;
#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = fraction_complete;
#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ (_tmp7_ + 1, _tmp8_, _tmp6__target);
#line 6390 "RESTSupport.c"
	}
}


PublishingRESTSupportSession*
publishing_rest_support_batch_uploader_get_session (PublishingRESTSupportBatchUploader* self)
{
	PublishingRESTSupportSession* result = NULL;
	PublishingRESTSupportSession* _tmp0_;
	PublishingRESTSupportSession* _tmp1_;
#line 727 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL);
#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->session;
#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _publishing_rest_support_session_ref0 (_tmp0_);
#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6411 "RESTSupport.c"
}


SpitPublishingPublishable*
publishing_rest_support_batch_uploader_get_current_publishable (PublishingRESTSupportBatchUploader* self)
{
	SpitPublishingPublishable* result = NULL;
	SpitPublishingPublishable** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_;
	SpitPublishingPublishable* _tmp2_;
	SpitPublishingPublishable* _tmp3_;
#line 731 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL);
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->current_file;
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp0_[_tmp1_];
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp3_;
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6440 "RESTSupport.c"
}


static PublishingRESTSupportTransaction*
publishing_rest_support_batch_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* self,
                                                                SpitPublishingPublishable* publishable)
{
#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_batch_uploader_create_transaction'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6452 "RESTSupport.c"
}


PublishingRESTSupportTransaction*
publishing_rest_support_batch_uploader_create_transaction (PublishingRESTSupportBatchUploader* self,
                                                           SpitPublishingPublishable* publishable)
{
#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL);
#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_CLASS (self)->create_transaction (self, publishable);
#line 6464 "RESTSupport.c"
}


void
publishing_rest_support_batch_uploader_upload (PublishingRESTSupportBatchUploader* self,
                                               SpitPublishingProgressCallback status_updated,
                                               void* status_updated_target)
{
	SpitPublishingPublishable** _tmp0_;
	gint _tmp0__length1;
#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated = status_updated;
#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated_target = status_updated_target;
#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0__length1 > 0) {
#line 741 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_send_files (self);
#line 6489 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_batch_uploader_init (GValue* value)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value->data[0].v_pointer = NULL;
#line 6499 "RESTSupport.c"
}


static void
publishing_rest_support_value_batch_uploader_free_value (GValue* value)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (value->data[0].v_pointer) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_unref (value->data[0].v_pointer);
#line 6510 "RESTSupport.c"
	}
}


static void
publishing_rest_support_value_batch_uploader_copy_value (const GValue* src_value,
                                                         GValue* dest_value)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = publishing_rest_support_batch_uploader_ref (src_value->data[0].v_pointer);
#line 6523 "RESTSupport.c"
	} else {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 6527 "RESTSupport.c"
	}
}


static gpointer
publishing_rest_support_value_batch_uploader_peek_pointer (const GValue* value)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 6537 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_batch_uploader_collect_value (GValue* value,
                                                            guint n_collect_values,
                                                            GTypeCValue* collect_values,
                                                            guint collect_flags)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 6549 "RESTSupport.c"
		PublishingRESTSupportBatchUploader * object;
		object = collect_values[0].v_pointer;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 6556 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 6560 "RESTSupport.c"
		}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_batch_uploader_ref (object);
#line 6564 "RESTSupport.c"
	} else {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6568 "RESTSupport.c"
	}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6572 "RESTSupport.c"
}


static gchar*
publishing_rest_support_value_batch_uploader_lcopy_value (const GValue* value,
                                                          guint n_collect_values,
                                                          GTypeCValue* collect_values,
                                                          guint collect_flags)
{
	PublishingRESTSupportBatchUploader ** object_p;
	object_p = collect_values[0].v_pointer;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 6588 "RESTSupport.c"
	}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 6594 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 6598 "RESTSupport.c"
	} else {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer);
#line 6602 "RESTSupport.c"
	}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6606 "RESTSupport.c"
}


GParamSpec*
publishing_rest_support_param_spec_batch_uploader (const gchar* name,
                                                   const gchar* nick,
                                                   const gchar* blurb,
                                                   GType object_type,
                                                   GParamFlags flags)
{
	PublishingRESTSupportParamSpecBatchUploader* spec;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER), NULL);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 6626 "RESTSupport.c"
}


gpointer
publishing_rest_support_value_get_batch_uploader (const GValue* value)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER), NULL);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 6637 "RESTSupport.c"
}


void
publishing_rest_support_value_set_batch_uploader (GValue* value,
                                                  gpointer v_object)
{
	PublishingRESTSupportBatchUploader * old;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer);
#line 6660 "RESTSupport.c"
	} else {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6664 "RESTSupport.c"
	}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_unref (old);
#line 6670 "RESTSupport.c"
	}
}


void
publishing_rest_support_value_take_batch_uploader (GValue* value,
                                                   gpointer v_object)
{
	PublishingRESTSupportBatchUploader * old;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 6692 "RESTSupport.c"
	} else {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6696 "RESTSupport.c"
	}
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_unref (old);
#line 6702 "RESTSupport.c"
	}
}


static void
publishing_rest_support_batch_uploader_class_init (PublishingRESTSupportBatchUploaderClass * klass)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_batch_uploader_parent_class = g_type_class_peek_parent (klass);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_rest_support_batch_uploader_finalize;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportBatchUploaderPrivate));
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = (PublishingRESTSupportTransaction* (*) (PublishingRESTSupportBatchUploader *, SpitPublishingPublishable*)) publishing_rest_support_batch_uploader_real_create_transaction;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_COMPLETE_SIGNAL] = g_signal_new ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_ERROR_SIGNAL] = g_signal_new ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
#line 6722 "RESTSupport.c"
}


static void
publishing_rest_support_batch_uploader_instance_init (PublishingRESTSupportBatchUploader * self)
{
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_PRIVATE (self);
#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->current_file = 0;
#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = NULL;
#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables_length1 = 0;
#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->_publishables_size_ = self->priv->publishables_length1;
#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = NULL;
#line 668 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated = NULL;
#line 668 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated_target = self;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 6747 "RESTSupport.c"
}


static void
publishing_rest_support_batch_uploader_finalize (PublishingRESTSupportBatchUploader * obj)
{
	PublishingRESTSupportBatchUploader * self;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL);
#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 6763 "RESTSupport.c"
}


GType
publishing_rest_support_batch_uploader_get_type (void)
{
	static volatile gsize publishing_rest_support_batch_uploader_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_batch_uploader_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { publishing_rest_support_value_batch_uploader_init, publishing_rest_support_value_batch_uploader_free_value, publishing_rest_support_value_batch_uploader_copy_value, publishing_rest_support_value_batch_uploader_peek_pointer, "p", publishing_rest_support_value_batch_uploader_collect_value, "p", publishing_rest_support_value_batch_uploader_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportBatchUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_batch_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportBatchUploader), 0, (GInstanceInitFunc) publishing_rest_support_batch_uploader_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType publishing_rest_support_batch_uploader_type_id;
		publishing_rest_support_batch_uploader_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingRESTSupportBatchUploader", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&publishing_rest_support_batch_uploader_type_id__volatile, publishing_rest_support_batch_uploader_type_id);
	}
	return publishing_rest_support_batch_uploader_type_id__volatile;
}


gpointer
publishing_rest_support_batch_uploader_ref (gpointer instance)
{
	PublishingRESTSupportBatchUploader * self;
	self = instance;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 6792 "RESTSupport.c"
}


void
publishing_rest_support_batch_uploader_unref (gpointer instance)
{
	PublishingRESTSupportBatchUploader * self;
	self = instance;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_CLASS (self)->finalize (self);
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 6807 "RESTSupport.c"
	}
}


static gunichar
string_get_char (const gchar* self,
                 glong index)
{
	gunichar result = 0U;
#line 1154 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0U);
#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	result = g_utf8_get_char (((gchar*) self) + index);
#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 6823 "RESTSupport.c"
}


gchar*
publishing_rest_support_asciify_string (const gchar* s)
{
	gchar* result = NULL;
	gchar* t = NULL;
	gchar* _tmp0_;
	GString* b = NULL;
	GString* _tmp1_;
	GString* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (s != NULL, NULL);
#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_utf8_normalize (s, (gssize) -1, G_NORMALIZE_DEFAULT);
#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	t = _tmp0_;
#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_string_new ("");
#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	b = _tmp1_;
#line 6848 "RESTSupport.c"
	{
		const gchar* u = NULL;
		const gchar* _tmp2_;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = t;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		u = _tmp2_;
#line 6856 "RESTSupport.c"
		{
			gboolean _tmp3_ = FALSE;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp3_ = TRUE;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			while (TRUE) {
#line 6863 "RESTSupport.c"
				const gchar* _tmp6_;
				gunichar c = 0U;
				const gchar* _tmp7_;
				gunichar _tmp8_;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!_tmp3_) {
#line 6870 "RESTSupport.c"
					const gchar* _tmp4_;
					const gchar* _tmp5_;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp4_ = u;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp5_ = g_utf8_next_char (_tmp4_);
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					u = _tmp5_;
#line 6879 "RESTSupport.c"
				}
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = FALSE;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = u;
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!(string_get_char (_tmp6_, (glong) 0) != ((gunichar) 0))) {
#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 6889 "RESTSupport.c"
				}
#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = u;
#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				c = string_get_char (_tmp7_, (glong) 0);
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = c;
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (((gint) _tmp8_) < 128) {
#line 6899 "RESTSupport.c"
					GString* _tmp9_;
					gunichar _tmp10_;
#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9_ = b;
#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp10_ = c;
#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_string_append_unichar (_tmp9_, _tmp10_);
#line 6908 "RESTSupport.c"
				}
			}
		}
	}
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = b;
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = _tmp11_->str;
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = g_strdup (_tmp12_);
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp13_;
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (b);
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (t);
#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6927 "RESTSupport.c"
}


static gchar*
publishing_rest_support_google_session_real_get_user_name (PublishingRESTSupportGoogleSession* self)
{
#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_get_user_name'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6938 "RESTSupport.c"
}


gchar*
publishing_rest_support_google_session_get_user_name (PublishingRESTSupportGoogleSession* self)
{
#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self), NULL);
#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->get_user_name (self);
#line 6949 "RESTSupport.c"
}


static gchar*
publishing_rest_support_google_session_real_get_access_token (PublishingRESTSupportGoogleSession* self)
{
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_get_access_token'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6960 "RESTSupport.c"
}


gchar*
publishing_rest_support_google_session_get_access_token (PublishingRESTSupportGoogleSession* self)
{
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self), NULL);
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->get_access_token (self);
#line 6971 "RESTSupport.c"
}


static void
publishing_rest_support_google_session_real_deauthenticate (PublishingRESTSupportGoogleSession* self)
{
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_deauthenticate'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 6982 "RESTSupport.c"
}


void
publishing_rest_support_google_session_deauthenticate (PublishingRESTSupportGoogleSession* self)
{
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self));
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->deauthenticate (self);
#line 6993 "RESTSupport.c"
}


PublishingRESTSupportGoogleSession*
publishing_rest_support_google_session_construct (GType object_type)
{
	PublishingRESTSupportGoogleSession* self = NULL;
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGoogleSession*) publishing_rest_support_session_construct (object_type, NULL);
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 7005 "RESTSupport.c"
}


static void
publishing_rest_support_google_session_class_init (PublishingRESTSupportGoogleSessionClass * klass)
{
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_session_parent_class = g_type_class_peek_parent (klass);
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_get_user_name;
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_get_access_token;
#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = (void (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_deauthenticate;
#line 7020 "RESTSupport.c"
}


static void
publishing_rest_support_google_session_instance_init (PublishingRESTSupportGoogleSession * self)
{
}


GType
publishing_rest_support_google_session_get_type (void)
{
	static volatile gsize publishing_rest_support_google_session_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_session_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGoogleSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGoogleSession), 0, (GInstanceInitFunc) publishing_rest_support_google_session_instance_init, NULL };
		GType publishing_rest_support_google_session_type_id;
		publishing_rest_support_google_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingRESTSupportGoogleSession", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&publishing_rest_support_google_session_type_id__volatile, publishing_rest_support_google_session_type_id);
	}
	return publishing_rest_support_google_session_type_id__volatile;
}


static void
_publishing_rest_support_google_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender,
                                                                                                                      gpointer self)
{
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_authenticator_authenticated ((PublishingRESTSupportGooglePublisher*) self);
#line 7050 "RESTSupport.c"
}


PublishingRESTSupportGooglePublisher*
publishing_rest_support_google_publisher_construct (GType object_type,
                                                    SpitPublishingService* service,
                                                    SpitPublishingPluginHost* host,
                                                    const gchar* scope)
{
	PublishingRESTSupportGooglePublisher * self = NULL;
	gchar* _tmp0_;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp1_;
	SpitPublishingAuthenticator* _tmp2_;
	SpitPublishingAuthenticator* _tmp3_;
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL);
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (scope != NULL, NULL);
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisher*) g_object_new (object_type, NULL);
#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strdup (scope);
#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->scope);
#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->scope = _tmp0_;
#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_google_publisher_google_session_impl_new ();
#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = _tmp1_;
#line 828 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->service = service;
#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->host = host;
#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_google_publisher_get_authenticator (self);
#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->authenticator);
#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->authenticator = _tmp2_;
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->authenticator;
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (_tmp3_, "authenticated", (GCallback) _publishing_rest_support_google_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated, self, 0);
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 7101 "RESTSupport.c"
}


static SpitPublishingAuthenticator*
publishing_rest_support_google_publisher_real_get_authenticator (PublishingRESTSupportGooglePublisher* self)
{
#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_get_authenticator'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 7112 "RESTSupport.c"
}


SpitPublishingAuthenticator*
publishing_rest_support_google_publisher_get_authenticator (PublishingRESTSupportGooglePublisher* self)
{
#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL);
#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->get_authenticator (self);
#line 7123 "RESTSupport.c"
}


SpitPublishingPluginHost*
publishing_rest_support_google_publisher_get_host (PublishingRESTSupportGooglePublisher* self)
{
	SpitPublishingPluginHost* result = NULL;
	SpitPublishingPluginHost* _tmp0_;
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL);
#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->host;
#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_;
#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7140 "RESTSupport.c"
}


PublishingRESTSupportGoogleSession*
publishing_rest_support_google_publisher_get_session (PublishingRESTSupportGooglePublisher* self)
{
	PublishingRESTSupportGoogleSession* result = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp0_;
	PublishingRESTSupportGoogleSession* _tmp1_;
#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL);
#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->session;
#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _publishing_rest_support_session_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession));
#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7160 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self)
{
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_on_login_flow_complete'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7171 "RESTSupport.c"
}


void
publishing_rest_support_google_publisher_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self)
{
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->on_login_flow_complete (self);
#line 7182 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* self)
{
#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_do_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7193 "RESTSupport.c"
}


void
publishing_rest_support_google_publisher_do_logout (PublishingRESTSupportGooglePublisher* self)
{
#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->do_logout (self);
#line 7204 "RESTSupport.c"
}


static gboolean
publishing_rest_support_google_publisher_real_is_running (PublishingRESTSupportGooglePublisher* self)
{
	gboolean _tmp0_ = FALSE;
#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_is_running'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return _tmp0_;
#line 7216 "RESTSupport.c"
}


gboolean
publishing_rest_support_google_publisher_is_running (PublishingRESTSupportGooglePublisher* self)
{
#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), FALSE);
#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->is_running (self);
#line 7227 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_real_start (PublishingRESTSupportGooglePublisher* self)
{
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_start'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7238 "RESTSupport.c"
}


void
publishing_rest_support_google_publisher_start (PublishingRESTSupportGooglePublisher* self)
{
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->start (self);
#line 7249 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_real_stop (PublishingRESTSupportGooglePublisher* self)
{
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_stop'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7260 "RESTSupport.c"
}


void
publishing_rest_support_google_publisher_stop (PublishingRESTSupportGooglePublisher* self)
{
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->stop (self);
#line 7271 "RESTSupport.c"
}


static SpitPublishingService*
publishing_rest_support_google_publisher_real_get_service (SpitPublishingPublisher* base)
{
	PublishingRESTSupportGooglePublisher * self;
	SpitPublishingService* result = NULL;
	SpitPublishingService* _tmp0_;
	SpitPublishingService* _tmp1_;
#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher);
#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->service;
#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7292 "RESTSupport.c"
}


static gpointer
_g_variant_ref0 (gpointer self)
{
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? g_variant_ref (self) : NULL;
#line 7301 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_on_authenticator_authenticated (PublishingRESTSupportGooglePublisher* self)
{
	GHashTable* params = NULL;
	SpitPublishingAuthenticator* _tmp0_;
	GHashTable* _tmp1_;
	GVariant* refresh_token = NULL;
	GVariant* access_token = NULL;
	GVariant* user_name = NULL;
	gconstpointer _tmp2_ = NULL;
	GVariant* _tmp3_;
	gconstpointer _tmp4_ = NULL;
	GVariant* _tmp5_;
	gconstpointer _tmp6_ = NULL;
	GVariant* _tmp7_;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp8_;
	GVariant* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp12_;
	GVariant* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp16_;
	GVariant* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->authenticator;
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = spit_publishing_authenticator_get_authentication_parameter (_tmp0_);
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	params = _tmp1_;
#line 860 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	refresh_token = NULL;
#line 861 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	access_token = NULL;
#line 862 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	user_name = NULL;
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hash_table_lookup_extended (params, "RefreshToken", NULL, &_tmp2_);
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (refresh_token);
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _g_variant_ref0 (_tmp2_);
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	refresh_token = _tmp3_;
#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hash_table_lookup_extended (params, "AccessToken", NULL, &_tmp4_);
#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (access_token);
#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _g_variant_ref0 (_tmp4_);
#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	access_token = _tmp5_;
#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hash_table_lookup_extended (params, "UserName", NULL, &_tmp6_);
#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (user_name);
#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _g_variant_ref0 (_tmp6_);
#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	user_name = _tmp7_;
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->session;
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = refresh_token;
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = g_variant_get_string (_tmp9_, NULL);
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = g_strdup (_tmp10_);
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp8_->refresh_token);
#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_->refresh_token = _tmp11_;
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = self->priv->session;
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = access_token;
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp14_ = g_variant_get_string (_tmp13_, NULL);
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = g_strdup (_tmp14_);
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp12_->access_token);
#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_->access_token = _tmp15_;
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = self->priv->session;
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp17_ = user_name;
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp18_ = g_variant_get_string (_tmp17_, NULL);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp19_ = g_strdup (_tmp18_);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp16_->user_name);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_->user_name = _tmp19_;
#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_login_flow_complete (self);
#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (user_name);
#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (access_token);
#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_variant_unref0 (refresh_token);
#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (params);
#line 7416 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherGoogleSessionImpl*
publishing_rest_support_google_publisher_google_session_impl_construct (GType object_type)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* self = NULL;
#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherGoogleSessionImpl*) publishing_rest_support_google_session_construct (object_type);
#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->access_token = NULL;
#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->user_name = NULL;
#line 779 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 779 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->refresh_token = NULL;
#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 7440 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherGoogleSessionImpl*
publishing_rest_support_google_publisher_google_session_impl_new (void)
{
#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_google_session_impl_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL);
#line 7449 "RESTSupport.c"
}


static gboolean
publishing_rest_support_google_publisher_google_session_impl_real_is_authenticated (PublishingRESTSupportSession* base)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
	gboolean result = FALSE;
	const gchar* _tmp0_;
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl);
#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->access_token;
#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_ != NULL;
#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7467 "RESTSupport.c"
}


static gchar*
publishing_rest_support_google_publisher_google_session_impl_real_get_user_name (PublishingRESTSupportGoogleSession* base)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl);
#line 787 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->user_name;
#line 787 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_ != NULL, "user_name != null");
#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->user_name;
#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7493 "RESTSupport.c"
}


static gchar*
publishing_rest_support_google_publisher_google_session_impl_real_get_access_token (PublishingRESTSupportGoogleSession* base)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl);
#line 792 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)), "is_authenticated()");
#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->access_token;
#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7516 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate (PublishingRESTSupportGoogleSession* base)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl);
#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->access_token = NULL;
#line 798 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 798 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->user_name = NULL;
#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->refresh_token = NULL;
#line 7538 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_google_session_impl_class_init (PublishingRESTSupportGooglePublisherGoogleSessionImplClass * klass)
{
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_google_session_impl_parent_class = g_type_class_peek_parent (klass);
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_rest_support_google_publisher_google_session_impl_finalize;
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_rest_support_google_publisher_google_session_impl_real_is_authenticated;
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_get_user_name;
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_get_access_token;
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = (void (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate;
#line 7557 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_google_session_impl_instance_init (PublishingRESTSupportGooglePublisherGoogleSessionImpl * self)
{
}


static void
publishing_rest_support_google_publisher_google_session_impl_finalize (PublishingRESTSupportSession * obj)
{
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl);
#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 774 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_rest_support_google_publisher_google_session_impl_parent_class)->finalize (obj);
#line 7581 "RESTSupport.c"
}


static GType
publishing_rest_support_google_publisher_google_session_impl_get_type (void)
{
	static volatile gsize publishing_rest_support_google_publisher_google_session_impl_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_google_session_impl_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherGoogleSessionImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_google_session_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherGoogleSessionImpl), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_google_session_impl_instance_init, NULL };
		GType publishing_rest_support_google_publisher_google_session_impl_type_id;
		publishing_rest_support_google_publisher_google_session_impl_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, "PublishingRESTSupportGooglePublisherGoogleSessionImpl", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_google_publisher_google_session_impl_type_id__volatile, publishing_rest_support_google_publisher_google_session_impl_type_id);
	}
	return publishing_rest_support_google_publisher_google_session_impl_type_id__volatile;
}


static PublishingRESTSupportGooglePublisherAuthenticatedTransaction*
publishing_rest_support_google_publisher_authenticated_transaction_construct_with_endpoint_url (GType object_type,
                                                                                                PublishingRESTSupportGoogleSession* session,
                                                                                                const gchar* endpoint_url,
                                                                                                PublishingRESTSupportHttpMethod method)
{
	PublishingRESTSupportGooglePublisherAuthenticatedTransaction* self = NULL;
#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL);
#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherAuthenticatedTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), endpoint_url, method);
#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 7614 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherAuthenticatedTransaction*
publishing_rest_support_google_publisher_authenticated_transaction_new_with_endpoint_url (PublishingRESTSupportGoogleSession* session,
                                                                                          const gchar* endpoint_url,
                                                                                          PublishingRESTSupportHttpMethod method)
{
#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_authenticated_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, session, endpoint_url, method);
#line 7625 "RESTSupport.c"
}


PublishingRESTSupportGooglePublisherAuthenticatedTransaction*
publishing_rest_support_google_publisher_authenticated_transaction_construct (GType object_type,
                                                                              PublishingRESTSupportGoogleSession* session,
                                                                              const gchar* endpoint_url,
                                                                              PublishingRESTSupportHttpMethod method)
{
	PublishingRESTSupportGooglePublisherAuthenticatedTransaction* self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL);
#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherAuthenticatedTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), endpoint_url, method);
#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)), "session.is_authenticated()");
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_google_session_get_access_token (session);
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_;
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strconcat ("Bearer ", _tmp1_, NULL);
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", _tmp3_);
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp3_);
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp1_);
#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 7664 "RESTSupport.c"
}


PublishingRESTSupportGooglePublisherAuthenticatedTransaction*
publishing_rest_support_google_publisher_authenticated_transaction_new (PublishingRESTSupportGoogleSession* session,
                                                                        const gchar* endpoint_url,
                                                                        PublishingRESTSupportHttpMethod method)
{
#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_authenticated_transaction_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, session, endpoint_url, method);
#line 7675 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_authenticated_transaction_class_init (PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass * klass)
{
#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_authenticated_transaction_parent_class = g_type_class_peek_parent (klass);
#line 7684 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_authenticated_transaction_instance_init (PublishingRESTSupportGooglePublisherAuthenticatedTransaction * self)
{
}


GType
publishing_rest_support_google_publisher_authenticated_transaction_get_type (void)
{
	static volatile gsize publishing_rest_support_google_publisher_authenticated_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_authenticated_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_authenticated_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherAuthenticatedTransaction), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_authenticated_transaction_instance_init, NULL };
		GType publishing_rest_support_google_publisher_authenticated_transaction_type_id;
		publishing_rest_support_google_publisher_authenticated_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingRESTSupportGooglePublisherAuthenticatedTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_google_publisher_authenticated_transaction_type_id__volatile, publishing_rest_support_google_publisher_authenticated_transaction_type_id);
	}
	return publishing_rest_support_google_publisher_authenticated_transaction_type_id__volatile;
}


static void
publishing_rest_support_google_publisher_class_init (PublishingRESTSupportGooglePublisherClass * klass)
{
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_parent_class = g_type_class_peek_parent (klass);
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportGooglePublisherPrivate));
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->get_authenticator = (SpitPublishingAuthenticator* (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_get_authenticator;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->on_login_flow_complete = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_on_login_flow_complete;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->do_logout = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_do_logout;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->is_running = (gboolean (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_is_running;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->start = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_start;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGooglePublisherClass *) klass)->stop = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_stop;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_OBJECT_CLASS (klass)->finalize = publishing_rest_support_google_publisher_finalize;
#line 7729 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface)
{
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface);
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->is_running = (gboolean (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_is_running;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->start = (void (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_start;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->stop = (void (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_stop;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->get_service = (SpitPublishingService* (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_real_get_service;
#line 7746 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_instance_init (PublishingRESTSupportGooglePublisher * self)
{
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_PRIVATE (self);
#line 7755 "RESTSupport.c"
}


static void
publishing_rest_support_google_publisher_finalize (GObject * obj)
{
	PublishingRESTSupportGooglePublisher * self;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher);
#line 818 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->scope);
#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->authenticator);
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_OBJECT_CLASS (publishing_rest_support_google_publisher_parent_class)->finalize (obj);
#line 7773 "RESTSupport.c"
}


GType
publishing_rest_support_google_publisher_get_type (void)
{
	static volatile gsize publishing_rest_support_google_publisher_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisher), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_instance_init, NULL };
		static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_rest_support_google_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType publishing_rest_support_google_publisher_type_id;
		publishing_rest_support_google_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingRESTSupportGooglePublisher", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (publishing_rest_support_google_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info);
		g_once_init_leave (&publishing_rest_support_google_publisher_type_id__volatile, publishing_rest_support_google_publisher_type_id);
	}
	return publishing_rest_support_google_publisher_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);
}