/* RESTSupport.c generated by valac 0.32.1, 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/gstdio.h>
#include <glib/gi18n-lib.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <float.h>
#include <math.h>
#include <json-glib/json-glib.h>
#include <webkit2/webkit2.h>
#include <gtk/gtk.h>
#include <gdk/gdk.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;

#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)))
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;

#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 _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

#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;

#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;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE (publishing_rest_support_google_publisher_web_authentication_pane_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass))

typedef struct _PublishingRESTSupportGooglePublisherWebAuthenticationPane PublishingRESTSupportGooglePublisherWebAuthenticationPane;
typedef struct _PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass;
typedef struct _PublishingRESTSupportGooglePublisherGoogleSessionImplPrivate PublishingRESTSupportGooglePublisherGoogleSessionImplPrivate;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION (publishing_rest_support_google_publisher_get_access_tokens_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingRESTSupportGooglePublisherGetAccessTokensTransaction))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass))

typedef struct _PublishingRESTSupportGooglePublisherGetAccessTokensTransaction PublishingRESTSupportGooglePublisherGetAccessTokensTransaction;
typedef struct _PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION (publishing_rest_support_google_publisher_refresh_access_token_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass))

typedef struct _PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction;
typedef struct _PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass;
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))

#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;

#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION (publishing_rest_support_google_publisher_username_fetch_transaction_get_type ())
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION, PublishingRESTSupportGooglePublisherUsernameFetchTransaction))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION, PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION))
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION, PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass))

typedef struct _PublishingRESTSupportGooglePublisherUsernameFetchTransaction PublishingRESTSupportGooglePublisherUsernameFetchTransaction;
typedef struct _PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass;
typedef struct _PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate;
typedef struct _PublishingRESTSupportGooglePublisherGetAccessTokensTransactionPrivate PublishingRESTSupportGooglePublisherGetAccessTokensTransactionPrivate;
typedef struct _PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionPrivate PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionPrivate;
typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate;
typedef struct _PublishingRESTSupportGooglePublisherUsernameFetchTransactionPrivate PublishingRESTSupportGooglePublisherUsernameFetchTransactionPrivate;
#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);
	gchar* (*get_refresh_token) (PublishingRESTSupportGoogleSession* self);
	void (*deauthenticate) (PublishingRESTSupportGoogleSession* self);
};

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

struct _PublishingRESTSupportGooglePublisherClass {
	GObjectClass parent_class;
	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;
	PublishingRESTSupportGooglePublisherWebAuthenticationPane* web_auth_pane;
	SpitPublishingPluginHost* host;
	SpitPublishingService* service;
};

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

struct _PublishingRESTSupportGooglePublisherGoogleSessionImplClass {
	PublishingRESTSupportGoogleSessionClass parent_class;
};

struct _PublishingRESTSupportGooglePublisherWebAuthenticationPane {
	GObject parent_instance;
	PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass {
	GObjectClass parent_class;
};

struct _PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate {
	WebKitWebView* webview;
	GtkBox* pane_widget;
	gchar* auth_sequence_start_url;
};

struct _PublishingRESTSupportGooglePublisherGetAccessTokensTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingRESTSupportGooglePublisherGetAccessTokensTransactionPrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionPrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

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

struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingRESTSupportGooglePublisherUsernameFetchTransaction {
	PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance;
	PublishingRESTSupportGooglePublisherUsernameFetchTransactionPrivate * priv;
};

struct _PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass {
	PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass 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_web_authentication_pane_parent_class = NULL;
static gboolean publishing_rest_support_google_publisher_web_authentication_pane_cache_dirty;
static gboolean publishing_rest_support_google_publisher_web_authentication_pane_cache_dirty = FALSE;
static SpitPublishingDialogPaneIface* publishing_rest_support_google_publisher_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL;
static gpointer publishing_rest_support_google_publisher_get_access_tokens_transaction_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_refresh_access_token_transaction_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_authenticated_transaction_parent_class = NULL;
static gpointer publishing_rest_support_google_publisher_username_fetch_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))
enum  {
	PUBLISHING_REST_SUPPORT_SESSION_DUMMY_PROPERTY
};
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);
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;
enum  {
	PUBLISHING_REST_SUPPORT_ARGUMENT_DUMMY_PROPERTY
};
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);
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);
gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* 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))
enum  {
	PUBLISHING_REST_SUPPORT_TRANSACTION_DUMMY_PROPERTY
};
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_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;
enum  {
	PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION_DUMMY_PROPERTY
};
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))
enum  {
	PUBLISHING_REST_SUPPORT_XML_DOCUMENT_DUMMY_PROPERTY
};
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))
enum  {
	PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_DUMMY_PROPERTY
};
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;
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_DUMMY_PROPERTY
};
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);
gchar* publishing_rest_support_google_session_get_refresh_token (PublishingRESTSupportGoogleSession* self);
static gchar* publishing_rest_support_google_session_real_get_refresh_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;
static GType publishing_rest_support_google_publisher_web_authentication_pane_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))
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_DUMMY_PROPERTY
};
#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);
static void publishing_rest_support_google_publisher_on_web_auth_pane_authorized (PublishingRESTSupportGooglePublisher* self, const gchar* auth_code);
static void _publishing_rest_support_google_publisher_on_web_auth_pane_authorized_publishing_rest_support_google_publisher_web_authentication_pane_authorized (PublishingRESTSupportGooglePublisherWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self);
gboolean publishing_rest_support_google_publisher_is_running (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_do_get_access_tokens (PublishingRESTSupportGooglePublisher* self, const gchar* auth_code);
static void publishing_rest_support_google_publisher_on_get_access_tokens_complete (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn);
static void _publishing_rest_support_google_publisher_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_rest_support_google_publisher_on_get_access_tokens_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_rest_support_google_publisher_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static void publishing_rest_support_google_publisher_do_extract_tokens (PublishingRESTSupportGooglePublisher* self, const gchar* response_body);
static void publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn);
static void _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
void publishing_rest_support_google_publisher_do_logout (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_on_refresh_token_available (PublishingRESTSupportGooglePublisher* self, const gchar* token);
static void publishing_rest_support_google_publisher_on_access_token_available (PublishingRESTSupportGooglePublisher* self, const gchar* token);
static void publishing_rest_support_google_publisher_do_fetch_username (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_on_fetch_username_transaction_completed (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn);
static void _publishing_rest_support_google_publisher_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_rest_support_google_publisher_on_fetch_username_transaction_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_rest_support_google_publisher_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static void publishing_rest_support_google_publisher_do_extract_username (PublishingRESTSupportGooglePublisher* self, const gchar* response_body);
static GType publishing_rest_support_google_publisher_get_access_tokens_transaction_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* publishing_rest_support_google_publisher_get_access_tokens_transaction_new (PublishingRESTSupportSession* session, const gchar* auth_code);
static PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* publishing_rest_support_google_publisher_get_access_tokens_transaction_construct (GType object_type, PublishingRESTSupportSession* session, const gchar* auth_code);
static void publishing_rest_support_google_publisher_do_hosted_web_authentication (PublishingRESTSupportGooglePublisher* self);
static PublishingRESTSupportGooglePublisherWebAuthenticationPane* publishing_rest_support_google_publisher_web_authentication_pane_new (const gchar* auth_sequence_start_url);
static PublishingRESTSupportGooglePublisherWebAuthenticationPane* publishing_rest_support_google_publisher_web_authentication_pane_construct (GType object_type, const gchar* auth_sequence_start_url);
static void publishing_rest_support_google_publisher_do_exchange_refresh_token_for_access_token (PublishingRESTSupportGooglePublisher* self);
static GType publishing_rest_support_google_publisher_refresh_access_token_transaction_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* publishing_rest_support_google_publisher_refresh_access_token_transaction_new (PublishingRESTSupportSession* session);
static PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* publishing_rest_support_google_publisher_refresh_access_token_transaction_construct (GType object_type, PublishingRESTSupportSession* session);
GType publishing_rest_support_google_publisher_authenticated_transaction_get_type (void) G_GNUC_CONST;
static GType publishing_rest_support_google_publisher_username_fetch_transaction_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static PublishingRESTSupportGooglePublisherUsernameFetchTransaction* publishing_rest_support_google_publisher_username_fetch_transaction_new (PublishingRESTSupportGoogleSession* session);
static PublishingRESTSupportGooglePublisherUsernameFetchTransaction* publishing_rest_support_google_publisher_username_fetch_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session);
void publishing_rest_support_google_publisher_on_login_flow_complete (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_start_oauth_flow (PublishingRESTSupportGooglePublisher* self, const gchar* refresh_token);
static gboolean publishing_rest_support_google_publisher_web_authentication_pane_is_cache_dirty (void);
static void publishing_rest_support_google_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self);
static void publishing_rest_support_google_publisher_real_do_logout (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);
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GOOGLE_SESSION_IMPL_DUMMY_PROPERTY
};
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 gchar* publishing_rest_support_google_publisher_google_session_impl_real_get_refresh_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);
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate))
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY
};
static void publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self, WebKitLoadEvent load_event);
static void _publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self);
static gboolean __lambda4_ (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self);
static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self);
static void publishing_rest_support_google_publisher_web_authentication_pane_on_page_load (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self);
static void publishing_rest_support_google_publisher_web_authentication_pane_on_load_started (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self);
static SpitPublishingDialogPaneGeometryOptions publishing_rest_support_google_publisher_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base);
static GtkWidget* publishing_rest_support_google_publisher_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base);
static void publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base);
static void publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base);
static void publishing_rest_support_google_publisher_web_authentication_pane_finalize (GObject* obj);
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token"
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token"
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_AUTHENTICATED_TRANSACTION_DUMMY_PROPERTY
};
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);
enum  {
	PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION_ENDPOINT_URL "https://www.googleapis.com/oauth2/v1/userinfo"
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 = 0;
	gint _res_size_ = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 1398 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 774 "RESTSupport.c"
	}
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	return result;
#line 780 "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;
	const gchar* _tmp0_ = NULL;
	guint8* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	guint8* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	GHmac* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	guint8* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	guint8* _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	gsize _tmp7_ = 0UL;
	gchar* _tmp8_ = NULL;
#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_ = key;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = string_get_data (_tmp0_, &_tmp1__length1);
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = _tmp1__length1;
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = g_hmac_new (G_CHECKSUM_SHA1, _tmp2_, _tmp2__length1);
#line 18 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	mac = _tmp3_;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = message;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = string_get_data (_tmp4_, &_tmp5__length1);
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6__length1 = _tmp5__length1;
#line 19 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_hmac_update (mac, _tmp6_, (gssize) _tmp6__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"
	_tmp7_ = len;
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = g_base64_encode (buffer + 0, ((gint) _tmp7_) - 0);
#line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp8_;
#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 842 "RESTSupport.c"
}


PublishingRESTSupportSession* publishing_rest_support_session_construct (GType object_type, const gchar* endpoint_url) {
	PublishingRESTSupportSession* self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	SoupSessionAsync* _tmp2_ = NULL;
	SoupSession* _tmp3_ = NULL;
#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_ = endpoint_url;
#line 35 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#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 = _tmp1_;
#line 36 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = (SoupSessionAsync*) soup_session_async_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 = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, soup_session_get_type (), SoupSession);
#line 37 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->soup_session;
#line 37 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_set (_tmp3_, "ssl-use-system-ca-file", TRUE, NULL);
#line 34 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 874 "RESTSupport.c"
}


void publishing_rest_support_session_notify_wire_message_unqueued (PublishingRESTSupportSession* self, SoupMessage* message) {
	SoupMessage* _tmp0_ = NULL;
#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"
	_tmp0_ = message;
#line 41 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit_by_name (self, "wire-message-unqueued", _tmp0_);
#line 888 "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_by_name (self, "authenticated");
#line 897 "RESTSupport.c"
}


void publishing_rest_support_session_notify_authentication_failed (PublishingRESTSupportSession* self, GError* err) {
	GError* _tmp0_ = NULL;
#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"
	_tmp0_ = err;
#line 49 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit_by_name (self, "authentication-failed", _tmp0_);
#line 909 "RESTSupport.c"
}


static gboolean publishing_rest_support_session_real_is_authenticated (PublishingRESTSupportSession* self) {
#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 FALSE;
#line 918 "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 927 "RESTSupport.c"
}


gchar* publishing_rest_support_session_get_endpoint_url (PublishingRESTSupportSession* self) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#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 945 "RESTSupport.c"
}


void publishing_rest_support_session_stop_transactions (PublishingRESTSupportSession* self) {
	SoupSession* _tmp0_ = NULL;
#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 959 "RESTSupport.c"
}


gboolean publishing_rest_support_session_are_transactions_stopped (PublishingRESTSupportSession* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#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 974 "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 981 "RESTSupport.c"
}


void publishing_rest_support_session_send_wire_message (PublishingRESTSupportSession* self, SoupMessage* message) {
	gboolean _tmp0_ = FALSE;
	SoupSession* _tmp1_ = NULL;
	SoupSession* _tmp2_ = NULL;
	SoupMessage* _tmp3_ = NULL;
	SoupSession* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
#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"
	_tmp0_ = publishing_rest_support_session_are_transactions_stopped (self);
#line 68 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#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"
	_tmp1_ = self->priv->soup_session;
#line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp1_, "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"
	_tmp2_ = self->priv->soup_session;
#line 72 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = message;
#line 72 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_session_send_message (_tmp2_, _tmp3_);
#line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->soup_session;
#line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("request-unqueued", soup_session_get_type (), &_tmp5_, NULL, FALSE);
#line 74 "/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_session_notify_wire_message_unqueued_soup_session_request_unqueued, self);
#line 1020 "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 1027 "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 1036 "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 1046 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1050 "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 1058 "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 1065 "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 1072 "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 1076 "RESTSupport.c"
		}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_session_ref (object);
#line 1080 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1084 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1088 "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 1099 "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 1105 "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 1109 "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 1113 "RESTSupport.c"
	}
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1117 "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 1131 "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 1140 "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 1160 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1164 "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 1170 "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 1189 "RESTSupport.c"
	} else {
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1193 "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 1199 "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 = publishing_rest_support_session_real_is_authenticated;
#line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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"
	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"
	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 1219 "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 1234 "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 1248 "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 1273 "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 1286 "RESTSupport.c"
	}
}


gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpMethod self) {
	gchar* result = NULL;
#line 84 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	switch (self) {
#line 84 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET:
#line 1297 "RESTSupport.c"
		{
			gchar* _tmp0_ = NULL;
#line 86 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp0_ = g_strdup ("GET");
#line 86 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp0_;
#line 86 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1306 "RESTSupport.c"
		}
#line 84 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT:
#line 1310 "RESTSupport.c"
		{
			gchar* _tmp1_ = NULL;
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = g_strdup ("PUT");
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp1_;
#line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1319 "RESTSupport.c"
		}
#line 84 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST:
#line 1323 "RESTSupport.c"
		{
			gchar* _tmp2_ = NULL;
#line 92 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = g_strdup ("POST");
#line 92 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp2_;
#line 92 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1332 "RESTSupport.c"
		}
		default:
		{
#line 95 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_error ("RESTSupport.vala:95: unrecognized HTTP method enumeration value");
#line 1338 "RESTSupport.c"
		}
	}
}


PublishingRESTSupportHttpMethod publishing_rest_support_http_method_from_string (const gchar* str) {
	PublishingRESTSupportHttpMethod result = 0;
	const gchar* _tmp0_ = NULL;
#line 99 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (str != NULL, 0);
#line 100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = str;
#line 100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (g_strcmp0 (_tmp0_, "GET") == 0) {
#line 101 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET;
#line 101 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return result;
#line 1357 "RESTSupport.c"
	} else {
		const gchar* _tmp1_ = NULL;
#line 102 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = str;
#line 102 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (_tmp1_, "PUT") == 0) {
#line 103 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT;
#line 103 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 1368 "RESTSupport.c"
		} else {
			const gchar* _tmp2_ = NULL;
#line 104 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = str;
#line 104 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (g_strcmp0 (_tmp2_, "POST") == 0) {
#line 105 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST;
#line 105 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return result;
#line 1379 "RESTSupport.c"
			} else {
				const gchar* _tmp3_ = NULL;
#line 107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = str;
#line 107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_error ("RESTSupport.vala:107: unrecognized HTTP method name: %s", _tmp3_);
#line 1386 "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;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 116 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 116 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (value != NULL, NULL);
#line 116 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportArgument*) g_type_create_instance (object_type);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = key;
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->key);
#line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->key = _tmp1_;
#line 118 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = value;
#line 118 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 118 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->value);
#line 118 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->value = _tmp3_;
#line 116 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 1435 "RESTSupport.c"
}


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


gint publishing_rest_support_argument_compare (PublishingRESTSupportArgument* arg1, PublishingRESTSupportArgument* arg2) {
	gint result = 0;
	GCompareFunc _tmp0_ = NULL;
	PublishingRESTSupportArgument* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	PublishingRESTSupportArgument* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gint _tmp5_ = 0;
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg1), 0);
#line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg2), 0);
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_strcmp0;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = arg1;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_->key;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = arg2;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = _tmp3_->key;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp0_ (_tmp2_, _tmp4_);
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp5_;
#line 122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1474 "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 126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1483 "RESTSupport.c"
}


static gpointer _publishing_rest_support_argument_ref0 (gpointer self) {
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? publishing_rest_support_argument_ref (self) : NULL;
#line 1490 "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_ = NULL;
	PublishingRESTSupportArgument** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GeeTreeSet* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gpointer* _tmp7_ = NULL;
	PublishingRESTSupportArgument** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
#line 126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = gee_tree_set_new (PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, (GBoxedCopyFunc) publishing_rest_support_argument_ref, publishing_rest_support_argument_unref, _publishing_rest_support_argument_compare_gcompare_data_func, NULL, NULL);
#line 126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	sorted_args = _tmp0_;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = inputArray;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1__length1 = inputArray_length1;
#line 1513 "RESTSupport.c"
	{
		PublishingRESTSupportArgument** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection = _tmp1_;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection_length1 = _tmp1__length1;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (arg_it = 0; arg_it < _tmp1__length1; arg_it = arg_it + 1) {
#line 1525 "RESTSupport.c"
			PublishingRESTSupportArgument* _tmp2_ = NULL;
			PublishingRESTSupportArgument* arg = NULL;
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]);
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			arg = _tmp2_;
#line 1532 "RESTSupport.c"
			{
				GeeTreeSet* _tmp3_ = NULL;
				PublishingRESTSupportArgument* _tmp4_ = NULL;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = sorted_args;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = arg;
#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp4_);
#line 128 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_argument_unref0 (arg);
#line 1544 "RESTSupport.c"
			}
		}
	}
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = sorted_args;
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp6_);
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = _tmp7_;
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8__length1 = _tmp6_;
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (result_length1) {
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*result_length1 = _tmp8__length1;
#line 1560 "RESTSupport.c"
	}
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp8_;
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (sorted_args);
#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1568 "RESTSupport.c"
}


gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (self), NULL);
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->key;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->value;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup_printf ("%s=%s", _tmp0_, _tmp1_);
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 1589 "RESTSupport.c"
}


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


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


static void publishing_rest_support_value_argument_copy_value (const GValue* src_value, GValue* dest_value) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 112 "/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 1615 "RESTSupport.c"
	} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1619 "RESTSupport.c"
	}
}


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


static gchar* publishing_rest_support_value_argument_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 1634 "RESTSupport.c"
		PublishingRESTSupportArgument* object;
		object = collect_values[0].v_pointer;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 112 "/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 1641 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 112 "/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 1645 "RESTSupport.c"
		}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_argument_ref (object);
#line 1649 "RESTSupport.c"
	} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1653 "RESTSupport.c"
	}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1657 "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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 112 "/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 1668 "RESTSupport.c"
	}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 1674 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 1678 "RESTSupport.c"
	} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_argument_ref (value->data[0].v_pointer);
#line 1682 "RESTSupport.c"
	}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 1686 "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 112 "/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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 1700 "RESTSupport.c"
}


gpointer publishing_rest_support_value_get_argument (const GValue* value) {
#line 112 "/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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 1709 "RESTSupport.c"
}


void publishing_rest_support_value_set_argument (GValue* value, gpointer v_object) {
	PublishingRESTSupportArgument* old;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 112 "/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 112 "/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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_ref (value->data[0].v_pointer);
#line 1729 "RESTSupport.c"
	} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1733 "RESTSupport.c"
	}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_unref (old);
#line 1739 "RESTSupport.c"
	}
}


void publishing_rest_support_value_take_argument (GValue* value, gpointer v_object) {
	PublishingRESTSupportArgument* old;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT));
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 112 "/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 112 "/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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 1758 "RESTSupport.c"
	} else {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 1762 "RESTSupport.c"
	}
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_argument_unref (old);
#line 1768 "RESTSupport.c"
	}
}


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


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


static void publishing_rest_support_argument_finalize (PublishingRESTSupportArgument* obj) {
	PublishingRESTSupportArgument * self;
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgument);
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 113 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->key);
#line 114 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->value);
#line 1799 "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 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 1824 "RESTSupport.c"
}


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


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


PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct (GType object_type, PublishingRESTSupportSession* parent_session, PublishingRESTSupportHttpMethod method) {
	PublishingRESTSupportTransaction* self = NULL;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	PublishingRESTSupportSession* _tmp3_ = NULL;
	PublishingRESTSupportHttpMethod _tmp4_ = 0;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	PublishingRESTSupportSession* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	SoupMessage* _tmp10_ = NULL;
	SoupMessage* _tmp11_ = NULL;
#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL);
#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type);
#line 156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = parent_session;
#line 156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_session_get_endpoint_url (_tmp0_);
#line 156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp2_ != NULL, "parent_session.get_endpoint_url() != null");
#line 156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp2_);
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = parent_session;
#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = _tmp3_;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = method;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = publishing_rest_support_http_method_to_string (_tmp4_);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = parent_session;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = publishing_rest_support_session_get_endpoint_url (_tmp7_);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = _tmp8_;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = soup_message_new (_tmp6_, _tmp9_);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = _tmp10_;
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp9_);
#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp6_);
#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = self->priv->message;
#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect (_tmp11_, "wrote-body-data", (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self);
#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 1909 "RESTSupport.c"
}


PublishingRESTSupportTransaction* publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session, PublishingRESTSupportHttpMethod method) {
#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, parent_session, method);
#line 1916 "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;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	PublishingRESTSupportHttpMethod _tmp3_ = 0;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	SoupMessage* _tmp7_ = NULL;
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL);
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type);
#line 166 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = parent_session;
#line 166 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = _tmp0_;
#line 167 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = endpoint_url;
#line 167 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 167 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 167 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = _tmp2_;
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = method;
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_http_method_to_string (_tmp3_);
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_;
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = endpoint_url;
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = soup_message_new (_tmp5_, _tmp6_);
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = _tmp7_;
#line 168 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp5_);
#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 1966 "RESTSupport.c"
}


PublishingRESTSupportTransaction* publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) {
#line 164 "/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 1973 "RESTSupport.c"
}


static void publishing_rest_support_transaction_on_wrote_body_data (PublishingRESTSupportTransaction* self, SoupBuffer* written_data) {
	gint _tmp0_ = 0;
	SoupBuffer* _tmp1_ = NULL;
	gsize _tmp2_ = 0UL;
	gint _tmp3_ = 0;
	SoupMessage* _tmp4_ = NULL;
	SoupMessageBody* _tmp5_ = NULL;
	gint64 _tmp6_ = 0LL;
#line 171 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 171 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (written_data != NULL);
#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->bytes_written;
#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = written_data;
#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_->length;
#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->bytes_written = _tmp0_ + ((gint) _tmp2_);
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->bytes_written;
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->message;
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_->request_body;
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_->length;
#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_emit_by_name (self, "chunk-transmitted", _tmp3_, (gint) _tmp6_);
#line 2007 "RESTSupport.c"
}


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


static void publishing_rest_support_transaction_on_message_unqueued (PublishingRESTSupportTransaction* self, SoupMessage* message) {
	SoupMessage* _tmp0_ = NULL;
	SoupMessage* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->message;
#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = message;
#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_ != _tmp1_) {
#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2034 "RESTSupport.c"
	}
	{
		SoupMessage* _tmp2_ = NULL;
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = message;
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_check_response (self, _tmp2_, &_inner_error_);
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 2046 "RESTSupport.c"
				goto __catch0_spit_publishing_publishing_error;
			}
#line 181 "/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 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2055 "RESTSupport.c"
		}
	}
	goto __finally0;
	__catch0_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		GError* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		GError* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 183 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = err;
#line 183 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = _tmp3_->message;
#line 183 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_warning ("RESTSupport.vala:183: Publishing error: %s", _tmp4_);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = publishing_rest_support_transaction_get_response (self);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = _tmp5_;
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_warning ("RESTSupport.vala:184: response validation failed. bad response = '%s'.", _tmp6_);
#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp6_);
#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = err;
#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = _g_error_copy0 (_tmp7_);
#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (self->priv->err);
#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->err = _tmp8_;
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 2096 "RESTSupport.c"
	}
	__finally0:
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 180 "/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 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2107 "RESTSupport.c"
	}
}


void publishing_rest_support_transaction_check_response (PublishingRESTSupportTransaction* self, SoupMessage* message, GError** error) {
	SoupMessage* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	guint _tmp2_ = 0U;
	gboolean _tmp42_ = FALSE;
	SoupMessage* _tmp43_ = NULL;
	SoupMessageBody* _tmp44_ = NULL;
	guint8* _tmp45_ = NULL;
	gint _tmp45__length1 = 0;
	GError * _inner_error_ = NULL;
#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (SOUP_IS_MESSAGE (message));
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = message;
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_get (_tmp0_, "status-code", &_tmp1_, NULL);
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_;
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	switch (_tmp2_) {
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_OK:
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CREATED:
#line 2138 "RESTSupport.c"
		{
#line 194 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 2142 "RESTSupport.c"
		}
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_RESOLVE:
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_RESOLVE_PROXY:
#line 2148 "RESTSupport.c"
		{
			gchar* _tmp3_ = NULL;
			gchar* _tmp4_ = NULL;
			SoupMessage* _tmp5_ = NULL;
			guint _tmp6_ = 0U;
			guint _tmp7_ = 0U;
			GError* _tmp8_ = NULL;
			GError* _tmp9_ = NULL;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp3_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = _tmp3_;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = message;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (_tmp5_, "status-code", &_tmp6_, NULL);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = _tmp6_;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to resolve %s (error code %u)", _tmp4_, _tmp7_);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp9_ = _tmp8_;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp4_);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp9_;
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2181 "RESTSupport.c"
			} else {
#line 198 "/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 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2189 "RESTSupport.c"
			}
		}
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_CONNECT:
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_CANT_CONNECT_PROXY:
#line 2196 "RESTSupport.c"
		{
			gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			SoupMessage* _tmp12_ = NULL;
			guint _tmp13_ = 0U;
			guint _tmp14_ = 0U;
			GError* _tmp15_ = NULL;
			GError* _tmp16_ = NULL;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp10_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp11_ = _tmp10_;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp12_ = message;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (_tmp12_, "status-code", &_tmp13_, NULL);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp14_ = _tmp13_;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp15_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to connect to %s (error code %u)", _tmp11_, _tmp14_);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp16_ = _tmp15_;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp11_);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp16_;
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2229 "RESTSupport.c"
			} else {
#line 203 "/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 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2237 "RESTSupport.c"
			}
		}
#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case SOUP_STATUS_SSL_FAILED:
#line 2242 "RESTSupport.c"
		{
			gchar* _tmp17_ = NULL;
			gchar* _tmp18_ = NULL;
			GError* _tmp19_ = NULL;
			GError* _tmp20_ = NULL;
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp17_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp18_ = _tmp17_;
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp19_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SSL_FAILED, "Unable to connect to %s: Secure connection failed", _tmp18_);
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp20_ = _tmp19_;
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp18_);
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_inner_error_ = _tmp20_;
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2266 "RESTSupport.c"
			} else {
#line 206 "/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 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 206 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2274 "RESTSupport.c"
			}
		}
		default:
		{
			SoupMessage* _tmp21_ = NULL;
			guint _tmp22_ = 0U;
			guint _tmp23_ = 0U;
#line 211 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp21_ = message;
#line 211 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_object_get (_tmp21_, "status-code", &_tmp22_, NULL);
#line 211 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp23_ = _tmp22_;
#line 211 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_tmp23_ >= ((guint) 100)) {
#line 2290 "RESTSupport.c"
				gchar* _tmp24_ = NULL;
				gchar* _tmp25_ = NULL;
				SoupMessage* _tmp26_ = NULL;
				guint _tmp27_ = 0U;
				guint _tmp28_ = 0U;
				SoupMessage* _tmp29_ = NULL;
				gchar* _tmp30_ = NULL;
				gchar* _tmp31_ = NULL;
				gchar* _tmp32_ = NULL;
				GError* _tmp33_ = NULL;
				GError* _tmp34_ = NULL;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp24_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp25_ = _tmp24_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp26_ = message;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (_tmp26_, "status-code", &_tmp27_, NULL);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp28_ = _tmp27_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp29_ = message;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (_tmp29_, "reason-phrase", &_tmp30_, NULL);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp31_ = _tmp30_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp32_ = _tmp31_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp33_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Service %s returned HTTP status code %u %s", _tmp25_, _tmp28_, _tmp32_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp34_ = _tmp33_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp32_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp25_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_inner_error_ = _tmp34_;
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_propagate_error (error, _inner_error_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2336 "RESTSupport.c"
				} else {
#line 212 "/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 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2344 "RESTSupport.c"
				}
			} else {
				gchar* _tmp35_ = NULL;
				gchar* _tmp36_ = NULL;
				SoupMessage* _tmp37_ = NULL;
				guint _tmp38_ = 0U;
				guint _tmp39_ = 0U;
				GError* _tmp40_ = NULL;
				GError* _tmp41_ = NULL;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp35_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp36_ = _tmp35_;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp37_ = message;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_object_get (_tmp37_, "status-code", &_tmp38_, NULL);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp39_ = _tmp38_;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp40_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Failure communicating with %s (error code %u)", _tmp36_, _tmp39_);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp41_ = _tmp40_;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp36_);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_inner_error_ = _tmp41_;
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_propagate_error (error, _inner_error_);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2378 "RESTSupport.c"
				} else {
#line 215 "/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 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 2386 "RESTSupport.c"
				}
			}
		}
	}
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp43_ = message;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp44_ = _tmp43_->response_body;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp45_ = _tmp44_->data;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp45__length1 = (gint) _tmp44_->length;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp45_ == NULL) {
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp42_ = TRUE;
#line 2403 "RESTSupport.c"
	} else {
		SoupMessage* _tmp46_ = NULL;
		SoupMessageBody* _tmp47_ = NULL;
		guint8* _tmp48_ = NULL;
		gint _tmp48__length1 = 0;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp46_ = message;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp47_ = _tmp46_->response_body;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp48_ = _tmp47_->data;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp48__length1 = (gint) _tmp47_->length;
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp42_ = _tmp48__length1 == 0;
#line 2419 "RESTSupport.c"
	}
#line 221 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp42_) {
#line 2423 "RESTSupport.c"
		gchar* _tmp49_ = NULL;
		gchar* _tmp50_ = NULL;
		GError* _tmp51_ = NULL;
		GError* _tmp52_ = NULL;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp49_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp50_ = _tmp49_;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp51_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "No response data from %s", _tmp50_);
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp52_ = _tmp51_;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp50_);
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp52_;
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2446 "RESTSupport.c"
		} else {
#line 222 "/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 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2454 "RESTSupport.c"
		}
	}
}


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


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


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


void publishing_rest_support_transaction_set_is_executed (PublishingRESTSupportTransaction* self, gboolean is_executed) {
	gboolean _tmp0_ = FALSE;
#line 234 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = is_executed;
#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = _tmp0_;
#line 2571 "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 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_on_message_unqueued ((PublishingRESTSupportTransaction*) self, message);
#line 2578 "RESTSupport.c"
}


void publishing_rest_support_transaction_send (PublishingRESTSupportTransaction* self, GError** error) {
	PublishingRESTSupportSession* _tmp0_ = NULL;
	SoupMessage* _tmp1_ = NULL;
	PublishingRESTSupportSession* _tmp2_ = NULL;
	SoupMessage* _tmp3_ = NULL;
	PublishingRESTSupportSession* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	SoupMessage* _tmp6_ = NULL;
	guint _tmp7_ = 0U;
	GError* _tmp8_ = NULL;
	GError* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
#line 238 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->parent_session;
#line 239 "/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 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->message;
#line 240 "/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 241 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->parent_session;
#line 241 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->message;
#line 241 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_session_send_wire_message (_tmp2_, _tmp3_);
#line 243 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->parent_session;
#line 243 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("wire-message-unqueued", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp5_, NULL, FALSE);
#line 243 "/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 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = self->priv->message;
#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("wrote-body-data", soup_message_get_type (), &_tmp7_, NULL, FALSE);
#line 244 "/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 246 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->err;
#line 246 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp8_ != NULL) {
#line 2626 "RESTSupport.c"
		GError* _tmp9_ = NULL;
#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = self->priv->err;
#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit_by_name (self, "network-error", _tmp9_);
#line 2632 "RESTSupport.c"
	} else {
#line 249 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit_by_name (self, "completed");
#line 2636 "RESTSupport.c"
	}
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = self->priv->err;
#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp10_ != NULL) {
#line 2642 "RESTSupport.c"
		GError* _tmp11_ = NULL;
		GError* _tmp12_ = NULL;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = self->priv->err;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = _g_error_copy0 (_tmp11_);
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp12_;
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2657 "RESTSupport.c"
		} else {
#line 252 "/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 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 2665 "RESTSupport.c"
		}
	}
}


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


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


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


void publishing_rest_support_transaction_set_custom_payload (PublishingRESTSupportTransaction* self, const gchar* custom_payload, const gchar* payload_content_type, gulong payload_length) {
	PublishingRESTSupportHttpMethod _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	gulong _tmp2_ = 0UL;
	gulong _tmp3_ = 0UL;
	gulong length = 0UL;
	SoupMessage* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	guint8* _tmp11_ = NULL;
	gint _tmp11__length1 = 0;
	guint8* _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
	gulong _tmp13_ = 0UL;
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self));
#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (payload_content_type != NULL);
#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_transaction_get_method (self);
#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_ != PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, "get_method() != HttpMethod.GET");
#line 275 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = custom_payload;
#line 275 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ == NULL) {
#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->use_custom_payload = FALSE;
#line 277 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2765 "RESTSupport.c"
	}
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = payload_length;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp3_ > ((gulong) 0)) {
#line 2771 "RESTSupport.c"
		gulong _tmp4_ = 0UL;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = payload_length;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = _tmp4_;
#line 2777 "RESTSupport.c"
	} else {
		const gchar* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = custom_payload;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = strlen (_tmp5_);
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = _tmp6_;
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = (gulong) _tmp7_;
#line 2790 "RESTSupport.c"
	}
#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	length = _tmp2_;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->message;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = payload_content_type;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = custom_payload;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = string_get_data (_tmp10_, &_tmp11__length1);
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = _tmp11_;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12__length1 = _tmp11__length1;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = length;
#line 281 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_set_request (_tmp8_, _tmp9_, SOUP_MEMORY_COPY, _tmp12_ + 0, (gsize) (((gint) _tmp13_) - 0));
#line 283 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->use_custom_payload = TRUE;
#line 2812 "RESTSupport.c"
}


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


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


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


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


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


static void publishing_rest_support_transaction_real_execute (PublishingRESTSupportTransaction* self, GError** error) {
	gboolean _tmp0_ = FALSE;
	PublishingRESTSupportHttpMethod _tmp1_ = 0;
	gchar* formdata_string = NULL;
	gchar* _tmp3_ = NULL;
	gchar* old_url = NULL;
	gchar* url_with_query = NULL;
	gboolean _tmp19_ = FALSE;
	PublishingRESTSupportHttpMethod _tmp20_ = 0;
	GError * _inner_error_ = NULL;
#line 308 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->use_custom_payload;
#line 308 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#line 309 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		self->priv->is_executed = TRUE;
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_send (self, &_inner_error_);
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_propagate_error (error, _inner_error_);
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2916 "RESTSupport.c"
			} else {
#line 310 "/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 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_clear_error (&_inner_error_);
#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return;
#line 2924 "RESTSupport.c"
			}
		}
#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 2929 "RESTSupport.c"
	}
#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_transaction_get_method (self);
#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ == PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST) {
#line 2935 "RESTSupport.c"
		PublishingRESTSupportArgument** _tmp2_ = NULL;
		gint _tmp2__length1 = 0;
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = self->priv->arguments;
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2__length1 = self->priv->arguments_length1;
#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_vala_assert (_tmp2__length1 > 0, "arguments.length > 0");
#line 2944 "RESTSupport.c"
	}
#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = g_strdup ("");
#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	formdata_string = _tmp3_;
#line 2950 "RESTSupport.c"
	{
		gint i = 0;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		i = 0;
#line 2955 "RESTSupport.c"
		{
			gboolean _tmp4_ = FALSE;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = TRUE;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			while (TRUE) {
#line 2962 "RESTSupport.c"
				gint _tmp6_ = 0;
				PublishingRESTSupportArgument** _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				const gchar* _tmp8_ = NULL;
				PublishingRESTSupportArgument** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				gint _tmp10_ = 0;
				PublishingRESTSupportArgument* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				gint _tmp15_ = 0;
				PublishingRESTSupportArgument** _tmp16_ = NULL;
				gint _tmp16__length1 = 0;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!_tmp4_) {
#line 2979 "RESTSupport.c"
					gint _tmp5_ = 0;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp5_ = i;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					i = _tmp5_ + 1;
#line 2985 "RESTSupport.c"
				}
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = FALSE;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = i;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = self->priv->arguments;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7__length1 = self->priv->arguments_length1;
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!(_tmp6_ < _tmp7__length1)) {
#line 321 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 2999 "RESTSupport.c"
				}
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = formdata_string;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = self->priv->arguments;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9__length1 = self->priv->arguments_length1;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp10_ = i;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp11_ = _tmp9_[_tmp10_];
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12_ = publishing_rest_support_argument_to_string (_tmp11_);
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp13_ = _tmp12_;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp14_ = g_strconcat (_tmp8_, _tmp13_, NULL);
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (formdata_string);
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				formdata_string = _tmp14_;
#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_free0 (_tmp13_);
#line 323 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp15_ = i;
#line 323 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp16_ = self->priv->arguments;
#line 323 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp16__length1 = self->priv->arguments_length1;
#line 323 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp15_ < (_tmp16__length1 - 1)) {
#line 3031 "RESTSupport.c"
					const gchar* _tmp17_ = NULL;
					gchar* _tmp18_ = NULL;
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp17_ = formdata_string;
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp18_ = g_strconcat (_tmp17_, "&", NULL);
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_free0 (formdata_string);
#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					formdata_string = _tmp18_;
#line 3042 "RESTSupport.c"
				}
			}
		}
	}
#line 330 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old_url = NULL;
#line 331 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	url_with_query = NULL;
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = publishing_rest_support_transaction_get_method (self);
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp20_ == PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET) {
#line 3055 "RESTSupport.c"
		PublishingRESTSupportArgument** _tmp21_ = NULL;
		gint _tmp21__length1 = 0;
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp21_ = self->priv->arguments;
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp21__length1 = self->priv->arguments_length1;
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = _tmp21__length1 > 0;
#line 3064 "RESTSupport.c"
	} else {
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = FALSE;
#line 3068 "RESTSupport.c"
	}
#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp19_) {
#line 3072 "RESTSupport.c"
		SoupMessage* _tmp22_ = NULL;
		SoupURI* _tmp23_ = NULL;
		gchar* _tmp24_ = NULL;
		gchar* _tmp25_ = NULL;
		gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		gchar* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		gchar* _tmp30_ = NULL;
		SoupMessage* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		SoupURI* _tmp33_ = NULL;
		SoupURI* _tmp34_ = NULL;
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp22_ = self->priv->message;
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp23_ = soup_message_get_uri (_tmp22_);
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = soup_uri_to_string (_tmp23_, FALSE);
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (old_url);
#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		old_url = _tmp24_;
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp25_ = publishing_rest_support_transaction_get_endpoint_url (self);
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp26_ = _tmp25_;
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp27_ = g_strconcat (_tmp26_, "?", NULL);
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp28_ = _tmp27_;
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp29_ = formdata_string;
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp30_ = g_strconcat (_tmp28_, _tmp29_, NULL);
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (url_with_query);
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		url_with_query = _tmp30_;
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp28_);
#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp26_);
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp31_ = self->priv->message;
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp32_ = url_with_query;
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp33_ = soup_uri_new (_tmp32_);
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp34_ = _tmp33_;
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_set_uri (_tmp31_, _tmp34_);
#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		__vala_SoupURI_free0 (_tmp34_);
#line 3128 "RESTSupport.c"
	} else {
		SoupMessage* _tmp35_ = NULL;
		const gchar* _tmp36_ = NULL;
		guint8* _tmp37_ = NULL;
		gint _tmp37__length1 = 0;
		guint8* _tmp38_ = NULL;
		gint _tmp38__length1 = 0;
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp35_ = self->priv->message;
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp36_ = formdata_string;
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp37_ = string_get_data (_tmp36_, &_tmp37__length1);
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp38_ = _tmp37_;
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp38__length1 = _tmp37__length1;
#line 337 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_set_request (_tmp35_, "application/x-www-form-urlencoded", SOUP_MEMORY_COPY, _tmp38_, (gsize) _tmp38__length1);
#line 3148 "RESTSupport.c"
	}
#line 341 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = TRUE;
#line 3152 "RESTSupport.c"
	{
		SoupMessage* _tmp39_ = NULL;
		SoupURI* _tmp40_ = NULL;
		gchar* _tmp41_ = NULL;
		gchar* _tmp42_ = NULL;
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp39_ = self->priv->message;
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp40_ = soup_message_get_uri (_tmp39_);
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp41_ = soup_uri_to_string (_tmp40_, FALSE);
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp42_ = _tmp41_;
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_debug ("RESTSupport.vala:344: sending message to URI = '%s'", _tmp42_);
#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp42_);
#line 345 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_send (self, &_inner_error_);
#line 345 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3174 "RESTSupport.c"
			goto __finally1;
		}
	}
	__finally1:
	{
		const gchar* _tmp43_ = NULL;
#line 348 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp43_ = old_url;
#line 348 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp43_ != NULL) {
#line 3185 "RESTSupport.c"
			SoupMessage* _tmp44_ = NULL;
			const gchar* _tmp45_ = NULL;
			SoupURI* _tmp46_ = NULL;
			SoupURI* _tmp47_ = NULL;
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp44_ = self->priv->message;
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp45_ = old_url;
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp46_ = soup_uri_new (_tmp45_);
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp47_ = _tmp46_;
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			soup_message_set_uri (_tmp44_, _tmp47_);
#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupURI_free0 (_tmp47_);
#line 3202 "RESTSupport.c"
		}
	}
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (url_with_query);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (old_url);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (formdata_string);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3219 "RESTSupport.c"
		} else {
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (url_with_query);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (old_url);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (formdata_string);
#line 343 "/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 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 343 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 3233 "RESTSupport.c"
		}
	}
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (url_with_query);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (old_url);
#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (formdata_string);
#line 3242 "RESTSupport.c"
}


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


gchar* publishing_rest_support_transaction_get_response (PublishingRESTSupportTransaction* self) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	SoupMessage* _tmp1_ = NULL;
	SoupMessageBody* _tmp2_ = NULL;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar* _tmp4_ = NULL;
#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_transaction_get_is_executed (self);
#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_, "get_is_executed()");
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->message;
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_->response_body;
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_->data;
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3__length1 = (gint) _tmp2_->length;
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = g_strdup ((const gchar*) _tmp3_);
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp4_;
#line 355 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3283 "RESTSupport.c"
}


SoupMessageHeaders* publishing_rest_support_transaction_get_response_headers (PublishingRESTSupportTransaction* self) {
	SoupMessageHeaders* result = NULL;
	gboolean _tmp0_ = FALSE;
	SoupMessage* _tmp1_ = NULL;
	SoupMessageHeaders* _tmp2_ = NULL;
#line 358 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_transaction_get_is_executed (self);
#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_, "get_is_executed()");
#line 360 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->message;
#line 360 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _tmp1_->response_headers;
#line 360 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 360 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3306 "RESTSupport.c"
}


SoupMessage* publishing_rest_support_transaction_get_message (PublishingRESTSupportTransaction* self) {
	SoupMessage* result = NULL;
	gboolean _tmp0_ = FALSE;
	SoupMessage* _tmp1_ = NULL;
	SoupMessage* _tmp2_ = NULL;
#line 363 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_transaction_get_is_executed (self);
#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_, "get_is_executed()");
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->message;
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3329 "RESTSupport.c"
}


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


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


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


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


PublishingRESTSupportSession* publishing_rest_support_transaction_get_parent_session (PublishingRESTSupportTransaction* self) {
	PublishingRESTSupportSession* result = NULL;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	PublishingRESTSupportSession* _tmp1_ = NULL;
#line 376 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL);
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->parent_session;
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _publishing_rest_support_session_ref0 (_tmp0_);
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 3442 "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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (n_param_values == 3);
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data1 = closure->data;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data2 = param_values->data[0].v_pointer;
#line 3461 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data1 = param_values->data[0].v_pointer;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		data2 = closure->data;
#line 3467 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
#line 139 "/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 3473 "RESTSupport.c"
}


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


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


static void publishing_rest_support_value_transaction_copy_value (const GValue* src_value, GValue* dest_value) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 139 "/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 3499 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3503 "RESTSupport.c"
	}
}


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


static gchar* publishing_rest_support_value_transaction_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 3518 "RESTSupport.c"
		PublishingRESTSupportTransaction* object;
		object = collect_values[0].v_pointer;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 139 "/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 3525 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 139 "/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 3529 "RESTSupport.c"
		}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_transaction_ref (object);
#line 3533 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 3537 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 3541 "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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 139 "/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 3552 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 3558 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 3562 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_transaction_ref (value->data[0].v_pointer);
#line 3566 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 3570 "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 139 "/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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 3584 "RESTSupport.c"
}


gpointer publishing_rest_support_value_get_transaction (const GValue* value) {
#line 139 "/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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 3593 "RESTSupport.c"
}


void publishing_rest_support_value_set_transaction (GValue* value, gpointer v_object) {
	PublishingRESTSupportTransaction* old;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 139 "/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 139 "/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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_ref (value->data[0].v_pointer);
#line 3613 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 3617 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_unref (old);
#line 3623 "RESTSupport.c"
	}
}


void publishing_rest_support_value_take_transaction (GValue* value, gpointer v_object) {
	PublishingRESTSupportTransaction* old;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION));
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 139 "/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 139 "/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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 3642 "RESTSupport.c"
	} else {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 3646 "RESTSupport.c"
	}
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_unref (old);
#line 3652 "RESTSupport.c"
	}
}


static void publishing_rest_support_transaction_class_init (PublishingRESTSupportTransactionClass * klass) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_parent_class = g_type_class_peek_parent (klass);
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_transaction_finalize;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportTransactionPrivate));
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->add_header = publishing_rest_support_transaction_real_add_header;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportTransactionClass *) klass)->execute = publishing_rest_support_transaction_real_execute;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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 3674 "RESTSupport.c"
}


static void publishing_rest_support_transaction_instance_init (PublishingRESTSupportTransaction * self) {
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_TRANSACTION_GET_PRIVATE (self);
#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->is_executed = FALSE;
#line 142 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->parent_session = NULL;
#line 143 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->message = NULL;
#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->bytes_written = 0;
#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->err = NULL;
#line 146 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->endpoint_url = NULL;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 3695 "RESTSupport.c"
}


static void publishing_rest_support_transaction_finalize (PublishingRESTSupportTransaction* obj) {
	PublishingRESTSupportTransaction * self;
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction);
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 140 "/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 143 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->message);
#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_error_free0 (self->priv->err);
#line 146 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->endpoint_url);
#line 3713 "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 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 3738 "RESTSupport.c"
}


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


PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_construct (GType object_type, PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable) {
	PublishingRESTSupportUploadTransaction* self = NULL;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	SpitPublishingPublishable* _tmp1_ = NULL;
	SpitPublishingPublishable* _tmp2_ = NULL;
	SpitPublishingPublishable* _tmp3_ = NULL;
	SpitPublishingPublisherMediaType _tmp4_ = 0;
	gchar* _tmp5_ = NULL;
	GHashTable* _tmp6_ = NULL;
	GeeHashMap* _tmp7_ = NULL;
#line 387 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 387 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL);
#line 388 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 388 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishable;
#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->publishable = _tmp2_;
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = publishable;
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = spit_publishing_publishable_get_media_type (_tmp3_);
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (_tmp4_);
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->mime_type = _tmp5_;
#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self);
#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = _tmp6_;
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->message_headers = _tmp7_;
#line 387 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 3806 "RESTSupport.c"
}


PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new (PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable) {
#line 387 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_upload_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, session, publishable);
#line 3813 "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;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	SpitPublishingPublishable* _tmp2_ = NULL;
	SpitPublishingPublishable* _tmp3_ = NULL;
	SpitPublishingPublishable* _tmp4_ = NULL;
	SpitPublishingPublisherMediaType _tmp5_ = 0;
	gchar* _tmp6_ = NULL;
	GHashTable* _tmp7_ = NULL;
	GeeHashMap* _tmp8_ = NULL;
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL);
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 399 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 399 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = endpoint_url;
#line 399 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, _tmp0_, _tmp1_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 400 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishable;
#line 400 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 400 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 400 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->publishable = _tmp3_;
#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishable;
#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = spit_publishing_publishable_get_media_type (_tmp4_);
#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (_tmp5_);
#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->mime_type = _tmp6_;
#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self);
#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->binary_disposition_table = _tmp7_;
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->message_headers = _tmp8_;
#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 3872 "RESTSupport.c"
}


PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable, const gchar* endpoint_url) {
#line 397 "/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 3879 "RESTSupport.c"
}


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


static gchar* publishing_rest_support_upload_transaction_media_type_to_mime_type (SpitPublishingPublisherMediaType media_type) {
	gchar* result = NULL;
	SpitPublishingPublisherMediaType _tmp0_ = 0;
#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = media_type;
#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) {
#line 3913 "RESTSupport.c"
		gchar* _tmp1_ = NULL;
#line 414 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = g_strdup ("image/jpeg");
#line 414 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		result = _tmp1_;
#line 414 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return result;
#line 3921 "RESTSupport.c"
	} else {
		SpitPublishingPublisherMediaType _tmp2_ = 0;
#line 415 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = media_type;
#line 415 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp2_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) {
#line 3928 "RESTSupport.c"
			gchar* _tmp3_ = NULL;
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp3_ = g_strdup ("video/mpeg");
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			result = _tmp3_;
#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return result;
#line 3936 "RESTSupport.c"
		} else {
			SpitPublishingPublisherMediaType _tmp4_ = 0;
			GEnumValue* _tmp5_;
#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = media_type;
#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = g_enum_get_value (g_type_class_ref (SPIT_PUBLISHING_PUBLISHER_TYPE_MEDIA_TYPE), _tmp4_);
#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_error ("RESTSupport.vala:418: UploadTransaction: unknown media type %s.", (_tmp5_ != NULL) ? _tmp5_->value_name : NULL);
#line 3946 "RESTSupport.c"
		}
	}
}


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


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


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


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


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


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


static void publishing_rest_support_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) {
	PublishingRESTSupportUploadTransaction * self;
	PublishingRESTSupportArgument** request_arguments = NULL;
	gint _tmp0_ = 0;
	PublishingRESTSupportArgument** _tmp1_ = NULL;
	gint request_arguments_length1 = 0;
	gint _request_arguments_size_ = 0;
	PublishingRESTSupportArgument** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	SoupMultipart* message_parts = NULL;
	SoupMultipart* _tmp3_ = NULL;
	PublishingRESTSupportArgument** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar* payload = NULL;
	gsize payload_length = 0UL;
	gint payload_part_num = 0;
	SoupMultipart* _tmp20_ = NULL;
	gint _tmp21_ = 0;
	SoupBuffer* bindable_data = NULL;
	const gchar* _tmp22_ = NULL;
	guint8* _tmp23_ = NULL;
	gint _tmp23__length1 = 0;
	guint8* _tmp24_ = NULL;
	gint _tmp24__length1 = 0;
	gsize _tmp25_ = 0UL;
	SoupBuffer* _tmp26_ = NULL;
	SoupMultipart* _tmp27_ = NULL;
	SpitPublishingPublishable* _tmp28_ = NULL;
	GFile* _tmp29_ = NULL;
	GFile* _tmp30_ = NULL;
	gchar* _tmp31_ = NULL;
	gchar* _tmp32_ = NULL;
	const gchar* _tmp33_ = NULL;
	SoupBuffer* _tmp34_ = NULL;
	SoupMessageHeaders* image_part_header = NULL;
	SoupBuffer* image_part_body = NULL;
	SoupMultipart* _tmp35_ = NULL;
	gint _tmp36_ = 0;
	SoupMessageHeaders* _tmp37_ = NULL;
	SoupBuffer* _tmp38_ = NULL;
	SoupMessageHeaders* _tmp39_ = NULL;
	GHashTable* _tmp40_ = NULL;
	SoupMessage* outbound_message = NULL;
	gchar* _tmp41_ = NULL;
	gchar* _tmp42_ = NULL;
	SoupMultipart* _tmp43_ = NULL;
	SoupMessage* _tmp44_ = NULL;
	SoupMessage* _tmp45_ = NULL;
	GeeMapIterator* i = NULL;
	GeeHashMap* _tmp46_ = NULL;
	GeeMapIterator* _tmp47_ = NULL;
	gboolean cont = FALSE;
	GeeMapIterator* _tmp48_ = NULL;
	gboolean _tmp49_ = FALSE;
	SoupMessage* _tmp61_ = NULL;
	GError * _inner_error_ = NULL;
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction);
#line 436 "/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 436 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	request_arguments = _tmp1_;
#line 436 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	request_arguments_length1 = _tmp0_;
#line 436 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_request_arguments_size_ = request_arguments_length1;
#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = request_arguments;
#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2__length1 = request_arguments_length1;
#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp2__length1 > 0, "request_arguments.length > 0");
#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = soup_multipart_new ("multipart/form-data");
#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	message_parts = _tmp3_;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = request_arguments;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4__length1 = request_arguments_length1;
#line 4130 "RESTSupport.c"
	{
		PublishingRESTSupportArgument** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection = _tmp4_;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		arg_collection_length1 = _tmp4__length1;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (arg_it = 0; arg_it < _tmp4__length1; arg_it = arg_it + 1) {
#line 4142 "RESTSupport.c"
			PublishingRESTSupportArgument* _tmp5_ = NULL;
			PublishingRESTSupportArgument* arg = NULL;
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]);
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			arg = _tmp5_;
#line 4149 "RESTSupport.c"
			{
				SoupMultipart* _tmp6_ = NULL;
				PublishingRESTSupportArgument* _tmp7_ = NULL;
				const gchar* _tmp8_ = NULL;
				PublishingRESTSupportArgument* _tmp9_ = NULL;
				const gchar* _tmp10_ = NULL;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = message_parts;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = arg;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = _tmp7_->key;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = arg;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp10_ = _tmp9_->value;
#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				soup_multipart_append_form_string (_tmp6_, _tmp8_, _tmp10_);
#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_argument_unref0 (arg);
#line 4170 "RESTSupport.c"
			}
		}
	}
	{
		SpitPublishingPublishable* _tmp11_ = NULL;
		GFile* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gsize _tmp17_ = 0UL;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = self->publishable;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = spit_publishing_publishable_get_serialized_file (_tmp11_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp13_ = _tmp12_;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = g_file_get_path (_tmp13_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp15_ = _tmp14_;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_file_get_contents (_tmp15_, &_tmp16_, &_tmp17_, &_inner_error_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (payload);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		payload = _tmp16_;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		payload_length = _tmp17_;
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp15_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (_tmp13_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 4208 "RESTSupport.c"
				goto __catch2_g_file_error;
			}
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 447 "/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 447 "/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 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4223 "RESTSupport.c"
		}
	}
	goto __finally2;
	__catch2_g_file_error:
	{
		GError* e = NULL;
		const gchar* _tmp18_ = NULL;
		GError* _tmp19_ = NULL;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		e = _inner_error_;
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = _ ("A temporary file needed for publishing is unavailable");
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp18_);
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp19_;
#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (e);
#line 4244 "RESTSupport.c"
		goto __finally2;
	}
	__finally2:
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 446 "/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 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4262 "RESTSupport.c"
		} else {
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 446 "/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 446 "/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 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4276 "RESTSupport.c"
		}
	}
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = message_parts;
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = soup_multipart_get_length (_tmp20_);
#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	payload_part_num = _tmp21_;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = payload;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = string_get_data (_tmp22_, &_tmp23__length1);
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = _tmp23_;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24__length1 = _tmp23__length1;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = payload_length;
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp26_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp24_ + 0, ((gint) _tmp25_) - 0);
#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	bindable_data = _tmp26_;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp27_ = message_parts;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp28_ = self->publishable;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp29_ = spit_publishing_publishable_get_serialized_file (_tmp28_);
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp30_ = _tmp29_;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp31_ = g_file_get_path (_tmp30_);
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp32_ = _tmp31_;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp33_ = self->mime_type;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp34_ = bindable_data;
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_multipart_append_form_file (_tmp27_, "", _tmp32_, _tmp33_, _tmp34_);
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp32_);
#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_tmp30_);
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp35_ = message_parts;
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp36_ = payload_part_num;
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_multipart_get_part (_tmp35_, _tmp36_, &_tmp37_, &_tmp38_);
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	image_part_header = _tmp37_;
#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	image_part_body = _tmp38_;
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp39_ = image_part_header;
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp40_ = self->binary_disposition_table;
#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	soup_message_headers_set_content_disposition (_tmp39_, "form-data", _tmp40_);
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp41_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction));
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp42_ = _tmp41_;
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp43_ = message_parts;
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp44_ = soup_form_request_new_from_multipart (_tmp42_, _tmp43_);
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp45_ = _tmp44_;
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp42_);
#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	outbound_message = _tmp45_;
#line 468 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp46_ = self->message_headers;
#line 468 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp47_ = gee_abstract_map_map_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 468 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	i = _tmp47_;
#line 469 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp48_ = i;
#line 469 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp49_ = gee_map_iterator_next (_tmp48_);
#line 469 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	cont = _tmp49_;
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	while (TRUE) {
#line 4365 "RESTSupport.c"
		gboolean _tmp50_ = FALSE;
		SoupMessage* _tmp51_ = NULL;
		SoupMessageHeaders* _tmp52_ = NULL;
		GeeMapIterator* _tmp53_ = NULL;
		gpointer _tmp54_ = NULL;
		gchar* _tmp55_ = NULL;
		GeeMapIterator* _tmp56_ = NULL;
		gpointer _tmp57_ = NULL;
		gchar* _tmp58_ = NULL;
		GeeMapIterator* _tmp59_ = NULL;
		gboolean _tmp60_ = FALSE;
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp50_ = cont;
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (!_tmp50_) {
#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 4383 "RESTSupport.c"
		}
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp51_ = outbound_message;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp52_ = _tmp51_->request_headers;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp53_ = i;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp54_ = gee_map_iterator_get_key (_tmp53_);
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp55_ = (gchar*) _tmp54_;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp56_ = i;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp57_ = gee_map_iterator_get_value (_tmp56_);
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp58_ = (gchar*) _tmp57_;
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		soup_message_headers_append (_tmp52_, _tmp55_, _tmp58_);
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp58_);
#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp55_);
#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp59_ = i;
#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp60_ = gee_map_iterator_next (_tmp59_);
#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		cont = _tmp60_;
#line 4413 "RESTSupport.c"
	}
#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp61_ = outbound_message;
#line 474 "/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), _tmp61_);
#line 476 "/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 477 "/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 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (i);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (outbound_message);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupBuffer_free0 (bindable_data);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 477 "/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 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4443 "RESTSupport.c"
		} else {
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (i);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_object_unref0 (outbound_message);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupBuffer_free0 (bindable_data);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (payload);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			__vala_SoupMultipart_free0 (message_parts);
#line 477 "/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 477 "/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 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 477 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 4463 "RESTSupport.c"
		}
	}
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (i);
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (outbound_message);
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	__vala_SoupBuffer_free0 (bindable_data);
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (payload);
#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	__vala_SoupMultipart_free0 (message_parts);
#line 435 "/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 4478 "RESTSupport.c"
}


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


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


static void publishing_rest_support_upload_transaction_finalize (PublishingRESTSupportTransaction* obj) {
	PublishingRESTSupportUploadTransaction * self;
#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction);
#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_hash_table_unref0 (self->binary_disposition_table);
#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->publishable);
#line 384 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->mime_type);
#line 385 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->message_headers);
#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_rest_support_upload_transaction_parent_class)->finalize (obj);
#line 4520 "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;
	xmlDoc* _tmp0_ = NULL;
#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportXmlDocument*) g_type_create_instance (object_type);
#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = doc;
#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->document = _tmp0_;
#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 4547 "RESTSupport.c"
}


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


xmlNode* publishing_rest_support_xml_document_get_root_node (PublishingRESTSupportXmlDocument* self) {
	xmlNode* result = NULL;
	xmlDoc* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
#line 497 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->document;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = xmlDocGetRootElement (_tmp0_);
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 4572 "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_ = NULL;
	xmlNode* _tmp1_ = NULL;
	const gchar* _tmp10_ = NULL;
	GError* _tmp11_ = NULL;
	GError * _inner_error_ = NULL;
#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (child_name != NULL, NULL);
#line 503 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = parent;
#line 503 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_->children;
#line 503 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	doc_node_iter = _tmp1_;
#line 4594 "RESTSupport.c"
	{
		gboolean _tmp2_ = FALSE;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = TRUE;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		while (TRUE) {
#line 4601 "RESTSupport.c"
			xmlNode* _tmp5_ = NULL;
			xmlNode* _tmp6_ = NULL;
			const gchar* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (!_tmp2_) {
#line 4608 "RESTSupport.c"
				xmlNode* _tmp3_ = NULL;
				xmlNode* _tmp4_ = NULL;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = doc_node_iter;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = _tmp3_->next;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				doc_node_iter = _tmp4_;
#line 4617 "RESTSupport.c"
			}
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp2_ = FALSE;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp5_ = doc_node_iter;
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (!(_tmp5_ != NULL)) {
#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				break;
#line 4627 "RESTSupport.c"
			}
#line 506 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = doc_node_iter;
#line 506 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = _tmp6_->name;
#line 506 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = child_name;
#line 506 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (g_strcmp0 (_tmp7_, _tmp8_) == 0) {
#line 4637 "RESTSupport.c"
				xmlNode* _tmp9_ = NULL;
#line 507 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = doc_node_iter;
#line 507 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				result = _tmp9_;
#line 507 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				return result;
#line 4645 "RESTSupport.c"
			}
		}
	}
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = child_name;
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML node %s", _tmp10_);
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_inner_error_ = _tmp11_;
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_propagate_error (error, _inner_error_);
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return NULL;
#line 4661 "RESTSupport.c"
	} else {
#line 510 "/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 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return NULL;
#line 4669 "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;
	xmlNode* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL);
#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (property_key != NULL, NULL);
#line 516 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = node;
#line 516 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = property_key;
#line 516 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = (gchar*) xmlGetProp (_tmp0_, (xmlChar*) _tmp1_);
#line 516 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	value_string = _tmp2_;
#line 517 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = value_string;
#line 517 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp3_ == NULL) {
#line 4698 "RESTSupport.c"
		const gchar* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		GError* _tmp7_ = NULL;
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = property_key;
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = node;
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = _tmp5_->name;
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML " "property %s on node %s", _tmp4_, _tmp6_);
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp7_;
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (value_string);
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4721 "RESTSupport.c"
		} else {
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (value_string);
#line 518 "/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 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 518 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4731 "RESTSupport.c"
		}
	}
#line 521 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = value_string;
#line 521 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 4738 "RESTSupport.c"
}


static gchar* string_chug (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 1199 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1200 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = g_strdup (self);
#line 1200 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1201 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1201 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_strchug (_tmp1_);
#line 1202 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	result = _result_;
#line 1202 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	return result;
#line 4761 "RESTSupport.c"
}


static gchar* string_chomp (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 1191 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1192 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = g_strdup (self);
#line 1192 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1193 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1193 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_strchomp (_tmp1_);
#line 1194 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	result = _result_;
#line 1194 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	return result;
#line 4784 "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;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	xmlDoc* doc = NULL;
	const gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	xmlDoc* _tmp25_ = NULL;
	xmlDoc* _tmp26_ = NULL;
	xmlDoc* _tmp28_ = NULL;
	xmlNode* _tmp29_ = NULL;
	PublishingRESTSupportXmlDocument* rest_doc = NULL;
	xmlDoc* _tmp31_ = NULL;
	PublishingRESTSupportXmlDocument* _tmp32_ = NULL;
	gchar* _result_ = NULL;
	PublishingRESTSupportXmlDocumentCheckForErrorResponse _tmp33_ = NULL;
	void* _tmp33__target = NULL;
	PublishingRESTSupportXmlDocument* _tmp34_ = NULL;
	gchar* _tmp35_ = NULL;
	const gchar* _tmp36_ = NULL;
	GError * _inner_error_ = NULL;
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = input_string;
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ == NULL) {
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = TRUE;
#line 4825 "RESTSupport.c"
	} else {
		const gchar* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = input_string;
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = strlen (_tmp2_);
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = _tmp3_;
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = _tmp4_ == 0;
#line 4838 "RESTSupport.c"
	}
#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#line 4842 "RESTSupport.c"
		GError* _tmp5_ = NULL;
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Empty XML string");
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp5_;
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4854 "RESTSupport.c"
		} else {
#line 527 "/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 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4862 "RESTSupport.c"
		}
	}
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = input_string;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = string_chug (_tmp7_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = _tmp8_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = string_chomp (_tmp9_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = _tmp10_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = g_str_has_prefix (_tmp11_, "<");
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = !_tmp12_;
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp11_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp9_);
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp13_) {
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = TRUE;
#line 4887 "RESTSupport.c"
	} else {
		const gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		gboolean _tmp19_ = FALSE;
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = input_string;
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp15_ = string_chug (_tmp14_);
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp16_ = _tmp15_;
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp17_ = string_chomp (_tmp16_);
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = _tmp17_;
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = g_str_has_suffix (_tmp18_, ">");
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = !_tmp19_;
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp18_);
#line 531 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp16_);
#line 4913 "RESTSupport.c"
	}
#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp6_) {
#line 4917 "RESTSupport.c"
		GError* _tmp20_ = NULL;
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp20_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp20_;
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4929 "RESTSupport.c"
		} else {
#line 533 "/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 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 533 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4937 "RESTSupport.c"
		}
	}
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = input_string;
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = input_string;
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = strlen (_tmp22_);
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = _tmp23_;
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = xmlReadMemory (_tmp21_, (gint) _tmp24_, NULL, NULL, (gint) (XML_PARSE_NOBLANKS | XML_PARSE_RECOVER));
#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	doc = _tmp25_;
#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp26_ = doc;
#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp26_ == NULL) {
#line 4956 "RESTSupport.c"
		GError* _tmp27_ = NULL;
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp27_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp27_;
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4968 "RESTSupport.c"
		} else {
#line 542 "/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 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4976 "RESTSupport.c"
		}
	}
#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp28_ = doc;
#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp29_ = _tmp28_->children;
#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp29_ == NULL) {
#line 4985 "RESTSupport.c"
		GError* _tmp30_ = NULL;
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp30_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document");
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp30_;
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 4997 "RESTSupport.c"
		} else {
#line 548 "/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 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5005 "RESTSupport.c"
		}
	}
#line 552 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp31_ = doc;
#line 552 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp32_ = publishing_rest_support_xml_document_new (_tmp31_);
#line 552 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	rest_doc = _tmp32_;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp33_ = check_for_error_response;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp33__target = check_for_error_response_target;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp34_ = rest_doc;
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp35_ = _tmp33_ (_tmp34_, _tmp33__target);
#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_result_ = _tmp35_;
#line 555 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp36_ = _result_;
#line 555 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp36_ != NULL) {
#line 5028 "RESTSupport.c"
		const gchar* _tmp37_ = NULL;
		GError* _tmp38_ = NULL;
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp37_ = _result_;
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp38_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SERVICE_ERROR, "%s", _tmp37_);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = _tmp38_;
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_propagate_error (error, _inner_error_);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_result_);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_xml_document_unref0 (rest_doc);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5047 "RESTSupport.c"
		} else {
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_result_);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_xml_document_unref0 (rest_doc);
#line 556 "/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 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return NULL;
#line 5059 "RESTSupport.c"
		}
	}
#line 558 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = rest_doc;
#line 558 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_result_);
#line 558 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 5068 "RESTSupport.c"
}


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


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


static void publishing_rest_support_value_xml_document_copy_value (const GValue* src_value, GValue* dest_value) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 481 "/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 5094 "RESTSupport.c"
	} else {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 5098 "RESTSupport.c"
	}
}


static gpointer publishing_rest_support_value_xml_document_peek_pointer (const GValue* value) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 5106 "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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 5113 "RESTSupport.c"
		PublishingRESTSupportXmlDocument* object;
		object = collect_values[0].v_pointer;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 481 "/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 5120 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 481 "/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 5124 "RESTSupport.c"
		}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_xml_document_ref (object);
#line 5128 "RESTSupport.c"
	} else {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5132 "RESTSupport.c"
	}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 5136 "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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 481 "/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 5147 "RESTSupport.c"
	}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 5153 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 5157 "RESTSupport.c"
	} else {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_xml_document_ref (value->data[0].v_pointer);
#line 5161 "RESTSupport.c"
	}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 5165 "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 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 5179 "RESTSupport.c"
}


gpointer publishing_rest_support_value_get_xml_document (const GValue* value) {
#line 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 5188 "RESTSupport.c"
}


void publishing_rest_support_value_set_xml_document (GValue* value, gpointer v_object) {
	PublishingRESTSupportXmlDocument* old;
#line 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 481 "/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 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_ref (value->data[0].v_pointer);
#line 5208 "RESTSupport.c"
	} else {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5212 "RESTSupport.c"
	}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_unref (old);
#line 5218 "RESTSupport.c"
	}
}


void publishing_rest_support_value_take_xml_document (GValue* value, gpointer v_object) {
	PublishingRESTSupportXmlDocument* old;
#line 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 481 "/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 481 "/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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 5237 "RESTSupport.c"
	} else {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 5241 "RESTSupport.c"
	}
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_xml_document_unref (old);
#line 5247 "RESTSupport.c"
	}
}


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


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


static void publishing_rest_support_xml_document_finalize (PublishingRESTSupportXmlDocument* obj) {
	PublishingRESTSupportXmlDocument * self;
	xmlDoc* _tmp0_ = NULL;
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocument);
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->document;
#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	xmlFreeDoc (_tmp0_);
#line 5283 "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 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 5308 "RESTSupport.c"
}


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


gchar* publishing_rest_support_decimal_entity_encode (const gchar* source) {
	gchar* result = NULL;
	GString* encoded_str_builder = NULL;
	GString* _tmp0_ = NULL;
	gchar* current_char = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GString* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
#line 567 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = g_string_new ("");
#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	encoded_str_builder = _tmp0_;
#line 569 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = source;
#line 569 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 569 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	current_char = _tmp2_;
#line 570 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	while (TRUE) {
#line 5350 "RESTSupport.c"
		gint current_char_value = 0;
		const gchar* _tmp3_ = NULL;
		gunichar _tmp4_ = 0U;
		gint _tmp5_ = 0;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		gint _tmp9_ = 0;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = current_char;
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = g_utf8_get_char_validated (_tmp3_, (gssize) -1);
#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		current_char_value = (gint) _tmp4_;
#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = current_char_value;
#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp5_ < 1) {
#line 575 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 5374 "RESTSupport.c"
		}
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = current_char_value;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp9_ < 128) {
#line 5380 "RESTSupport.c"
			gint _tmp10_ = 0;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp10_ = current_char_value;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = _tmp10_ != ((gint) '&');
#line 5386 "RESTSupport.c"
		} else {
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = FALSE;
#line 5390 "RESTSupport.c"
		}
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp8_) {
#line 5394 "RESTSupport.c"
			gint _tmp11_ = 0;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp11_ = current_char_value;
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = _tmp11_ != ((gint) '<');
#line 5400 "RESTSupport.c"
		} else {
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = FALSE;
#line 5404 "RESTSupport.c"
		}
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp7_) {
#line 5408 "RESTSupport.c"
			gint _tmp12_ = 0;
#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp12_ = current_char_value;
#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = _tmp12_ != ((gint) '>');
#line 5414 "RESTSupport.c"
		} else {
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp6_ = FALSE;
#line 5418 "RESTSupport.c"
		}
#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp6_) {
#line 5422 "RESTSupport.c"
			GString* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			gunichar _tmp15_ = 0U;
#line 581 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp13_ = encoded_str_builder;
#line 581 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp14_ = current_char;
#line 581 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp15_ = g_utf8_get_char_validated (_tmp14_, (gssize) -1);
#line 581 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_string_append_unichar (_tmp13_, _tmp15_);
#line 5434 "RESTSupport.c"
		} else {
			GString* _tmp16_ = NULL;
			gint _tmp17_ = 0;
			gchar* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp16_ = encoded_str_builder;
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp17_ = current_char_value;
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp18_ = g_strdup_printf ("&#%d;", _tmp17_);
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp19_ = _tmp18_;
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_string_append (_tmp16_, _tmp19_);
#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp19_);
#line 5452 "RESTSupport.c"
		}
#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp20_ = current_char;
#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp21_ = g_utf8_next_char (_tmp20_);
#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp22_ = g_strdup (_tmp21_);
#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (current_char);
#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		current_char = _tmp22_;
#line 5464 "RESTSupport.c"
	}
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = encoded_str_builder;
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = _tmp23_->str;
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = g_strdup (_tmp24_);
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp25_;
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (current_char);
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (encoded_str_builder);
#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 5480 "RESTSupport.c"
}


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


PublishingRESTSupportBatchUploader* publishing_rest_support_batch_uploader_construct (GType object_type, PublishingRESTSupportSession* session, SpitPublishingPublishable** publishables, int publishables_length1) {
	PublishingRESTSupportBatchUploader* self = NULL;
	SpitPublishingPublishable** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	SpitPublishingPublishable** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	PublishingRESTSupportSession* _tmp2_ = NULL;
	PublishingRESTSupportSession* _tmp3_ = NULL;
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportBatchUploader*) g_type_create_instance (object_type);
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishables;
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = publishables_length1;
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup2 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1__length1 = _tmp0__length1;
#line 601 "/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 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = _tmp1_;
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables_length1 = _tmp1__length1;
#line 601 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->_publishables_size_ = self->priv->publishables_length1;
#line 602 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = session;
#line 602 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _publishing_rest_support_session_ref0 (_tmp2_);
#line 602 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 602 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = _tmp3_;
#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 5543 "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 623 "/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 5550 "RESTSupport.c"
}


static void publishing_rest_support_batch_uploader_send_files (PublishingRESTSupportBatchUploader* self) {
	gboolean stop = FALSE;
	SpitPublishingPublishable** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gboolean _tmp23_ = FALSE;
	GError * _inner_error_ = NULL;
#line 605 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->current_file = 0;
#line 607 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	stop = FALSE;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 5570 "RESTSupport.c"
	{
		SpitPublishingPublishable** publishable_collection = NULL;
		gint publishable_collection_length1 = 0;
		gint _publishable_collection_size_ = 0;
		gint publishable_it = 0;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishable_collection = _tmp0_;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishable_collection_length1 = _tmp0__length1;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		for (publishable_it = 0; publishable_it < _tmp0__length1; publishable_it = publishable_it + 1) {
#line 5582 "RESTSupport.c"
			SpitPublishingPublishable* _tmp1_ = NULL;
			SpitPublishingPublishable* publishable = NULL;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp1_ = _g_object_ref0 (publishable_collection[publishable_it]);
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishable = _tmp1_;
#line 5589 "RESTSupport.c"
			{
				GFile* file = NULL;
				SpitPublishingPublishable* _tmp2_ = NULL;
				GFile* _tmp3_ = NULL;
				GFile* _tmp4_ = NULL;
				gdouble fraction_complete = 0.0;
				gint _tmp6_ = 0;
				SpitPublishingPublishable** _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				SpitPublishingProgressCallback _tmp8_ = NULL;
				void* _tmp8__target = NULL;
				PublishingRESTSupportTransaction* txn = NULL;
				SpitPublishingPublishable** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				gint _tmp13_ = 0;
				SpitPublishingPublishable* _tmp14_ = NULL;
				PublishingRESTSupportTransaction* _tmp15_ = NULL;
				PublishingRESTSupportTransaction* _tmp16_ = NULL;
				PublishingRESTSupportTransaction* _tmp19_ = NULL;
				guint _tmp20_ = 0U;
				gboolean _tmp21_ = FALSE;
				gint _tmp22_ = 0;
#line 609 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp2_ = publishable;
#line 609 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp3_ = spit_publishing_publishable_get_serialized_file (_tmp2_);
#line 609 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				file = _tmp3_;
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = file;
#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp4_ == NULL) {
#line 5622 "RESTSupport.c"
					gint _tmp5_ = 0;
#line 613 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp5_ = self->priv->current_file;
#line 613 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					self->priv->current_file = _tmp5_ + 1;
#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					continue;
#line 5634 "RESTSupport.c"
				}
#line 617 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp6_ = self->priv->current_file;
#line 617 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = self->priv->publishables;
#line 617 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7__length1 = self->priv->publishables_length1;
#line 617 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				fraction_complete = ((gdouble) _tmp6_) / _tmp7__length1;
#line 618 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = self->priv->status_updated;
#line 618 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8__target = self->priv->status_updated_target;
#line 618 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp8_ != NULL) {
#line 5650 "RESTSupport.c"
					SpitPublishingProgressCallback _tmp9_ = NULL;
					void* _tmp9__target = NULL;
					gint _tmp10_ = 0;
					gdouble _tmp11_ = 0.0;
#line 619 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9_ = self->priv->status_updated;
#line 619 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9__target = self->priv->status_updated_target;
#line 619 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp10_ = self->priv->current_file;
#line 619 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp11_ = fraction_complete;
#line 619 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp9_ (_tmp10_ + 1, _tmp11_, _tmp9__target);
#line 5665 "RESTSupport.c"
				}
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12_ = self->priv->publishables;
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp12__length1 = self->priv->publishables_length1;
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp13_ = self->priv->current_file;
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp14_ = _tmp12_[_tmp13_];
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp15_ = publishing_rest_support_batch_uploader_create_transaction (self, _tmp14_);
#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				txn = _tmp15_;
#line 623 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp16_ = txn;
#line 623 "/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 5683 "RESTSupport.c"
				{
					PublishingRESTSupportTransaction* _tmp17_ = NULL;
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp17_ = txn;
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					publishing_rest_support_transaction_execute (_tmp17_, &_inner_error_);
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 5694 "RESTSupport.c"
							goto __catch3_spit_publishing_publishing_error;
						}
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_publishing_rest_support_transaction_unref0 (txn);
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_g_object_unref0 (file);
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						_g_object_unref0 (publishable);
#line 626 "/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 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						g_clear_error (&_inner_error_);
#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
						return;
#line 5709 "RESTSupport.c"
					}
				}
				goto __finally3;
				__catch3_spit_publishing_publishing_error:
				{
					GError* err = NULL;
					GError* _tmp18_ = NULL;
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					err = _inner_error_;
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_inner_error_ = NULL;
#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp18_ = err;
#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_signal_emit_by_name (self, "upload-error", _tmp18_);
#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					stop = TRUE;
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_error_free0 (err);
#line 5729 "RESTSupport.c"
				}
				__finally3:
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_publishing_rest_support_transaction_unref0 (txn);
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 625 "/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 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_clear_error (&_inner_error_);
#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					return;
#line 5746 "RESTSupport.c"
				}
#line 632 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp19_ = txn;
#line 632 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				g_signal_parse_name ("chunk-transmitted", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp20_, NULL, FALSE);
#line 632 "/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 634 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp21_ = stop;
#line 634 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (_tmp21_) {
#line 635 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_publishing_rest_support_transaction_unref0 (txn);
#line 635 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (file);
#line 635 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_g_object_unref0 (publishable);
#line 635 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 5766 "RESTSupport.c"
				}
#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp22_ = self->priv->current_file;
#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				self->priv->current_file = _tmp22_ + 1;
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_publishing_rest_support_transaction_unref0 (txn);
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_object_unref0 (file);
#line 608 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_g_object_unref0 (publishable);
#line 5778 "RESTSupport.c"
			}
		}
	}
#line 640 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = stop;
#line 640 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp23_) {
#line 5786 "RESTSupport.c"
		gint _tmp24_ = 0;
#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = self->priv->current_file;
#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit_by_name (self, "upload-complete", _tmp24_);
#line 5792 "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_ = NULL;
	gint _tmp0__length1 = 0;
	gdouble this_file_fraction_complete = 0.0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gdouble fraction_complete = 0.0;
	gint _tmp3_ = 0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	SpitPublishingProgressCallback _tmp7_ = NULL;
	void* _tmp7__target = NULL;
#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 645 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->publishables;
#line 645 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__length1 = self->priv->publishables_length1;
#line 645 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	file_span = 1.0 / _tmp0__length1;
#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = bytes_written_so_far;
#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = total_bytes;
#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	this_file_fraction_complete = ((gdouble) _tmp1_) / _tmp2_;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = self->priv->current_file;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = file_span;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = this_file_fraction_complete;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = file_span;
#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	fraction_complete = (_tmp3_ * _tmp4_) + (_tmp5_ * _tmp6_);
#line 650 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = self->priv->status_updated;
#line 650 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7__target = self->priv->status_updated_target;
#line 650 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp7_ != NULL) {
#line 5841 "RESTSupport.c"
		SpitPublishingProgressCallback _tmp8_ = NULL;
		void* _tmp8__target = NULL;
		gint _tmp9_ = 0;
		gdouble _tmp10_ = 0.0;
#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = self->priv->status_updated;
#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8__target = self->priv->status_updated_target;
#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = self->priv->current_file;
#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp10_ = fraction_complete;
#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ (_tmp9_ + 1, _tmp10_, _tmp8__target);
#line 5856 "RESTSupport.c"
	}
}


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


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


static PublishingRESTSupportTransaction* publishing_rest_support_batch_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* self, SpitPublishingPublishable* publishable) {
#line 662 "/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 662 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 5911 "RESTSupport.c"
}


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


void publishing_rest_support_batch_uploader_upload (PublishingRESTSupportBatchUploader* self, SpitPublishingProgressCallback status_updated, void* status_updated_target) {
	SpitPublishingProgressCallback _tmp0_ = NULL;
	void* _tmp0__target = NULL;
	SpitPublishingPublishable** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self));
#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = status_updated;
#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0__target = status_updated_target;
#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated = _tmp0_;
#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated_target = _tmp0__target;
#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->publishables;
#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1__length1 = self->priv->publishables_length1;
#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1__length1 > 0) {
#line 668 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_send_files (self);
#line 5947 "RESTSupport.c"
	}
}


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


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


static void publishing_rest_support_value_batch_uploader_copy_value (const GValue* src_value, GValue* dest_value) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (src_value->data[0].v_pointer) {
#line 591 "/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 5974 "RESTSupport.c"
	} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 5978 "RESTSupport.c"
	}
}


static gpointer publishing_rest_support_value_batch_uploader_peek_pointer (const GValue* value) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 5986 "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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (collect_values[0].v_pointer) {
#line 5993 "RESTSupport.c"
		PublishingRESTSupportBatchUploader* object;
		object = collect_values[0].v_pointer;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 591 "/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 6000 "RESTSupport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 591 "/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 6004 "RESTSupport.c"
		}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = publishing_rest_support_batch_uploader_ref (object);
#line 6008 "RESTSupport.c"
	} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6012 "RESTSupport.c"
	}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6016 "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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!object_p) {
#line 591 "/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 6027 "RESTSupport.c"
	}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!value->data[0].v_pointer) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = NULL;
#line 6033 "RESTSupport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = value->data[0].v_pointer;
#line 6037 "RESTSupport.c"
	} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		*object_p = publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer);
#line 6041 "RESTSupport.c"
	}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6045 "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 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return G_PARAM_SPEC (spec);
#line 6059 "RESTSupport.c"
}


gpointer publishing_rest_support_value_get_batch_uploader (const GValue* value) {
#line 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return value->data[0].v_pointer;
#line 6068 "RESTSupport.c"
}


void publishing_rest_support_value_set_batch_uploader (GValue* value, gpointer v_object) {
	PublishingRESTSupportBatchUploader* old;
#line 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 591 "/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 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer);
#line 6088 "RESTSupport.c"
	} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6092 "RESTSupport.c"
	}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_unref (old);
#line 6098 "RESTSupport.c"
	}
}


void publishing_rest_support_value_take_batch_uploader (GValue* value, gpointer v_object) {
	PublishingRESTSupportBatchUploader* old;
#line 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	old = value->data[0].v_pointer;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (v_object) {
#line 591 "/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 591 "/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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = v_object;
#line 6117 "RESTSupport.c"
	} else {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		value->data[0].v_pointer = NULL;
#line 6121 "RESTSupport.c"
	}
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (old) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_batch_uploader_unref (old);
#line 6127 "RESTSupport.c"
	}
}


static void publishing_rest_support_batch_uploader_class_init (PublishingRESTSupportBatchUploaderClass * klass) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_batch_uploader_parent_class = g_type_class_peek_parent (klass);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_rest_support_batch_uploader_finalize;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportBatchUploaderPrivate));
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = publishing_rest_support_batch_uploader_real_create_transaction;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	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 6145 "RESTSupport.c"
}


static void publishing_rest_support_batch_uploader_instance_init (PublishingRESTSupportBatchUploader * self) {
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_PRIVATE (self);
#line 592 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->current_file = 0;
#line 593 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables = NULL;
#line 593 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->publishables_length1 = 0;
#line 593 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->_publishables_size_ = self->priv->publishables_length1;
#line 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = NULL;
#line 595 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->status_updated = NULL;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->ref_count = 1;
#line 6166 "RESTSupport.c"
}


static void publishing_rest_support_batch_uploader_finalize (PublishingRESTSupportBatchUploader* obj) {
	PublishingRESTSupportBatchUploader * self;
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_destroy (self);
#line 593 "/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 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 6180 "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 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return instance;
#line 6205 "RESTSupport.c"
}


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


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_ = 0L;
	gunichar _tmp1_ = 0U;
#line 1116 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0U);
#line 1117 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 1117 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
#line 1117 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 1117 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	return result;
#line 6237 "RESTSupport.c"
}


gchar* publishing_rest_support_asciify_string (const gchar* s) {
	gchar* result = NULL;
	gchar* t = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GString* b = NULL;
	GString* _tmp2_ = NULL;
	GString* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (s != NULL, NULL);
#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = s;
#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_utf8_normalize (_tmp0_, (gssize) -1, G_NORMALIZE_DEFAULT);
#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	t = _tmp1_;
#line 678 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_string_new ("");
#line 678 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	b = _tmp2_;
#line 6263 "RESTSupport.c"
	{
		const gchar* u = NULL;
		const gchar* _tmp3_ = NULL;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = t;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		u = _tmp3_;
#line 6271 "RESTSupport.c"
		{
			gboolean _tmp4_ = FALSE;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp4_ = TRUE;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			while (TRUE) {
#line 6278 "RESTSupport.c"
				const gchar* _tmp7_ = NULL;
				gunichar _tmp8_ = 0U;
				gunichar c = 0U;
				const gchar* _tmp9_ = NULL;
				gunichar _tmp10_ = 0U;
				gunichar _tmp11_ = 0U;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!_tmp4_) {
#line 6287 "RESTSupport.c"
					const gchar* _tmp5_ = NULL;
					const gchar* _tmp6_ = NULL;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp5_ = u;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp6_ = g_utf8_next_char (_tmp5_);
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					u = _tmp6_;
#line 6296 "RESTSupport.c"
				}
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp4_ = FALSE;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp7_ = u;
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp8_ = string_get_char (_tmp7_, (glong) 0);
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (!(_tmp8_ != ((gunichar) 0))) {
#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					break;
#line 6308 "RESTSupport.c"
				}
#line 680 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp9_ = u;
#line 680 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp10_ = string_get_char (_tmp9_, (glong) 0);
#line 680 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				c = _tmp10_;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				_tmp11_ = c;
#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
				if (((gint) _tmp11_) < 128) {
#line 6320 "RESTSupport.c"
					GString* _tmp12_ = NULL;
					gunichar _tmp13_ = 0U;
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp12_ = b;
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					_tmp13_ = c;
#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
					g_string_append_unichar (_tmp12_, _tmp13_);
#line 6329 "RESTSupport.c"
				}
			}
		}
	}
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp14_ = b;
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = _tmp14_->str;
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp16_;
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_string_free0 (b);
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (t);
#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 6348 "RESTSupport.c"
}


static gchar* publishing_rest_support_google_session_real_get_user_name (PublishingRESTSupportGoogleSession* self) {
#line 689 "/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 689 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6357 "RESTSupport.c"
}


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


static gchar* publishing_rest_support_google_session_real_get_access_token (PublishingRESTSupportGoogleSession* self) {
#line 690 "/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 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return NULL;
#line 6375 "RESTSupport.c"
}


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


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


gchar* publishing_rest_support_google_session_get_refresh_token (PublishingRESTSupportGoogleSession* self) {
#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self), NULL);
#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->get_refresh_token (self);
#line 6402 "RESTSupport.c"
}


static void publishing_rest_support_google_session_real_deauthenticate (PublishingRESTSupportGoogleSession* self) {
#line 692 "/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 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 6411 "RESTSupport.c"
}


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


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


static void publishing_rest_support_google_session_class_init (PublishingRESTSupportGoogleSessionClass * klass) {
#line 688 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_session_parent_class = g_type_class_peek_parent (klass);
#line 688 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = publishing_rest_support_google_session_real_get_user_name;
#line 688 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = publishing_rest_support_google_session_real_get_access_token;
#line 688 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_refresh_token = publishing_rest_support_google_session_real_get_refresh_token;
#line 688 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = publishing_rest_support_google_session_real_deauthenticate;
#line 6445 "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;
}


PublishingRESTSupportGooglePublisher* publishing_rest_support_google_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host, const gchar* scope) {
	PublishingRESTSupportGooglePublisher * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp2_ = NULL;
	SpitPublishingService* _tmp3_ = NULL;
	SpitPublishingPluginHost* _tmp4_ = NULL;
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (scope != NULL, NULL);
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisher*) g_object_new (object_type, NULL);
#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = scope;
#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->scope);
#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->scope = _tmp1_;
#line 873 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_google_publisher_google_session_impl_new ();
#line 873 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 873 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->session = _tmp2_;
#line 874 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = service;
#line 874 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->service = _tmp3_;
#line 875 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = host;
#line 875 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->host = _tmp4_;
#line 876 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->web_auth_pane);
#line 876 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->web_auth_pane = NULL;
#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 6508 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_web_auth_pane_authorized_publishing_rest_support_google_publisher_web_authentication_pane_authorized (PublishingRESTSupportGooglePublisherWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self) {
#line 880 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_web_auth_pane_authorized ((PublishingRESTSupportGooglePublisher*) self, auth_code);
#line 6515 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_web_auth_pane_authorized (PublishingRESTSupportGooglePublisher* self, const gchar* auth_code) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_ = NULL;
#line 879 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 879 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (auth_code != NULL);
#line 880 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->web_auth_pane;
#line 880 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("authorized", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, &_tmp1_, NULL, FALSE);
#line 880 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_web_auth_pane_authorized_publishing_rest_support_google_publisher_web_authentication_pane_authorized, self);
#line 882 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->scope;
#line 882 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = auth_code;
#line 882 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:882: EVENT: user authorized scope %s with auth_code %" \
"s", _tmp2_, _tmp3_);
#line 884 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 884 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 885 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6548 "RESTSupport.c"
	}
#line 887 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = auth_code;
#line 887 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_do_get_access_tokens (self, _tmp5_);
#line 6554 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 891 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_get_access_tokens_complete ((PublishingRESTSupportGooglePublisher*) self, _sender);
#line 6561 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 892 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_get_access_tokens_error ((PublishingRESTSupportGooglePublisher*) self, _sender, err);
#line 6568 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_get_access_tokens_complete (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	PublishingRESTSupportTransaction* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
#line 890 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 890 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 891 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 891 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 891 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self);
#line 892 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 892 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 892 "/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_google_publisher_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self);
#line 894 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:894: %s", "EVENT: network transaction to exchange authorization code for access t" \
"okens " "completed successfully.");
#line 897 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 897 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 898 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6605 "RESTSupport.c"
	}
#line 900 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = txn;
#line 900 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_);
#line 900 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _tmp6_;
#line 900 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_do_extract_tokens (self, _tmp7_);
#line 900 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp7_);
#line 6617 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_get_access_tokens_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	PublishingRESTSupportTransaction* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	SpitPublishingPluginHost* _tmp8_ = NULL;
	GError* _tmp9_ = NULL;
#line 903 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 903 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 905 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 905 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 905 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self);
#line 906 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 906 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 906 "/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_google_publisher_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self);
#line 908 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = txn;
#line 908 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
#line 908 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = _tmp5_;
#line 908 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("EVENT: network transaction to exchange authorization code for access t" \
"okens " "failed; response = '%s'", _tmp6_);
#line 908 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp6_);
#line 911 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = publishing_rest_support_google_publisher_is_running (self);
#line 911 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp7_) {
#line 912 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6664 "RESTSupport.c"
	}
#line 914 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->host;
#line 914 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = err;
#line 914 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_post_error (_tmp8_, _tmp9_);
#line 6672 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 919 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed ((PublishingRESTSupportGooglePublisher*) self, _sender);
#line 6679 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 920 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error ((PublishingRESTSupportGooglePublisher*) self, _sender, err);
#line 6686 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	PublishingRESTSupportTransaction* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
#line 917 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 917 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 919 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 919 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 919 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 920 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 920 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 920 "/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_google_publisher_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 922 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:922: EVENT: refresh access token transaction complete" \
"d successfully.");
#line 924 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 924 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 925 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6725 "RESTSupport.c"
	}
#line 927 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = self->priv->session;
#line 927 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 927 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp6_) {
#line 928 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6735 "RESTSupport.c"
	}
#line 930 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = txn;
#line 930 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_);
#line 930 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = _tmp8_;
#line 930 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_do_extract_tokens (self, _tmp9_);
#line 930 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp9_);
#line 6747 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	PublishingRESTSupportTransaction* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
	SpitPublishingPluginHost* _tmp9_ = NULL;
	GError* _tmp10_ = NULL;
#line 933 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 933 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 935 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 935 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 935 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 936 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 936 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 936 "/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_google_publisher_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 938 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:938: EVENT: refresh access token transaction caused a" \
" network error.");
#line 940 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 940 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 941 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6787 "RESTSupport.c"
	}
#line 943 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = self->priv->session;
#line 943 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 943 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp6_) {
#line 944 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6797 "RESTSupport.c"
	}
#line 948 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = txn;
#line 948 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = publishing_rest_support_transaction_get_status_code (_tmp7_);
#line 948 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp8_ == ((guint) 400)) {
#line 949 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_google_publisher_do_logout (self);
#line 950 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6809 "RESTSupport.c"
	}
#line 953 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = self->priv->host;
#line 953 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = err;
#line 953 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_post_error (_tmp9_, _tmp10_);
#line 6817 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_refresh_token_available (PublishingRESTSupportGooglePublisher* self, const gchar* token) {
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 956 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 956 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (token != NULL);
#line 957 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = token;
#line 957 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:957: EVENT: an OAuth refresh token has become availab" \
"le; token = '%s'.", _tmp0_);
#line 959 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_google_publisher_is_running (self);
#line 959 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp1_) {
#line 960 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6841 "RESTSupport.c"
	}
#line 962 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->session;
#line 962 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = token;
#line 962 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 962 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp2_->refresh_token);
#line 962 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_->refresh_token = _tmp4_;
#line 6853 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_access_token_available (PublishingRESTSupportGooglePublisher* self, const gchar* token) {
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 965 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 965 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (token != NULL);
#line 966 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = token;
#line 966 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:966: EVENT: an OAuth access token has become availabl" \
"e; token = '%s'.", _tmp0_);
#line 968 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = publishing_rest_support_google_publisher_is_running (self);
#line 968 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp1_) {
#line 969 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6877 "RESTSupport.c"
	}
#line 971 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->session;
#line 971 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = token;
#line 971 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 971 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp2_->access_token);
#line 971 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_->access_token = _tmp4_;
#line 973 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_do_fetch_username (self);
#line 6891 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 977 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_fetch_username_transaction_completed ((PublishingRESTSupportGooglePublisher*) self, _sender);
#line 6898 "RESTSupport.c"
}


static void _publishing_rest_support_google_publisher_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 978 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_fetch_username_transaction_error ((PublishingRESTSupportGooglePublisher*) self, _sender, err);
#line 6905 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_fetch_username_transaction_completed (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	PublishingRESTSupportTransaction* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
#line 976 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 976 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 977 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 977 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 977 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 978 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 978 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 978 "/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_google_publisher_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 980 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:980: EVENT: username fetch transaction completed succ" \
"essfully.");
#line 982 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 982 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 983 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6942 "RESTSupport.c"
	}
#line 985 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = txn;
#line 985 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_);
#line 985 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _tmp6_;
#line 985 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_do_extract_username (self, _tmp7_);
#line 985 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp7_);
#line 6954 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_on_fetch_username_transaction_error (PublishingRESTSupportGooglePublisher* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	SpitPublishingPluginHost* _tmp5_ = NULL;
	GError* _tmp6_ = NULL;
#line 988 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 988 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 990 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = txn;
#line 990 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 990 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_rest_support_google_publisher_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 991 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = txn;
#line 991 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 991 "/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_google_publisher_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 993 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:993: EVENT: username fetch transaction caused a netwo" \
"rk error");
#line 995 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_google_publisher_is_running (self);
#line 995 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp4_) {
#line 996 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 6990 "RESTSupport.c"
	}
#line 998 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = self->priv->host;
#line 998 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = err;
#line 998 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_);
#line 6998 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_get_access_tokens (PublishingRESTSupportGooglePublisher* self, const gchar* auth_code) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* tokens_txn = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 1001 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1001 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (auth_code != NULL);
#line 1002 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1002: ACTION: exchanging authorization code for acces" \
"s & refresh tokens");
#line 1004 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->host;
#line 1004 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 1006 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->session;
#line 1006 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = auth_code;
#line 1006 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = publishing_rest_support_google_publisher_get_access_tokens_transaction_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp2_);
#line 1006 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	tokens_txn = _tmp3_;
#line 1007 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_rest_support_google_publisher_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self, 0);
#line 1008 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_rest_support_google_publisher_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self, 0);
#line 7031 "RESTSupport.c"
	{
#line 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 7039 "RESTSupport.c"
				goto __catch4_spit_publishing_publishing_error;
			}
#line 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 1011 "/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 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 1011 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 7050 "RESTSupport.c"
		}
	}
	goto __finally4;
	__catch4_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 1013 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = self->priv->host;
#line 1013 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = err;
#line 1013 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 7071 "RESTSupport.c"
	}
	__finally4:
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 1010 "/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 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 1010 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7084 "RESTSupport.c"
	}
#line 1001 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 7088 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_hosted_web_authentication (PublishingRESTSupportGooglePublisher* self) {
	gchar* user_authorization_url = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	gchar* _tmp26_ = NULL;
	PublishingRESTSupportGooglePublisherWebAuthenticationPane* _tmp27_ = NULL;
	PublishingRESTSupportGooglePublisherWebAuthenticationPane* _tmp28_ = NULL;
	SpitPublishingPluginHost* _tmp29_ = NULL;
	PublishingRESTSupportGooglePublisherWebAuthenticationPane* _tmp30_ = NULL;
#line 1017 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1018 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1018: ACTION: running OAuth authentication flow in ho" \
"sted web pane.");
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = soup_uri_encode ("urn:ietf:wg:oauth:2.0:oob", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _tmp0_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strconcat ("https://accounts.google.com/o/oauth2/auth?" "response_type=code&" "client_id=" PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_ID "&" "redirect_uri=", _tmp1_, NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = g_strconcat (_tmp3_, "&", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = _tmp4_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = g_strconcat (_tmp5_, "scope=", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _tmp6_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->scope;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = soup_uri_encode (_tmp8_, NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = _tmp9_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = g_strconcat (_tmp7_, _tmp10_, NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = _tmp11_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = g_strconcat (_tmp12_, "+", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp14_ = _tmp13_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = soup_uri_encode ("https://www.googleapis.com/auth/userinfo.profile", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = _tmp15_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp17_ = g_strconcat (_tmp14_, _tmp16_, NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp18_ = _tmp17_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp19_ = g_strconcat (_tmp18_, "&", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp20_ = _tmp19_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp21_ = g_strconcat (_tmp20_, "state=connect&", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = _tmp21_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = g_strconcat (_tmp22_, "access_type=offline&", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = _tmp23_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp25_ = g_strconcat (_tmp24_, "approval_prompt=force", NULL);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp26_ = _tmp25_;
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp24_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp22_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp20_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp18_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp16_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp14_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp12_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp10_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp7_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp5_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp3_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp1_);
#line 1020 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	user_authorization_url = _tmp26_;
#line 1030 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp27_ = publishing_rest_support_google_publisher_web_authentication_pane_new (user_authorization_url);
#line 1030 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->web_auth_pane);
#line 1030 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->web_auth_pane = _tmp27_;
#line 1031 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp28_ = self->priv->web_auth_pane;
#line 1031 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (_tmp28_, "authorized", (GCallback) _publishing_rest_support_google_publisher_on_web_auth_pane_authorized_publishing_rest_support_google_publisher_web_authentication_pane_authorized, self, 0);
#line 1033 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp29_ = self->priv->host;
#line 1033 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp30_ = self->priv->web_auth_pane;
#line 1033 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_install_dialog_pane (_tmp29_, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
#line 1017 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (user_authorization_url);
#line 7227 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_exchange_refresh_token_for_access_token (PublishingRESTSupportGooglePublisher* self) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* txn = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp1_ = NULL;
	PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 1037 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1038 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1038: ACTION: exchanging OAuth refresh token for OAut" \
"h access token.");
#line 1040 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->host;
#line 1040 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 1042 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->session;
#line 1042 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_google_publisher_refresh_access_token_transaction_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 1042 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	txn = _tmp2_;
#line 1044 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self, 0);
#line 1045 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_rest_support_google_publisher_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self, 0);
#line 7255 "RESTSupport.c"
	{
#line 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 7263 "RESTSupport.c"
				goto __catch5_spit_publishing_publishing_error;
			}
#line 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_publishing_rest_support_transaction_unref0 (txn);
#line 1048 "/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 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			g_clear_error (&_inner_error_);
#line 1048 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 7274 "RESTSupport.c"
		}
	}
	goto __finally5;
	__catch5_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 1050 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = self->priv->host;
#line 1050 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = err;
#line 1050 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp4_);
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 7295 "RESTSupport.c"
	}
	__finally5:
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_publishing_rest_support_transaction_unref0 (txn);
#line 1047 "/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 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 1047 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7308 "RESTSupport.c"
	}
#line 1037 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 7312 "RESTSupport.c"
}


static gpointer _json_object_ref0 (gpointer self) {
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self ? json_object_ref (self) : NULL;
#line 7319 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_extract_tokens (PublishingRESTSupportGooglePublisher* self, const gchar* response_body) {
	JsonParser* parser = NULL;
	JsonParser* _tmp0_ = NULL;
	JsonObject* response_obj = NULL;
	JsonParser* _tmp10_ = NULL;
	JsonNode* _tmp11_ = NULL;
	JsonObject* _tmp12_ = NULL;
	JsonObject* _tmp13_ = NULL;
	gboolean _tmp14_ = FALSE;
	JsonObject* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	JsonObject* _tmp22_ = NULL;
	gboolean _tmp23_ = FALSE;
	JsonObject* _tmp29_ = NULL;
	gboolean _tmp30_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1054 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1054 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (response_body != NULL);
#line 1055 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1055: ACTION: extracting OAuth tokens from body of se" \
"rver response");
#line 1057 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = json_parser_new ();
#line 1057 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	parser = _tmp0_;
#line 7349 "RESTSupport.c"
	{
		JsonParser* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
#line 1060 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = parser;
#line 1060 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = response_body;
#line 1060 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_);
#line 1060 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7361 "RESTSupport.c"
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
#line 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = self->priv->host;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = err;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = _tmp4_->message;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = g_strconcat ("Couldn't parse JSON response: ", _tmp5_, NULL);
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = _tmp6_;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp7_);
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = _tmp8_;
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp9_);
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (_tmp9_);
#line 1062 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp7_);
#line 1064 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 1064 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (parser);
#line 1064 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7406 "RESTSupport.c"
	}
	__finally6:
#line 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (parser);
#line 1059 "/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 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 1059 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7419 "RESTSupport.c"
	}
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = parser;
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = json_parser_get_root (_tmp10_);
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = json_node_get_object (_tmp11_);
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = _json_object_ref0 (_tmp12_);
#line 1067 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	response_obj = _tmp13_;
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = response_obj;
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp16_ = json_object_has_member (_tmp15_, "access_token");
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (!_tmp16_) {
#line 7437 "RESTSupport.c"
		JsonObject* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp17_ = response_obj;
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = json_object_has_member (_tmp17_, "refresh_token");
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = !_tmp18_;
#line 7446 "RESTSupport.c"
	} else {
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = FALSE;
#line 7450 "RESTSupport.c"
	}
#line 1069 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp14_) {
#line 7454 "RESTSupport.c"
		SpitPublishingPluginHost* _tmp19_ = NULL;
		GError* _tmp20_ = NULL;
		GError* _tmp21_ = NULL;
#line 1070 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = self->priv->host;
#line 1070 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp20_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "neither access_token nor refresh_token not present in server response");
#line 1070 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp21_ = _tmp20_;
#line 1070 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp19_, _tmp21_);
#line 1070 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (_tmp21_);
#line 1072 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_json_object_unref0 (response_obj);
#line 1072 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (parser);
#line 1072 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7474 "RESTSupport.c"
	}
#line 1075 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp22_ = response_obj;
#line 1075 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = json_object_has_member (_tmp22_, "refresh_token");
#line 1075 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp23_) {
#line 7482 "RESTSupport.c"
		gchar* refresh_token = NULL;
		JsonObject* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		gchar* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
#line 1076 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp24_ = response_obj;
#line 1076 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp25_ = json_object_get_string_member (_tmp24_, "refresh_token");
#line 1076 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp26_ = g_strdup (_tmp25_);
#line 1076 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		refresh_token = _tmp26_;
#line 1078 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp27_ = refresh_token;
#line 1078 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (_tmp27_, "") != 0) {
#line 7500 "RESTSupport.c"
			const gchar* _tmp28_ = NULL;
#line 1079 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp28_ = refresh_token;
#line 1079 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishing_rest_support_google_publisher_on_refresh_token_available (self, _tmp28_);
#line 7506 "RESTSupport.c"
		}
#line 1075 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (refresh_token);
#line 7510 "RESTSupport.c"
	}
#line 1082 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp29_ = response_obj;
#line 1082 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp30_ = json_object_has_member (_tmp29_, "access_token");
#line 1082 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp30_) {
#line 7518 "RESTSupport.c"
		gchar* access_token = NULL;
		JsonObject* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
		const gchar* _tmp34_ = NULL;
#line 1083 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp31_ = response_obj;
#line 1083 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp32_ = json_object_get_string_member (_tmp31_, "access_token");
#line 1083 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp33_ = g_strdup (_tmp32_);
#line 1083 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		access_token = _tmp33_;
#line 1085 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp34_ = access_token;
#line 1085 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (_tmp34_, "") != 0) {
#line 7536 "RESTSupport.c"
			const gchar* _tmp35_ = NULL;
#line 1086 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp35_ = access_token;
#line 1086 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishing_rest_support_google_publisher_on_access_token_available (self, _tmp35_);
#line 7542 "RESTSupport.c"
		}
#line 1082 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (access_token);
#line 7546 "RESTSupport.c"
	}
#line 1054 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_json_object_unref0 (response_obj);
#line 1054 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (parser);
#line 7552 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_fetch_username (PublishingRESTSupportGooglePublisher* self) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	SpitPublishingPluginHost* _tmp1_ = NULL;
	PublishingRESTSupportGooglePublisherUsernameFetchTransaction* txn = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp2_ = NULL;
	PublishingRESTSupportGooglePublisherUsernameFetchTransaction* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 1090 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1091 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1091: ACTION: running network transaction to fetch us" \
"ername.");
#line 1093 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->host;
#line 1093 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 1094 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->host;
#line 1094 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE);
#line 1096 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = self->priv->session;
#line 1096 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = publishing_rest_support_google_publisher_username_fetch_transaction_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession));
#line 1096 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	txn = _tmp3_;
#line 1097 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_rest_support_google_publisher_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self, 0);
#line 1098 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_rest_support_google_publisher_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self, 0);
#line 7585 "RESTSupport.c"
	{
#line 1101 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 1101 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7591 "RESTSupport.c"
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 1103 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = self->priv->host;
#line 1103 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = err;
#line 1103 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 7613 "RESTSupport.c"
	}
	__finally7:
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_publishing_rest_support_transaction_unref0 (txn);
#line 1100 "/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 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 1100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7626 "RESTSupport.c"
	}
#line 1090 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 7630 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_do_extract_username (PublishingRESTSupportGooglePublisher* self, const gchar* response_body) {
	JsonParser* parser = NULL;
	JsonParser* _tmp0_ = NULL;
	JsonObject* response_obj = NULL;
	JsonParser* _tmp10_ = NULL;
	JsonNode* _tmp11_ = NULL;
	JsonObject* _tmp12_ = NULL;
	JsonObject* _tmp13_ = NULL;
	JsonObject* _tmp14_ = NULL;
	gboolean _tmp15_ = FALSE;
	JsonObject* _tmp23_ = NULL;
	gboolean _tmp24_ = FALSE;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp32_ = NULL;
	gboolean _tmp33_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (response_body != NULL);
#line 1108 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_debug ("RESTSupport.vala:1108: ACTION: extracting username from body of server" \
" response");
#line 1110 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = json_parser_new ();
#line 1110 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	parser = _tmp0_;
#line 7659 "RESTSupport.c"
	{
		JsonParser* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
#line 1113 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp1_ = parser;
#line 1113 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = response_body;
#line 1113 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_);
#line 1113 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7671 "RESTSupport.c"
			goto __catch8_g_error;
		}
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
#line 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		err = _inner_error_;
#line 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_inner_error_ = NULL;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = self->priv->host;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = err;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = _tmp4_->message;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = g_strconcat ("Couldn't parse JSON response: ", _tmp5_, NULL);
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp7_ = _tmp6_;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp7_);
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = _tmp8_;
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp9_);
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (_tmp9_);
#line 1115 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp7_);
#line 1117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_error_free0 (err);
#line 1117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (parser);
#line 1117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7716 "RESTSupport.c"
	}
	__finally8:
#line 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_object_unref0 (parser);
#line 1112 "/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 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_clear_error (&_inner_error_);
#line 1112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		return;
#line 7729 "RESTSupport.c"
	}
#line 1120 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp10_ = parser;
#line 1120 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp11_ = json_parser_get_root (_tmp10_);
#line 1120 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp12_ = json_node_get_object (_tmp11_);
#line 1120 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp13_ = _json_object_ref0 (_tmp12_);
#line 1120 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	response_obj = _tmp13_;
#line 1122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp14_ = response_obj;
#line 1122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp15_ = json_object_has_member (_tmp14_, "name");
#line 1122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp15_) {
#line 7747 "RESTSupport.c"
		gchar* username = NULL;
		JsonObject* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
#line 1123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp16_ = response_obj;
#line 1123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp17_ = json_object_get_string_member (_tmp16_, "name");
#line 1123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp18_ = g_strdup (_tmp17_);
#line 1123 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		username = _tmp18_;
#line 1125 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp19_ = username;
#line 1125 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (_tmp19_, "") != 0) {
#line 7765 "RESTSupport.c"
			PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp20_ = NULL;
			const gchar* _tmp21_ = NULL;
			gchar* _tmp22_ = NULL;
#line 1126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp20_ = self->priv->session;
#line 1126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp21_ = username;
#line 1126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp22_ = g_strdup (_tmp21_);
#line 1126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp20_->user_name);
#line 1126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp20_->user_name = _tmp22_;
#line 7779 "RESTSupport.c"
		}
#line 1122 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (username);
#line 7783 "RESTSupport.c"
	}
#line 1129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp23_ = response_obj;
#line 1129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp24_ = json_object_has_member (_tmp23_, "access_token");
#line 1129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp24_) {
#line 7791 "RESTSupport.c"
		gchar* access_token = NULL;
		JsonObject* _tmp25_ = NULL;
		const gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
#line 1130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp25_ = response_obj;
#line 1130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp26_ = json_object_get_string_member (_tmp25_, "access_token");
#line 1130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp27_ = g_strdup (_tmp26_);
#line 1130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		access_token = _tmp27_;
#line 1132 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp28_ = access_token;
#line 1132 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (g_strcmp0 (_tmp28_, "") != 0) {
#line 7809 "RESTSupport.c"
			PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp29_ = NULL;
			const gchar* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
#line 1133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp29_ = self->priv->session;
#line 1133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp30_ = access_token;
#line 1133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp31_ = g_strdup (_tmp30_);
#line 1133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (_tmp29_->access_token);
#line 1133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp29_->access_token = _tmp31_;
#line 7823 "RESTSupport.c"
		}
#line 1129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (access_token);
#line 7827 "RESTSupport.c"
	}
#line 1138 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp32_ = self->priv->session;
#line 1138 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp33_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 1138 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp33_, "session.is_authenticated()");
#line 1140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_on_login_flow_complete (self);
#line 1107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_json_object_unref0 (response_obj);
#line 1107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (parser);
#line 7841 "RESTSupport.c"
}


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


PublishingRESTSupportGoogleSession* publishing_rest_support_google_publisher_get_session (PublishingRESTSupportGooglePublisher* self) {
	PublishingRESTSupportGoogleSession* result = NULL;
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp0_ = NULL;
	PublishingRESTSupportGoogleSession* _tmp1_ = NULL;
#line 1147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL);
#line 1148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->session;
#line 1148 "/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 1148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 1148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 7874 "RESTSupport.c"
}


void publishing_rest_support_google_publisher_start_oauth_flow (PublishingRESTSupportGooglePublisher* self, const gchar* refresh_token) {
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
#line 1151 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self));
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = refresh_token;
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp1_ != NULL) {
#line 7887 "RESTSupport.c"
		const gchar* _tmp2_ = NULL;
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp2_ = refresh_token;
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
#line 7893 "RESTSupport.c"
	} else {
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp0_ = FALSE;
#line 7897 "RESTSupport.c"
	}
#line 1152 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp0_) {
#line 7901 "RESTSupport.c"
		PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 1153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_ = self->priv->session;
#line 1153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp4_ = refresh_token;
#line 1153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp5_ = g_strdup (_tmp4_);
#line 1153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (_tmp3_->refresh_token);
#line 1153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp3_->refresh_token = _tmp5_;
#line 1154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_google_publisher_do_exchange_refresh_token_for_access_token (self);
#line 7917 "RESTSupport.c"
	} else {
		gboolean _tmp6_ = FALSE;
#line 1156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp6_ = publishing_rest_support_google_publisher_web_authentication_pane_is_cache_dirty ();
#line 1156 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp6_) {
#line 7924 "RESTSupport.c"
			SpitPublishingPluginHost* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
#line 1157 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp7_ = self->priv->host;
#line 1157 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_tmp8_ = _ ("You have already logged in and out of a Google service during this Sho" \
"twell session.\n" \
"\n" \
"To continue publishing to Google services, quit and restart Shotwell, " \
"then try publishing again.");
#line 1157 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			spit_publishing_plugin_host_install_static_message_pane (_tmp7_, _tmp8_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
#line 1158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 7935 "RESTSupport.c"
		}
#line 1161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_google_publisher_do_hosted_web_authentication (self);
#line 7939 "RESTSupport.c"
	}
}


static void publishing_rest_support_google_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self) {
#line 1165 "/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 1165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7949 "RESTSupport.c"
}


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


static void publishing_rest_support_google_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* self) {
#line 1167 "/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 1167 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 7967 "RESTSupport.c"
}


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


static gboolean publishing_rest_support_google_publisher_real_is_running (PublishingRESTSupportGooglePublisher* self) {
#line 1169 "/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 1169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return FALSE;
#line 7985 "RESTSupport.c"
}


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


static void publishing_rest_support_google_publisher_real_start (PublishingRESTSupportGooglePublisher* self) {
#line 1171 "/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 1171 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 8003 "RESTSupport.c"
}


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


static void publishing_rest_support_google_publisher_real_stop (PublishingRESTSupportGooglePublisher* self) {
#line 1173 "/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 1173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 8021 "RESTSupport.c"
}


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


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


static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_construct (GType object_type) {
	PublishingRESTSupportGooglePublisherGoogleSessionImpl* self = NULL;
#line 704 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherGoogleSessionImpl*) publishing_rest_support_google_session_construct (object_type);
#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->access_token = NULL;
#line 706 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 706 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->user_name = NULL;
#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->refresh_token = NULL;
#line 704 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 8071 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_new (void) {
#line 704 "/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 8078 "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_ = NULL;
#line 710 "/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 711 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->access_token;
#line 711 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_ != NULL;
#line 711 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8094 "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_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 714 "/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 715 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->user_name;
#line 715 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_ != NULL, "user_name != null");
#line 716 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->user_name;
#line 716 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 716 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 716 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8118 "RESTSupport.c"
}


static gchar* publishing_rest_support_google_publisher_google_session_impl_real_get_access_token (PublishingRESTSupportGoogleSession* base) {
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 719 "/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 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_, "is_authenticated()");
#line 721 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->access_token;
#line 721 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 721 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 721 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8142 "RESTSupport.c"
}


static gchar* publishing_rest_support_google_publisher_google_session_impl_real_get_refresh_token (PublishingRESTSupportGoogleSession* base) {
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 724 "/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 725 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->refresh_token;
#line 725 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp0_ != NULL, "refresh_token != null");
#line 726 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->refresh_token;
#line 726 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 726 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp2_;
#line 726 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8166 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate (PublishingRESTSupportGoogleSession* base) {
	PublishingRESTSupportGooglePublisherGoogleSessionImpl * self;
#line 729 "/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 730 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 730 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->access_token = NULL;
#line 731 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 731 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->user_name = NULL;
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->refresh_token = NULL;
#line 8186 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_google_session_impl_class_init (PublishingRESTSupportGooglePublisherGoogleSessionImplClass * klass) {
#line 699 "/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 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_rest_support_google_publisher_google_session_impl_finalize;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportSessionClass *) klass)->is_authenticated = publishing_rest_support_google_publisher_google_session_impl_real_is_authenticated;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = publishing_rest_support_google_publisher_google_session_impl_real_get_user_name;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = publishing_rest_support_google_publisher_google_session_impl_real_get_access_token;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->get_refresh_token = publishing_rest_support_google_publisher_google_session_impl_real_get_refresh_token;
#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate;
#line 8205 "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 699 "/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 700 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->access_token);
#line 701 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->user_name);
#line 702 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->refresh_token);
#line 699 "/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 8225 "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 void _publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self) {
#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed ((PublishingRESTSupportGooglePublisherWebAuthenticationPane*) self, load_event);
#line 8244 "RESTSupport.c"
}


static gboolean __lambda4_ (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self) {
	gboolean result = FALSE;
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = FALSE;
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8254 "RESTSupport.c"
}


static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self) {
	gboolean result;
	result = __lambda4_ ((PublishingRESTSupportGooglePublisherWebAuthenticationPane*) self);
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8263 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherWebAuthenticationPane* publishing_rest_support_google_publisher_web_authentication_pane_construct (GType object_type, const gchar* auth_sequence_start_url) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GtkBox* _tmp2_ = NULL;
	WebKitWebView* _tmp3_ = NULL;
	WebKitWebView* _tmp4_ = NULL;
	WebKitSettings* _tmp5_ = NULL;
	WebKitWebView* _tmp6_ = NULL;
	WebKitWebView* _tmp7_ = NULL;
	GtkBox* _tmp8_ = NULL;
	WebKitWebView* _tmp9_ = NULL;
#line 745 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (auth_sequence_start_url != NULL, NULL);
#line 745 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherWebAuthenticationPane*) g_object_new (object_type, NULL);
#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = auth_sequence_start_url;
#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->auth_sequence_start_url);
#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->auth_sequence_start_url = _tmp1_;
#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_ref_sink (_tmp2_);
#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->pane_widget);
#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->pane_widget = _tmp2_;
#line 750 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = (WebKitWebView*) webkit_web_view_new ();
#line 750 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_object_ref_sink (_tmp3_);
#line 750 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->webview);
#line 750 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv->webview = _tmp3_;
#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->webview;
#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = webkit_web_view_get_settings (_tmp4_);
#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	webkit_settings_set_enable_plugins (_tmp5_, FALSE);
#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = self->priv->webview;
#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (_tmp6_, "load-changed", (GCallback) _publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed, self, 0);
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = self->priv->webview;
#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_connect_object (_tmp7_, "context-menu", (GCallback) ___lambda4__webkit_web_view_context_menu, self, 0);
#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = self->priv->pane_widget;
#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = self->priv->webview;
#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	gtk_box_pack_start (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
#line 745 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 8329 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherWebAuthenticationPane* publishing_rest_support_google_publisher_web_authentication_pane_new (const gchar* auth_sequence_start_url) {
#line 745 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_web_authentication_pane_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, auth_sequence_start_url);
#line 8336 "RESTSupport.c"
}


static gboolean publishing_rest_support_google_publisher_web_authentication_pane_is_cache_dirty (void) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 760 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = publishing_rest_support_google_publisher_web_authentication_pane_cache_dirty;
#line 760 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp0_;
#line 760 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8349 "RESTSupport.c"
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 987 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 987 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 990 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 990 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 8376 "RESTSupport.c"
		gchar* _tmp4_ = NULL;
#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		return result;
#line 8384 "RESTSupport.c"
	} else {
#line 993 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		result = -1;
#line 993 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		return result;
#line 8390 "RESTSupport.c"
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 8414 "RESTSupport.c"
		glong _tmp4_ = 0L;
#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		return result;
#line 8422 "RESTSupport.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		return result;
#line 8434 "RESTSupport.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1306 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 8458 "RESTSupport.c"
		glong _tmp2_ = 0L;
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 8464 "RESTSupport.c"
	} else {
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 8468 "RESTSupport.c"
	}
#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 8472 "RESTSupport.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 8484 "RESTSupport.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 8494 "RESTSupport.c"
	}
#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 8500 "RESTSupport.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 8514 "RESTSupport.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 8524 "RESTSupport.c"
	}
#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 8530 "RESTSupport.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 8539 "RESTSupport.c"
	}
#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
	return result;
#line 8559 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_on_page_load (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self) {
	GtkBox* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkCursor* _tmp2_ = NULL;
	GdkCursor* _tmp3_ = NULL;
	gchar* page_title = NULL;
	WebKitWebView* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gint _tmp8_ = 0;
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_WEB_AUTHENTICATION_PANE (self));
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->pane_widget;
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = gdk_cursor_new (GDK_LEFT_PTR);
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	gdk_window_set_cursor (_tmp1_, _tmp3_);
#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_tmp3_);
#line 766 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = self->priv->webview;
#line 766 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = webkit_web_view_get_title (_tmp4_);
#line 766 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 766 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	page_title = _tmp6_;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = page_title;
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = string_index_of (_tmp7_, "state=connect", 0);
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	if (_tmp8_ > 0) {
#line 8602 "RESTSupport.c"
		gint auth_code_field_start = 0;
		const gchar* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		gchar* auth_code = NULL;
		const gchar* _tmp12_ = NULL;
		gint _tmp13_ = 0;
		gchar* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp9_ = page_title;
#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp10_ = string_index_of (_tmp9_, "code=", 0);
#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		auth_code_field_start = _tmp10_;
#line 769 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp11_ = auth_code_field_start;
#line 769 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		if (_tmp11_ < 0) {
#line 770 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			_g_free0 (page_title);
#line 770 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			return;
#line 8626 "RESTSupport.c"
		}
#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp12_ = page_title;
#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp13_ = auth_code_field_start;
#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp14_ = string_substring (_tmp12_, (glong) (_tmp13_ + 5), (glong) -1);
#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		auth_code = _tmp14_;
#line 775 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		publishing_rest_support_google_publisher_web_authentication_pane_cache_dirty = TRUE;
#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_tmp15_ = auth_code;
#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		g_signal_emit_by_name (self, "authorized", _tmp15_);
#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		_g_free0 (auth_code);
#line 8644 "RESTSupport.c"
	}
#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (page_title);
#line 8648 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_on_load_started (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self) {
	GtkBox* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkCursor* _tmp2_ = NULL;
	GdkCursor* _tmp3_ = NULL;
#line 781 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_WEB_AUTHENTICATION_PANE (self));
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->pane_widget;
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = gdk_cursor_new (GDK_WATCH);
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	gdk_window_set_cursor (_tmp1_, _tmp3_);
#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (_tmp3_);
#line 8671 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_on_page_load_changed (PublishingRESTSupportGooglePublisherWebAuthenticationPane* self, WebKitLoadEvent load_event) {
	WebKitLoadEvent _tmp0_ = 0;
#line 785 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_IS_WEB_AUTHENTICATION_PANE (self));
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = load_event;
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	switch (_tmp0_) {
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case WEBKIT_LOAD_STARTED:
#line 8685 "RESTSupport.c"
		{
#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishing_rest_support_google_publisher_web_authentication_pane_on_load_started (self);
#line 789 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 8691 "RESTSupport.c"
		}
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		case WEBKIT_LOAD_FINISHED:
#line 8695 "RESTSupport.c"
		{
#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			publishing_rest_support_google_publisher_web_authentication_pane_on_page_load (self);
#line 792 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
			break;
#line 8701 "RESTSupport.c"
		}
		default:
#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
		break;
#line 8706 "RESTSupport.c"
	}
#line 795 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return;
#line 8710 "RESTSupport.c"
}


static SpitPublishingDialogPaneGeometryOptions publishing_rest_support_google_publisher_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self;
	SpitPublishingDialogPaneGeometryOptions result = 0;
#line 798 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane);
#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8723 "RESTSupport.c"
}


static GtkWidget* publishing_rest_support_google_publisher_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self;
	GtkWidget* result = NULL;
	GtkBox* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
#line 802 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane);
#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->pane_widget;
#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	result = _tmp1_;
#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return result;
#line 8742 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self;
	WebKitWebView* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane);
#line 807 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = self->priv->webview;
#line 807 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = self->priv->auth_sequence_start_url;
#line 807 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	webkit_web_view_load_uri (_tmp0_, _tmp1_);
#line 8758 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self;
#line 810 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane);
#line 8766 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_class_init (PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass * klass) {
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_web_authentication_pane_parent_class = g_type_class_peek_parent (klass);
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_type_class_add_private (klass, sizeof (PublishingRESTSupportGooglePublisherWebAuthenticationPanePrivate));
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_OBJECT_CLASS (klass)->finalize = publishing_rest_support_google_publisher_web_authentication_pane_finalize;
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_signal_new ("authorized", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
#line 8779 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) {
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_rest_support_google_publisher_web_authentication_pane_real_get_preferred_geometry;
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_rest_support_google_publisher_web_authentication_pane_real_get_widget;
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_installed;
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_rest_support_google_publisher_web_authentication_pane_real_on_pane_uninstalled;
#line 8794 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_instance_init (PublishingRESTSupportGooglePublisherWebAuthenticationPane * self) {
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self->priv = PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self);
#line 8801 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_web_authentication_pane_finalize (GObject* obj) {
	PublishingRESTSupportGooglePublisherWebAuthenticationPane * self;
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_WEB_AUTHENTICATION_PANE, PublishingRESTSupportGooglePublisherWebAuthenticationPane);
#line 739 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->webview);
#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->pane_widget);
#line 741 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->auth_sequence_start_url);
#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_OBJECT_CLASS (publishing_rest_support_google_publisher_web_authentication_pane_parent_class)->finalize (obj);
#line 8817 "RESTSupport.c"
}


static GType publishing_rest_support_google_publisher_web_authentication_pane_get_type (void) {
	static volatile gsize publishing_rest_support_google_publisher_web_authentication_pane_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_web_authentication_pane_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_web_authentication_pane_instance_init, NULL };
		static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_rest_support_google_publisher_web_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType publishing_rest_support_google_publisher_web_authentication_pane_type_id;
		publishing_rest_support_google_publisher_web_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingRESTSupportGooglePublisherWebAuthenticationPane", &g_define_type_info, 0);
		g_type_add_interface_static (publishing_rest_support_google_publisher_web_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info);
		g_once_init_leave (&publishing_rest_support_google_publisher_web_authentication_pane_type_id__volatile, publishing_rest_support_google_publisher_web_authentication_pane_type_id);
	}
	return publishing_rest_support_google_publisher_web_authentication_pane_type_id__volatile;
}


static PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* publishing_rest_support_google_publisher_get_access_tokens_transaction_construct (GType object_type, PublishingRESTSupportSession* session, const gchar* auth_code) {
	PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* self = NULL;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 817 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 817 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (auth_code != NULL, NULL);
#line 818 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 818 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherGetAccessTokensTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_ACCESS_TOKENS_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 820 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = auth_code;
#line 820 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "code", _tmp1_);
#line 821 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_id", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_ID);
#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_secret", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_SECRET);
#line 823 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "redirect_uri", "urn:ietf:wg:oauth:2.0:oob");
#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "grant_type", "authorization_code");
#line 817 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 8861 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherGetAccessTokensTransaction* publishing_rest_support_google_publisher_get_access_tokens_transaction_new (PublishingRESTSupportSession* session, const gchar* auth_code) {
#line 817 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_get_access_tokens_transaction_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GET_ACCESS_TOKENS_TRANSACTION, session, auth_code);
#line 8868 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_get_access_tokens_transaction_class_init (PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass * klass) {
#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_get_access_tokens_transaction_parent_class = g_type_class_peek_parent (klass);
#line 8875 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_get_access_tokens_transaction_instance_init (PublishingRESTSupportGooglePublisherGetAccessTokensTransaction * self) {
}


static GType publishing_rest_support_google_publisher_get_access_tokens_transaction_get_type (void) {
	static volatile gsize publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherGetAccessTokensTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_get_access_tokens_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherGetAccessTokensTransaction), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_get_access_tokens_transaction_instance_init, NULL };
		GType publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id;
		publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingRESTSupportGooglePublisherGetAccessTokensTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id__volatile, publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id);
	}
	return publishing_rest_support_google_publisher_get_access_tokens_transaction_type_id__volatile;
}


static PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* publishing_rest_support_google_publisher_refresh_access_token_transaction_construct (GType object_type, PublishingRESTSupportSession* session) {
	PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* self = NULL;
	PublishingRESTSupportSession* _tmp0_ = NULL;
	PublishingRESTSupportSession* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL);
#line 832 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 832 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_REFRESH_ACCESS_TOKEN_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_id", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_ID);
#line 835 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_secret", PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_OAUTH_CLIENT_SECRET);
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = session;
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = publishing_rest_support_google_session_get_refresh_token (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession));
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = _tmp2_;
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "refresh_token", _tmp3_);
#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp3_);
#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "grant_type", "refresh_token");
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 8925 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction* publishing_rest_support_google_publisher_refresh_access_token_transaction_new (PublishingRESTSupportSession* session) {
#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_refresh_access_token_transaction_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, session);
#line 8932 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_refresh_access_token_transaction_class_init (PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass * klass) {
#line 828 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_refresh_access_token_transaction_parent_class = g_type_class_peek_parent (klass);
#line 8939 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_refresh_access_token_transaction_instance_init (PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction * self) {
}


static GType publishing_rest_support_google_publisher_refresh_access_token_transaction_get_type (void) {
	static volatile gsize publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherRefreshAccessTokenTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_refresh_access_token_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_refresh_access_token_transaction_instance_init, NULL };
		GType publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id;
		publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingRESTSupportGooglePublisherRefreshAccessTokenTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id__volatile, publishing_rest_support_google_publisher_refresh_access_token_transaction_type_id);
	}
	return publishing_rest_support_google_publisher_refresh_access_token_transaction_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;
	PublishingRESTSupportGoogleSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	PublishingRESTSupportHttpMethod _tmp2_ = 0;
#line 842 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL);
#line 842 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = endpoint_url;
#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = method;
#line 844 "/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 (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_);
#line 842 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 8978 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new_with_endpoint_url (PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) {
#line 842 "/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 8985 "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;
	PublishingRESTSupportGoogleSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	PublishingRESTSupportHttpMethod _tmp2_ = 0;
	PublishingRESTSupportGoogleSession* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	PublishingRESTSupportGoogleSession* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
#line 847 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL);
#line 847 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (endpoint_url != NULL, NULL);
#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp1_ = endpoint_url;
#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp2_ = method;
#line 849 "/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 (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_);
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp3_ = session;
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp4_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_vala_assert (_tmp4_, "session.is_authenticated()");
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp5_ = session;
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp6_ = publishing_rest_support_google_session_get_access_token (_tmp5_);
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp7_ = _tmp6_;
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp8_ = g_strconcat ("Bearer ", _tmp7_, NULL);
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp9_ = _tmp8_;
#line 852 "/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", _tmp9_);
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp9_);
#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (_tmp7_);
#line 847 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 9037 "RESTSupport.c"
}


PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new (PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) {
#line 847 "/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 9044 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_authenticated_transaction_class_init (PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass * klass) {
#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_authenticated_transaction_parent_class = g_type_class_peek_parent (klass);
#line 9051 "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 PublishingRESTSupportGooglePublisherUsernameFetchTransaction* publishing_rest_support_google_publisher_username_fetch_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session) {
	PublishingRESTSupportGooglePublisherUsernameFetchTransaction* self = NULL;
	PublishingRESTSupportGoogleSession* _tmp0_ = NULL;
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL);
#line 860 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_tmp0_ = session;
#line 860 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = (PublishingRESTSupportGooglePublisherUsernameFetchTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_USERNAME_FETCH_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET);
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return self;
#line 9082 "RESTSupport.c"
}


static PublishingRESTSupportGooglePublisherUsernameFetchTransaction* publishing_rest_support_google_publisher_username_fetch_transaction_new (PublishingRESTSupportGoogleSession* session) {
#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	return publishing_rest_support_google_publisher_username_fetch_transaction_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_USERNAME_FETCH_TRANSACTION, session);
#line 9089 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_username_fetch_transaction_class_init (PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass * klass) {
#line 856 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	publishing_rest_support_google_publisher_username_fetch_transaction_parent_class = g_type_class_peek_parent (klass);
#line 9096 "RESTSupport.c"
}


static void publishing_rest_support_google_publisher_username_fetch_transaction_instance_init (PublishingRESTSupportGooglePublisherUsernameFetchTransaction * self) {
}


static GType publishing_rest_support_google_publisher_username_fetch_transaction_get_type (void) {
	static volatile gsize publishing_rest_support_google_publisher_username_fetch_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_rest_support_google_publisher_username_fetch_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportGooglePublisherUsernameFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_google_publisher_username_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportGooglePublisherUsernameFetchTransaction), 0, (GInstanceInitFunc) publishing_rest_support_google_publisher_username_fetch_transaction_instance_init, NULL };
		GType publishing_rest_support_google_publisher_username_fetch_transaction_type_id;
		publishing_rest_support_google_publisher_username_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingRESTSupportGooglePublisherUsernameFetchTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_rest_support_google_publisher_username_fetch_transaction_type_id__volatile, publishing_rest_support_google_publisher_username_fetch_transaction_type_id);
	}
	return publishing_rest_support_google_publisher_username_fetch_transaction_type_id__volatile;
}


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


static void publishing_rest_support_google_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) {
#line 695 "/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 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->is_running = (gboolean (*)(SpitPublishingPublisher*)) publishing_rest_support_google_publisher_is_running;
#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->start = (void (*)(SpitPublishingPublisher*)) publishing_rest_support_google_publisher_start;
#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->stop = (void (*)(SpitPublishingPublisher*)) publishing_rest_support_google_publisher_stop;
#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	iface->get_service = (SpitPublishingService* (*)(SpitPublishingPublisher*)) publishing_rest_support_google_publisher_real_get_service;
#line 9148 "RESTSupport.c"
}


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


static void publishing_rest_support_google_publisher_finalize (GObject* obj) {
	PublishingRESTSupportGooglePublisher * self;
#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher);
#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_free0 (self->priv->scope);
#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	_g_object_unref0 (self->priv->web_auth_pane);
#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala"
	G_OBJECT_CLASS (publishing_rest_support_google_publisher_parent_class)->finalize (obj);
#line 9171 "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);
}



