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


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include "shotwell-plugin-common.h"
#include <webkit2/webkit2.h>
#include "shotwell-plugin-dev-1.0.h"
#include <glib/gi18n-lib.h>
#include <libsoup/soup.h>
#include <json-glib/json-glib.h>


#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE (publishing_authenticator_shotwell_google_web_authentication_pane_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPane))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass))

typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPane PublishingAuthenticatorShotwellGoogleWebAuthenticationPane;
typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass;
typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION (publishing_authenticator_shotwell_google_session_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSession))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSessionClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSessionClass))

typedef struct _PublishingAuthenticatorShotwellGoogleSession PublishingAuthenticatorShotwellGoogleSession;
typedef struct _PublishingAuthenticatorShotwellGoogleSessionClass PublishingAuthenticatorShotwellGoogleSessionClass;
typedef struct _PublishingAuthenticatorShotwellGoogleSessionPrivate PublishingAuthenticatorShotwellGoogleSessionPrivate;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION (publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass))

typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction;
typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass;
typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION (publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass))

typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction;
typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass;
typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION (publishing_authenticator_shotwell_google_username_fetch_transaction_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass))

typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction;
typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass;
typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE (publishing_authenticator_shotwell_google_google_get_type ())
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE))
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass))

typedef struct _PublishingAuthenticatorShotwellGoogleGoogle PublishingAuthenticatorShotwellGoogleGoogle;
typedef struct _PublishingAuthenticatorShotwellGoogleGoogleClass PublishingAuthenticatorShotwellGoogleGoogleClass;
typedef struct _PublishingAuthenticatorShotwellGoogleGooglePrivate PublishingAuthenticatorShotwellGoogleGooglePrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#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)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#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 _PublishingAuthenticatorShotwellGoogleWebAuthenticationPane {
	ShotwellPluginsCommonWebAuthenticationPane parent_instance;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate * priv;
};

struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass {
	ShotwellPluginsCommonWebAuthenticationPaneClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleSession {
	PublishingRESTSupportSession parent_instance;
	PublishingAuthenticatorShotwellGoogleSessionPrivate * priv;
	gchar* access_token;
	gchar* refresh_token;
	gint64 expires_at;
};

struct _PublishingAuthenticatorShotwellGoogleSessionClass {
	PublishingRESTSupportSessionClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate * priv;
};

struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate * priv;
};

struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction {
	PublishingRESTSupportTransaction parent_instance;
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate * priv;
};

struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass {
	PublishingRESTSupportTransactionClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleGoogle {
	GObject parent_instance;
	PublishingAuthenticatorShotwellGoogleGooglePrivate * priv;
};

struct _PublishingAuthenticatorShotwellGoogleGoogleClass {
	GObjectClass parent_class;
};

struct _PublishingAuthenticatorShotwellGoogleGooglePrivate {
	gchar* scope;
	SpitPublishingPluginHost* host;
	GHashTable* params;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* web_auth_pane;
	PublishingAuthenticatorShotwellGoogleSession* session;
	gchar* welcome_message;
};


static gpointer publishing_authenticator_shotwell_google_web_authentication_pane_parent_class = NULL;
extern gboolean publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty;
gboolean publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty = FALSE;
static gpointer publishing_authenticator_shotwell_google_session_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_google_get_access_tokens_transaction_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_google_refresh_access_token_transaction_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_google_username_fetch_transaction_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_google_google_parent_class = NULL;
static SpitPublishingAuthenticatorIface* publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_parent_iface = NULL;

#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID "534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67.apps.googleusercontent.c" \
"om"
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_SECRET "pwpzZ7W1TCcD5uIfYCu8sM7x"
GType publishing_authenticator_shotwell_google_web_authentication_pane_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY
};
PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* publishing_authenticator_shotwell_google_web_authentication_pane_new (const gchar* auth_sequence_start_url);
PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* publishing_authenticator_shotwell_google_web_authentication_pane_construct (GType object_type, const gchar* auth_sequence_start_url);
gboolean publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty (void);
static void publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base);
static void publishing_authenticator_shotwell_google_web_authentication_pane_finalize (GObject* obj);
GType publishing_authenticator_shotwell_google_session_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION_DUMMY_PROPERTY
};
static gboolean publishing_authenticator_shotwell_google_session_real_is_authenticated (PublishingRESTSupportSession* base);
void publishing_authenticator_shotwell_google_session_deauthenticate (PublishingAuthenticatorShotwellGoogleSession* self);
PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_new (void);
PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_construct (GType object_type);
static void publishing_authenticator_shotwell_google_session_finalize (PublishingRESTSupportSession* obj);
GType publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token"
PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session, const gchar* auth_code);
PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session, const gchar* auth_code);
GType publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token"
PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session);
PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session);
GType publishing_authenticator_shotwell_google_username_fetch_transaction_get_type (void) G_GNUC_CONST;
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_DUMMY_PROPERTY
};
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_ENDPOINT_URL "https://www.googleapis.com/oauth2/v1/userinfo"
PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session);
PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session);
GType publishing_authenticator_shotwell_google_google_get_type (void) G_GNUC_CONST;
#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGooglePrivate))
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_DUMMY_PROPERTY
};
PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_new (const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host);
PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_construct (GType object_type, const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
static void publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishingAuthenticator* base);
static void publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token);
static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (PublishingAuthenticatorShotwellGoogleGoogle* self);
static void publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (PublishingAuthenticatorShotwellGoogleGoogle* self);
static gboolean publishing_authenticator_shotwell_google_google_real_can_logout (SpitPublishingAuthenticator* base);
static GHashTable* publishing_authenticator_shotwell_google_google_real_get_authentication_parameter (SpitPublishingAuthenticator* base);
static void publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthenticator* base);
static void publishing_authenticator_shotwell_google_google_real_refresh (SpitPublishingAuthenticator* base);
static void publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (PublishingAuthenticatorShotwellGoogleGoogle* self);
static void publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code);
static void _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self);
static void publishing_authenticator_shotwell_google_google_do_get_access_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code);
static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn);
static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static void publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* response_body);
static void publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, gint64 abs_time);
static void publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token);
static void publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self);
static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn);
static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static void publishing_authenticator_shotwell_google_google_do_extract_username (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* response_body);
static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn);
static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self);
static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err);
static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self);
static gboolean ___lambda4_ (PublishingAuthenticatorShotwellGoogleGoogle* self);
static gboolean ____lambda4__gsource_func (gpointer self);
static void publishing_authenticator_shotwell_google_google_on_service_welcome_login (PublishingAuthenticatorShotwellGoogleGoogle* self);
static void _publishing_authenticator_shotwell_google_google_on_service_welcome_login_spit_publishing_login_callback (gpointer self);
static void publishing_authenticator_shotwell_google_google_finalize (GObject* obj);


PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* publishing_authenticator_shotwell_google_web_authentication_pane_construct (GType object_type, const gchar* auth_sequence_start_url) {
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self = NULL;
	const gchar* _tmp0_ = NULL;
#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (auth_sequence_start_url != NULL, NULL);
#line 14 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = auth_sequence_start_url;
#line 14 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane*) g_object_new (object_type, "login-uri", _tmp0_, NULL);
#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 269 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* publishing_authenticator_shotwell_google_web_authentication_pane_new (const gchar* auth_sequence_start_url) {
#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_web_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, auth_sequence_start_url);
#line 276 "GoogleAuthenticator.c"
}


gboolean publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty (void) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 18 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty;
#line 18 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	result = _tmp0_;
#line 18 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 289 "GoogleAuthenticator.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.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 987 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 988 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 988 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 988 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 988 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 990 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 990 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 316 "GoogleAuthenticator.c"
		gchar* _tmp4_ = NULL;
#line 991 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 991 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 991 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 324 "GoogleAuthenticator.c"
	} else {
#line 993 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = -1;
#line 993 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 330 "GoogleAuthenticator.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.34/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1296 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1296 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 354 "GoogleAuthenticator.c"
		glong _tmp4_ = 0L;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 362 "GoogleAuthenticator.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 374 "GoogleAuthenticator.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.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 398 "GoogleAuthenticator.c"
		glong _tmp2_ = 0L;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 404 "GoogleAuthenticator.c"
	} else {
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 408 "GoogleAuthenticator.c"
	}
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 412 "GoogleAuthenticator.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 424 "GoogleAuthenticator.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 434 "GoogleAuthenticator.c"
	}
#line 1315 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1315 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 440 "GoogleAuthenticator.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1317 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1317 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 454 "GoogleAuthenticator.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 464 "GoogleAuthenticator.c"
	}
#line 1321 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1321 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 470 "GoogleAuthenticator.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 479 "GoogleAuthenticator.c"
	}
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 499 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) {
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self;
	gchar* page_title = NULL;
	WebKitWebView* _tmp0_ = NULL;
	WebKitWebView* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPane);
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = shotwell_plugins_common_web_authentication_pane_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane));
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = _tmp0_;
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = webkit_web_view_get_title (_tmp1_);
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = _tmp3_;
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (_tmp1_);
#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	page_title = _tmp4_;
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = page_title;
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = string_index_of (_tmp5_, "state=connect", 0);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp6_ > 0) {
#line 535 "GoogleAuthenticator.c"
		gint auth_code_field_start = 0;
		const gchar* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		gchar* auth_code = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
		gchar* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp7_ = page_title;
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp8_ = string_index_of (_tmp7_, "code=", 0);
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		auth_code_field_start = _tmp8_;
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp9_ = auth_code_field_start;
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (_tmp9_ < 0) {
#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_g_free0 (page_title);
#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			return;
#line 559 "GoogleAuthenticator.c"
		}
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp10_ = page_title;
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp11_ = auth_code_field_start;
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp12_ = string_substring (_tmp10_, (glong) (_tmp11_ + 5), (glong) -1);
#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		auth_code = _tmp12_;
#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty = TRUE;
#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp13_ = auth_code;
#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_signal_emit_by_name (self, "authorized", _tmp13_);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (auth_code);
#line 577 "GoogleAuthenticator.c"
	}
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (page_title);
#line 581 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_web_authentication_pane_class_init (PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass * klass) {
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_web_authentication_pane_parent_class = g_type_class_peek_parent (klass);
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	((ShotwellPluginsCommonWebAuthenticationPaneClass *) klass)->on_page_load = publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load;
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_google_web_authentication_pane_finalize;
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_new ("authorized", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
#line 594 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_web_authentication_pane_instance_init (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self) {
}


static void publishing_authenticator_shotwell_google_web_authentication_pane_finalize (GObject* obj) {
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self;
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPane);
#line 8 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	G_OBJECT_CLASS (publishing_authenticator_shotwell_google_web_authentication_pane_parent_class)->finalize (obj);
#line 608 "GoogleAuthenticator.c"
}


GType publishing_authenticator_shotwell_google_web_authentication_pane_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_web_authentication_pane_instance_init, NULL };
		GType publishing_authenticator_shotwell_google_web_authentication_pane_type_id;
		publishing_authenticator_shotwell_google_web_authentication_pane_type_id = g_type_register_static (SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, "PublishingAuthenticatorShotwellGoogleWebAuthenticationPane", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_google_web_authentication_pane_type_id);
	}
	return publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile;
}


static gboolean publishing_authenticator_shotwell_google_session_real_is_authenticated (PublishingRESTSupportSession* base) {
	PublishingAuthenticatorShotwellGoogleSession * self;
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSession);
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->access_token;
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	result = _tmp0_ != NULL;
#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 636 "GoogleAuthenticator.c"
}


void publishing_authenticator_shotwell_google_session_deauthenticate (PublishingAuthenticatorShotwellGoogleSession* self) {
#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (self));
#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->access_token);
#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->access_token = NULL;
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->refresh_token);
#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->refresh_token = NULL;
#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->expires_at = (gint64) -1;
#line 653 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_construct (GType object_type) {
	PublishingAuthenticatorShotwellGoogleSession* self = NULL;
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleSession*) publishing_rest_support_session_construct (object_type, NULL);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 663 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_new (void) {
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_session_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION);
#line 670 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_session_class_init (PublishingAuthenticatorShotwellGoogleSessionClass * klass) {
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_session_parent_class = g_type_class_peek_parent (klass);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_authenticator_shotwell_google_session_finalize;
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	((PublishingRESTSupportSessionClass *) klass)->is_authenticated = publishing_authenticator_shotwell_google_session_real_is_authenticated;
#line 681 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_session_instance_init (PublishingAuthenticatorShotwellGoogleSession * self) {
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->access_token = NULL;
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->refresh_token = NULL;
#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->expires_at = (gint64) -1;
#line 692 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_session_finalize (PublishingRESTSupportSession* obj) {
	PublishingAuthenticatorShotwellGoogleSession * self;
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSession);
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->access_token);
#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->refresh_token);
#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_authenticator_shotwell_google_session_parent_class)->finalize (obj);
#line 706 "GoogleAuthenticator.c"
}


GType publishing_authenticator_shotwell_google_session_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_session_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_session_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleSession), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_session_instance_init, NULL };
		GType publishing_authenticator_shotwell_google_session_type_id;
		publishing_authenticator_shotwell_google_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingAuthenticatorShotwellGoogleSession", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_google_session_type_id__volatile, publishing_authenticator_shotwell_google_session_type_id);
	}
	return publishing_authenticator_shotwell_google_session_type_id__volatile;
}


PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session, const gchar* auth_code) {
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* self = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL);
#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (auth_code != NULL, NULL);
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = session;
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = auth_code;
#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "code", _tmp1_);
#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_id", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID);
#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_secret", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_SECRET);
#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "grant_type", "authorization_code");
#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 748 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session, const gchar* auth_code) {
#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, session, auth_code);
#line 755 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_get_access_tokens_transaction_class_init (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass * klass) {
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_get_access_tokens_transaction_parent_class = g_type_class_peek_parent (klass);
#line 762 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_get_access_tokens_transaction_instance_init (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction * self) {
}


GType publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_get_access_tokens_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_get_access_tokens_transaction_instance_init, NULL };
		GType publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id;
		publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile, publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id);
	}
	return publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile;
}


PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session) {
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* self = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp0_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL);
#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = session;
#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_id", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID);
#line 74 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "client_secret", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_SECRET);
#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = session;
#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = _tmp1_->refresh_token;
#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "refresh_token", _tmp2_);
#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "grant_type", "refresh_token");
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 807 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session) {
#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_refresh_access_token_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, session);
#line 814 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_refresh_access_token_transaction_class_init (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass * klass) {
#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_refresh_access_token_transaction_parent_class = g_type_class_peek_parent (klass);
#line 821 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_refresh_access_token_transaction_instance_init (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction * self) {
}


GType publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_refresh_access_token_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_refresh_access_token_transaction_instance_init, NULL };
		GType publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id;
		publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile, publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id);
	}
	return publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile;
}


PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_construct (GType object_type, PublishingAuthenticatorShotwellGoogleSession* session) {
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* self = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp0_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL);
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = session;
#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = session;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = _tmp1_->access_token;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = g_strconcat ("Bearer ", _tmp2_, NULL);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = _tmp3_;
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", _tmp4_);
#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp4_);
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 868 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session) {
#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_username_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, session);
#line 875 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_username_fetch_transaction_class_init (PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass * klass) {
#line 80 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_username_fetch_transaction_parent_class = g_type_class_peek_parent (klass);
#line 882 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_username_fetch_transaction_instance_init (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction * self) {
}


GType publishing_authenticator_shotwell_google_username_fetch_transaction_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_username_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_username_fetch_transaction_instance_init, NULL };
		GType publishing_authenticator_shotwell_google_username_fetch_transaction_type_id;
		publishing_authenticator_shotwell_google_username_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction", &g_define_type_info, 0);
		g_once_init_leave (&publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_google_username_fetch_transaction_type_id);
	}
	return publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile;
}


static gpointer _g_object_ref0 (gpointer self) {
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self ? g_object_ref (self) : NULL;
#line 905 "GoogleAuthenticator.c"
}


static void _g_free0_ (gpointer var) {
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	var = (g_free (var), NULL);
#line 912 "GoogleAuthenticator.c"
}


static void _g_variant_unref0_ (gpointer var) {
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
#line 919 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_construct (GType object_type, const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host) {
	PublishingAuthenticatorShotwellGoogleGoogle * self = NULL;
	SpitPublishingPluginHost* _tmp0_ = NULL;
	SpitPublishingPluginHost* _tmp1_ = NULL;
	GHashFunc _tmp2_ = NULL;
	GEqualFunc _tmp3_ = NULL;
	GHashTable* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (scope != NULL, NULL);
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (welcome_message != NULL, NULL);
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = (PublishingAuthenticatorShotwellGoogleGoogle*) g_object_new (object_type, NULL);
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = host;
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (self->priv->host);
#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->host = _tmp1_;
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = g_str_hash;
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = g_str_equal;
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_variant_unref0_);
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_hash_table_unref0 (self->priv->params);
#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->params = _tmp4_;
#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = scope;
#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->priv->scope);
#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->scope = _tmp6_;
#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = publishing_authenticator_shotwell_google_session_new ();
#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->session = _tmp7_;
#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp8_ = welcome_message;
#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->priv->welcome_message);
#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->welcome_message = _tmp9_;
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self;
#line 985 "GoogleAuthenticator.c"
}


PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_new (const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host) {
#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return publishing_authenticator_shotwell_google_google_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, scope, welcome_message, host);
#line 992 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	gchar* refresh_token = NULL;
	SpitPublishingPluginHost* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp6_ = FALSE;
#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->host;
#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", NULL);
#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	refresh_token = _tmp1_;
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = refresh_token;
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp3_ != NULL) {
#line 1016 "GoogleAuthenticator.c"
		const gchar* _tmp4_ = NULL;
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = refresh_token;
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp2_ = g_strcmp0 (_tmp4_, "") != 0;
#line 1022 "GoogleAuthenticator.c"
	} else {
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp2_ = FALSE;
#line 1026 "GoogleAuthenticator.c"
	}
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp2_) {
#line 1030 "GoogleAuthenticator.c"
		const gchar* _tmp5_ = NULL;
#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp5_ = refresh_token;
#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_authenticator_shotwell_google_google_on_refresh_token_available (self, _tmp5_);
#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (self);
#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (refresh_token);
#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1042 "GoogleAuthenticator.c"
	}
#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty ();
#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp6_) {
#line 1048 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp7_ = NULL;
		SpitPublishingPluginHost* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp7_ = self->priv->host;
#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_set_service_locked (_tmp7_, FALSE);
#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp8_ = self->priv->host;
#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp9_ = _ ("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 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_install_static_message_pane (_tmp8_, _tmp9_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
#line 1062 "GoogleAuthenticator.c"
	} else {
#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (self);
#line 1066 "GoogleAuthenticator.c"
	}
#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (refresh_token);
#line 1070 "GoogleAuthenticator.c"
}


static gboolean publishing_authenticator_shotwell_google_google_real_can_logout (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	gboolean result = FALSE;
#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	result = TRUE;
#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 1083 "GoogleAuthenticator.c"
}


static gpointer _g_hash_table_ref0 (gpointer self) {
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self ? g_hash_table_ref (self) : NULL;
#line 1090 "GoogleAuthenticator.c"
}


static GHashTable* publishing_authenticator_shotwell_google_google_real_get_authentication_parameter (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	GHashTable* result = NULL;
	GHashTable* _tmp0_ = NULL;
	GHashTable* _tmp1_ = NULL;
#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->params;
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = _g_hash_table_ref0 (_tmp0_);
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	result = _tmp1_;
#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 1109 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	PublishingAuthenticatorShotwellGoogleSession* _tmp0_ = NULL;
	SpitPublishingPluginHost* _tmp1_ = NULL;
#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->session;
#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_session_deauthenticate (_tmp0_);
#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->host;
#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", "");
#line 1127 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_real_refresh (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 1135 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self) {
#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized ((PublishingAuthenticatorShotwellGoogleGoogle*) self, auth_code);
#line 1142 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (PublishingAuthenticatorShotwellGoogleGoogle* 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;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp27_ = NULL;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp28_ = NULL;
	SpitPublishingPluginHost* _tmp29_ = NULL;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp30_ = NULL;
#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:142: ACTION: running OAuth authentication flo" \
"w in hosted web pane.");
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = soup_uri_encode ("urn:ietf:wg:oauth:2.0:oob", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = _tmp0_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = g_strconcat ("https://accounts.google.com/o/oauth2/auth?" "response_type=code&" "client_id=" PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID "&" "redirect_uri=", _tmp1_, NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = _tmp2_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = g_strconcat (_tmp3_, "&", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = _tmp4_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = g_strconcat (_tmp5_, "scope=", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = _tmp6_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp8_ = self->priv->scope;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp9_ = soup_uri_encode (_tmp8_, NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp10_ = _tmp9_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp11_ = g_strconcat (_tmp7_, _tmp10_, NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp12_ = _tmp11_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp13_ = g_strconcat (_tmp12_, "+", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp14_ = _tmp13_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp15_ = soup_uri_encode ("https://www.googleapis.com/auth/userinfo.profile", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp16_ = _tmp15_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp17_ = g_strconcat (_tmp14_, _tmp16_, NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp18_ = _tmp17_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp19_ = g_strconcat (_tmp18_, "&", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp20_ = _tmp19_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp21_ = g_strconcat (_tmp20_, "state=connect&", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp22_ = _tmp21_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp23_ = g_strconcat (_tmp22_, "access_type=offline&", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp24_ = _tmp23_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp25_ = g_strconcat (_tmp24_, "approval_prompt=force", NULL);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp26_ = _tmp25_;
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp24_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp22_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp20_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp18_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp16_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp14_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp12_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp10_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp7_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp5_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp3_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp1_);
#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	user_authorization_url = _tmp26_;
#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp27_ = publishing_authenticator_shotwell_google_web_authentication_pane_new (user_authorization_url);
#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (self->priv->web_auth_pane);
#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->web_auth_pane = _tmp27_;
#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp28_ = self->priv->web_auth_pane;
#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (_tmp28_, "authorized", (GCallback) _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized, self, 0);
#line 157 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp29_ = self->priv->host;
#line 157 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp30_ = self->priv->web_auth_pane;
#line 157 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (user_authorization_url);
#line 1281 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code) {
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (auth_code != NULL);
#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->web_auth_pane;
#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("authorized", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, &_tmp1_, NULL, FALSE);
#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized, self);
#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = self->priv->scope;
#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = auth_code;
#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:163: EVENT: user authorized scope %s with aut" \
"h_code %s", _tmp2_, _tmp3_);
#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = auth_code;
#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_get_access_tokens (self, _tmp4_);
#line 1311 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender);
#line 1318 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_get_access_tokens_error ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender, err);
#line 1325 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_get_access_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* tokens_txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (auth_code != NULL);
#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:169: ACTION: exchanging authorization code fo" \
"r access & refresh tokens");
#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->host;
#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->session;
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = auth_code;
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (_tmp1_, _tmp2_);
#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	tokens_txn = _tmp3_;
#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self, 0);
#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self, 0);
#line 1358 "GoogleAuthenticator.c"
	{
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (tokens_txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 1366 "GoogleAuthenticator.c"
				goto __catch5_spit_publishing_publishing_error;
			}
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_clear_error (&_inner_error_);
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			return;
#line 1377 "GoogleAuthenticator.c"
		}
	}
	goto __finally5;
	__catch5_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		err = _inner_error_;
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_inner_error_ = NULL;
#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = self->priv->host;
#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp5_ = err;
#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (err);
#line 1398 "GoogleAuthenticator.c"
	}
	__finally5:
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1411 "GoogleAuthenticator.c"
	}
#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 1415 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	PublishingRESTSupportTransaction* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
#line 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self);
#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self);
#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:188: %s", "EVENT: network transaction to exchange authorization code for access t" \
"okens " "completed successfully.");
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = txn;
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = _tmp5_;
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp6_);
#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp6_);
#line 1455 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* 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;
	SpitPublishingPluginHost* _tmp7_ = NULL;
	GError* _tmp8_ = NULL;
#line 194 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 194 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed, self);
#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error, self);
#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = txn;
#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = _tmp5_;
#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("EVENT: network transaction to exchange authorization code for access t" \
"okens " "failed; response = '%s'", _tmp6_);
#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp6_);
#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = self->priv->host;
#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp8_ = err;
#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_);
#line 1501 "GoogleAuthenticator.c"
}


static gpointer _json_object_ref0 (gpointer self) {
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return self ? json_object_ref (self) : NULL;
#line 1508 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAuthenticatorShotwellGoogleGoogle* 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;
	JsonObject* _tmp36_ = NULL;
	gboolean _tmp37_ = FALSE;
	GError * _inner_error_ = NULL;
#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (response_body != NULL);
#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:206: ACTION: extracting OAuth tokens from bod" \
"y of server response");
#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = json_parser_new ();
#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	parser = _tmp0_;
#line 1540 "GoogleAuthenticator.c"
	{
		JsonParser* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp1_ = parser;
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp2_ = response_body;
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_);
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1552 "GoogleAuthenticator.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 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		err = _inner_error_;
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_inner_error_ = NULL;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp3_ = self->priv->host;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = err;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp5_ = _tmp4_->message;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp6_ = g_strconcat ("Couldn't parse JSON response: ", _tmp5_, NULL);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp7_ = _tmp6_;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp7_);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp9_ = _tmp8_;
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp9_);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (_tmp9_);
#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (_tmp7_);
#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (err);
#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_object_unref0 (parser);
#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1597 "GoogleAuthenticator.c"
	}
	__finally6:
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_object_unref0 (parser);
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1610 "GoogleAuthenticator.c"
	}
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp10_ = parser;
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp11_ = json_parser_get_root (_tmp10_);
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp12_ = json_node_get_object (_tmp11_);
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp13_ = _json_object_ref0 (_tmp12_);
#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	response_obj = _tmp13_;
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp15_ = response_obj;
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp16_ = json_object_has_member (_tmp15_, "access_token");
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (!_tmp16_) {
#line 1628 "GoogleAuthenticator.c"
		JsonObject* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp17_ = response_obj;
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp18_ = json_object_has_member (_tmp17_, "refresh_token");
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp14_ = !_tmp18_;
#line 1637 "GoogleAuthenticator.c"
	} else {
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp14_ = FALSE;
#line 1641 "GoogleAuthenticator.c"
	}
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp14_) {
#line 1645 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp19_ = NULL;
		GError* _tmp20_ = NULL;
		GError* _tmp21_ = NULL;
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp19_ = self->priv->host;
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp21_ = _tmp20_;
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp19_, _tmp21_);
#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (_tmp21_);
#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_json_object_unref0 (response_obj);
#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_object_unref0 (parser);
#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1665 "GoogleAuthenticator.c"
	}
#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp22_ = response_obj;
#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp23_ = json_object_has_member (_tmp22_, "expires_in");
#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp23_) {
#line 1673 "GoogleAuthenticator.c"
		gint64 duration = 0LL;
		JsonObject* _tmp24_ = NULL;
		gint64 _tmp25_ = 0LL;
		gint64 abs_time = 0LL;
		gint64 _tmp26_ = 0LL;
		gint64 _tmp27_ = 0LL;
		gint64 _tmp28_ = 0LL;
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp24_ = response_obj;
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp25_ = json_object_get_int_member (_tmp24_, "expires_in");
#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		duration = _tmp25_;
#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp26_ = g_get_real_time ();
#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp27_ = duration;
#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		abs_time = _tmp26_ + ((_tmp27_ * 1000L) * 1000L);
#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp28_ = abs_time;
#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (self, _tmp28_);
#line 1697 "GoogleAuthenticator.c"
	}
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp29_ = response_obj;
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp30_ = json_object_has_member (_tmp29_, "refresh_token");
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp30_) {
#line 1705 "GoogleAuthenticator.c"
		gchar* refresh_token = NULL;
		JsonObject* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
		const gchar* _tmp34_ = NULL;
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp31_ = response_obj;
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp32_ = json_object_get_string_member (_tmp31_, "refresh_token");
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp33_ = g_strdup (_tmp32_);
#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		refresh_token = _tmp33_;
#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp34_ = refresh_token;
#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (g_strcmp0 (_tmp34_, "") != 0) {
#line 1723 "GoogleAuthenticator.c"
			const gchar* _tmp35_ = NULL;
#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp35_ = refresh_token;
#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			publishing_authenticator_shotwell_google_google_on_refresh_token_available (self, _tmp35_);
#line 1729 "GoogleAuthenticator.c"
		}
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (refresh_token);
#line 1733 "GoogleAuthenticator.c"
	}
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp36_ = response_obj;
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp37_ = json_object_has_member (_tmp36_, "access_token");
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp37_) {
#line 1741 "GoogleAuthenticator.c"
		gchar* access_token = NULL;
		JsonObject* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
		const gchar* _tmp41_ = NULL;
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp38_ = response_obj;
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp39_ = json_object_get_string_member (_tmp38_, "access_token");
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp40_ = g_strdup (_tmp39_);
#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		access_token = _tmp40_;
#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp41_ = access_token;
#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (g_strcmp0 (_tmp41_, "") != 0) {
#line 1759 "GoogleAuthenticator.c"
			const gchar* _tmp42_ = NULL;
#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp42_ = access_token;
#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			publishing_authenticator_shotwell_google_google_on_access_token_available (self, _tmp42_);
#line 1765 "GoogleAuthenticator.c"
		}
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (access_token);
#line 1769 "GoogleAuthenticator.c"
	}
#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_json_object_unref0 (response_obj);
#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (parser);
#line 1775 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) {
	const gchar* _tmp0_ = NULL;
	GHashTable* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GVariant* _tmp4_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (token != NULL);
#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = token;
#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:248: EVENT: an OAuth refresh token has become" \
" available; token = '%s'.", _tmp0_);
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->params;
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = g_strdup ("RefreshToken");
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = token;
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = g_variant_new_string (_tmp3_);
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_variant_ref_sink (_tmp4_);
#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_hash_table_insert (_tmp1_, _tmp2_, _tmp4_);
#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = self->priv->session;
#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = token;
#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = g_strdup (_tmp6_);
#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp5_->refresh_token);
#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_->refresh_token = _tmp7_;
#line 1818 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, gint64 abs_time) {
	gint64 _tmp0_ = 0LL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	GHashTable* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gint64 _tmp5_ = 0LL;
	GVariant* _tmp6_ = NULL;
#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = abs_time;
#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("EVENT: an OAuth access token expiry time became available; time = %'" G_GINT64_FORMAT "'.", _tmp0_);
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->session;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = abs_time;
#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_->expires_at = _tmp2_;
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = self->priv->params;
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = g_strdup ("ExpiryTime");
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = abs_time;
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = g_variant_new_int64 (_tmp5_);
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_variant_ref_sink (_tmp6_);
#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_hash_table_insert (_tmp3_, _tmp4_, _tmp6_);
#line 1854 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) {
	const gchar* _tmp0_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GHashTable* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GVariant* _tmp7_ = NULL;
#line 263 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 263 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (token != NULL);
#line 264 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = token;
#line 264 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:264: EVENT: an OAuth access token has become " \
"available; token = '%s'.", _tmp0_);
#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->session;
#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = token;
#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp1_->access_token);
#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_->access_token = _tmp3_;
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = self->priv->params;
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = g_strdup ("AccessToken");
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = token;
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = g_variant_new_string (_tmp6_);
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_variant_ref_sink (_tmp7_);
#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_hash_table_insert (_tmp4_, _tmp5_, _tmp7_);
#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_fetch_username (self);
#line 1899 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender);
#line 1906 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 280 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender, err);
#line 1913 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	SpitPublishingPluginHost* _tmp1_ = NULL;
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp2_ = NULL;
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:273: ACTION: running network transaction to f" \
"etch username.");
#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->host;
#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 276 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->host;
#line 276 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE);
#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = self->priv->session;
#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp3_ = publishing_authenticator_shotwell_google_username_fetch_transaction_new (_tmp2_);
#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	txn = _tmp3_;
#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self, 0);
#line 280 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self, 0);
#line 1946 "GoogleAuthenticator.c"
	{
#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1952 "GoogleAuthenticator.c"
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		err = _inner_error_;
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_inner_error_ = NULL;
#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = self->priv->host;
#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp5_ = err;
#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (err);
#line 1974 "GoogleAuthenticator.c"
	}
	__finally7:
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_publishing_rest_support_transaction_unref0 (txn);
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 1987 "GoogleAuthenticator.c"
	}
#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 1991 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	PublishingRESTSupportTransaction* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 293 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:293: EVENT: username fetch transaction comple" \
"ted successfully.");
#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = txn;
#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = _tmp5_;
#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_extract_username (self, _tmp6_);
#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp6_);
#line 2031 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	SpitPublishingPluginHost* _tmp4_ = NULL;
	GError* _tmp5_ = NULL;
#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 300 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 300 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 300 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:303: EVENT: username fetch transaction caused" \
" a network error");
#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = self->priv->host;
#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = err;
#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
#line 2066 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_extract_username (PublishingAuthenticatorShotwellGoogleGoogle* 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* _tmp24_ = NULL;
	gboolean _tmp25_ = FALSE;
	PublishingAuthenticatorShotwellGoogleSession* _tmp34_ = NULL;
	gboolean _tmp35_ = FALSE;
	SpitPublishingPluginHost* _tmp36_ = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp37_ = NULL;
	const gchar* _tmp38_ = NULL;
	GError * _inner_error_ = NULL;
#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (response_body != NULL);
#line 309 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:309: ACTION: extracting username from body of" \
" server response");
#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = json_parser_new ();
#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	parser = _tmp0_;
#line 2098 "GoogleAuthenticator.c"
	{
		JsonParser* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp1_ = parser;
#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp2_ = response_body;
#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_);
#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2110 "GoogleAuthenticator.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 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		err = _inner_error_;
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_inner_error_ = NULL;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp3_ = self->priv->host;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = err;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp5_ = _tmp4_->message;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp6_ = g_strconcat ("Couldn't parse JSON response: ", _tmp5_, NULL);
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp7_ = _tmp6_;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp7_);
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp9_ = _tmp8_;
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp9_);
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (_tmp9_);
#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (_tmp7_);
#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (err);
#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_object_unref0 (parser);
#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 2155 "GoogleAuthenticator.c"
	}
	__finally8:
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_object_unref0 (parser);
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 2168 "GoogleAuthenticator.c"
	}
#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp10_ = parser;
#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp11_ = json_parser_get_root (_tmp10_);
#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp12_ = json_node_get_object (_tmp11_);
#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp13_ = _json_object_ref0 (_tmp12_);
#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	response_obj = _tmp13_;
#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp14_ = response_obj;
#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp15_ = json_object_has_member (_tmp14_, "name");
#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp15_) {
#line 2186 "GoogleAuthenticator.c"
		gchar* username = NULL;
		JsonObject* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp16_ = response_obj;
#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp17_ = json_object_get_string_member (_tmp16_, "name");
#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp18_ = g_strdup (_tmp17_);
#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		username = _tmp18_;
#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp19_ = username;
#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (g_strcmp0 (_tmp19_, "") != 0) {
#line 2204 "GoogleAuthenticator.c"
			GHashTable* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
			const gchar* _tmp22_ = NULL;
			GVariant* _tmp23_ = NULL;
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp20_ = self->priv->params;
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp21_ = g_strdup ("UserName");
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp22_ = username;
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp23_ = g_variant_new_string (_tmp22_);
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_variant_ref_sink (_tmp23_);
#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_hash_table_insert (_tmp20_, _tmp21_, _tmp23_);
#line 2221 "GoogleAuthenticator.c"
		}
#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (username);
#line 2225 "GoogleAuthenticator.c"
	}
#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp24_ = response_obj;
#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp25_ = json_object_has_member (_tmp24_, "access_token");
#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp25_) {
#line 2233 "GoogleAuthenticator.c"
		gchar* access_token = NULL;
		JsonObject* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		gchar* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp26_ = response_obj;
#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp27_ = json_object_get_string_member (_tmp26_, "access_token");
#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp28_ = g_strdup (_tmp27_);
#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		access_token = _tmp28_;
#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp29_ = access_token;
#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (g_strcmp0 (_tmp29_, "") != 0) {
#line 2251 "GoogleAuthenticator.c"
			GHashTable* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
			const gchar* _tmp32_ = NULL;
			GVariant* _tmp33_ = NULL;
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp30_ = self->priv->params;
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp31_ = g_strdup ("AccessToken");
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp32_ = access_token;
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_tmp33_ = g_variant_new_string (_tmp32_);
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_variant_ref_sink (_tmp33_);
#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_hash_table_insert (_tmp30_, _tmp31_, _tmp33_);
#line 2268 "GoogleAuthenticator.c"
		}
#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (access_token);
#line 2272 "GoogleAuthenticator.c"
	}
#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp34_ = self->priv->session;
#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp35_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_vala_assert (_tmp35_, "session.is_authenticated()");
#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp36_ = self->priv->host;
#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp37_ = self->priv->session;
#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp38_ = _tmp37_->refresh_token;
#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", _tmp38_);
#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated");
#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_json_object_unref0 (response_obj);
#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (parser);
#line 2294 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender);
#line 2301 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) {
#line 354 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender, err);
#line 2308 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_ = NULL;
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 347 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:347: ACTION: exchanging OAuth refresh token f" \
"or OAuth access token.");
#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->host;
#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_install_login_wait_pane (_tmp0_);
#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->session;
#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (_tmp1_);
#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	txn = _tmp2_;
#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self, 0);
#line 354 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self, 0);
#line 2336 "GoogleAuthenticator.c"
	{
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 2344 "GoogleAuthenticator.c"
				goto __catch9_spit_publishing_publishing_error;
			}
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			_publishing_rest_support_transaction_unref0 (txn);
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			g_clear_error (&_inner_error_);
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
			return;
#line 2355 "GoogleAuthenticator.c"
		}
	}
	goto __finally9;
	__catch9_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		err = _inner_error_;
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_inner_error_ = NULL;
#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp3_ = self->priv->host;
#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp4_ = err;
#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_publishing_plugin_host_post_error (_tmp3_, _tmp4_);
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_error_free0 (err);
#line 2376 "GoogleAuthenticator.c"
	}
	__finally9:
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_publishing_rest_support_transaction_unref0 (txn);
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.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 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_clear_error (&_inner_error_);
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 2389 "GoogleAuthenticator.c"
	}
#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 2393 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	PublishingAuthenticatorShotwellGoogleSession* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	PublishingRESTSupportTransaction* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:368: EVENT: refresh access token transaction " \
"completed successfully.");
#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = self->priv->session;
#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp5_) {
#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 2433 "GoogleAuthenticator.c"
	}
#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp6_ = txn;
#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = publishing_rest_support_transaction_get_response (_tmp6_);
#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp8_ = _tmp7_;
#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp8_);
#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (_tmp8_);
#line 2445 "GoogleAuthenticator.c"
}


static gboolean ___lambda4_ (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	gboolean result = FALSE;
#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_authenticator_authenticate (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator));
#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	result = FALSE;
#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 2457 "GoogleAuthenticator.c"
}


static gboolean ____lambda4__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda4_ ((PublishingAuthenticatorShotwellGoogleGoogle*) self);
#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	return result;
#line 2466 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	PublishingRESTSupportTransaction* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	PublishingAuthenticatorShotwellGoogleSession* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	PublishingRESTSupportTransaction* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
	SpitPublishingPluginHost* _tmp12_ = NULL;
	GError* _tmp13_ = NULL;
#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = txn;
#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed, self);
#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp2_ = txn;
#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error, self);
#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:381: EVENT: refresh access token transaction " \
"caused a network error.");
#line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp4_ = self->priv->session;
#line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp5_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
#line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp5_) {
#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		return;
#line 2508 "GoogleAuthenticator.c"
	}
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp7_ = txn;
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp8_ = publishing_rest_support_transaction_get_status_code (_tmp7_);
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp8_ == ((guint) SOUP_STATUS_BAD_REQUEST)) {
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp6_ = TRUE;
#line 2518 "GoogleAuthenticator.c"
	} else {
		PublishingRESTSupportTransaction* _tmp9_ = NULL;
		guint _tmp10_ = 0U;
#line 386 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp9_ = txn;
#line 386 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp10_ = publishing_rest_support_transaction_get_status_code (_tmp9_);
#line 386 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp6_ = _tmp10_ == ((guint) SOUP_STATUS_UNAUTHORIZED);
#line 2528 "GoogleAuthenticator.c"
	}
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp6_) {
#line 2532 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp11_ = NULL;
#line 388 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp11_ = self->priv->host;
#line 388 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", "");
#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda4__gsource_func, g_object_ref (self), g_object_unref);
#line 2540 "GoogleAuthenticator.c"
	}
#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp12_ = self->priv->host;
#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp13_ = err;
#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_post_error (_tmp12_, _tmp13_);
#line 2548 "GoogleAuthenticator.c"
}


static void _publishing_authenticator_shotwell_google_google_on_service_welcome_login_spit_publishing_login_callback (gpointer self) {
#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_on_service_welcome_login ((PublishingAuthenticatorShotwellGoogleGoogle*) self);
#line 2555 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 396 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:396: ACTION: showing service welcome pane.");
#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp0_ = self->priv->host;
#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_tmp1_ = self->priv->welcome_message;
#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	spit_publishing_plugin_host_install_welcome_pane (_tmp0_, _tmp1_, _publishing_authenticator_shotwell_google_google_on_service_welcome_login_spit_publishing_login_callback, self);
#line 2572 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_service_welcome_login (PublishingAuthenticatorShotwellGoogleGoogle* self) {
#line 401 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self));
#line 402 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_debug ("GoogleAuthenticator.vala:402: EVENT: user clicked 'Login' in welcome p" \
"ane.");
#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (self);
#line 2583 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_class_init (PublishingAuthenticatorShotwellGoogleGoogleClass * klass) {
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_parent_class = g_type_class_peek_parent (klass);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellGoogleGooglePrivate));
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_google_google_finalize;
#line 2594 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) {
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	iface->authenticate = (void (*)(SpitPublishingAuthenticator*)) publishing_authenticator_shotwell_google_google_real_authenticate;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	iface->can_logout = (gboolean (*)(SpitPublishingAuthenticator*)) publishing_authenticator_shotwell_google_google_real_can_logout;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	iface->get_authentication_parameter = (GHashTable* (*)(SpitPublishingAuthenticator*)) publishing_authenticator_shotwell_google_google_real_get_authentication_parameter;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	iface->logout = (void (*)(SpitPublishingAuthenticator*)) publishing_authenticator_shotwell_google_google_real_logout;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	iface->refresh = (void (*)(SpitPublishingAuthenticator*)) publishing_authenticator_shotwell_google_google_real_refresh;
#line 2611 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_instance_init (PublishingAuthenticatorShotwellGoogleGoogle * self) {
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_PRIVATE (self);
#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->scope = NULL;
#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->host = NULL;
#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->params = NULL;
#line 92 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->web_auth_pane = NULL;
#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->session = NULL;
#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self->priv->welcome_message = NULL;
#line 2630 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_finalize (GObject* obj) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle);
#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->priv->scope);
#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (self->priv->host);
#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_hash_table_unref0 (self->priv->params);
#line 92 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_object_unref0 (self->priv->web_auth_pane);
#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_session_unref0 (self->priv->session);
#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (self->priv->welcome_message);
#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	G_OBJECT_CLASS (publishing_authenticator_shotwell_google_google_parent_class)->finalize (obj);
#line 2652 "GoogleAuthenticator.c"
}


GType publishing_authenticator_shotwell_google_google_get_type (void) {
	static volatile gsize publishing_authenticator_shotwell_google_google_type_id__volatile = 0;
	if (g_once_init_enter (&publishing_authenticator_shotwell_google_google_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleGoogleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_google_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleGoogle), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_google_instance_init, NULL };
		static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType publishing_authenticator_shotwell_google_google_type_id;
		publishing_authenticator_shotwell_google_google_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellGoogleGoogle", &g_define_type_info, 0);
		g_type_add_interface_static (publishing_authenticator_shotwell_google_google_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info);
		g_once_init_leave (&publishing_authenticator_shotwell_google_google_type_id__volatile, publishing_authenticator_shotwell_google_google_type_id);
	}
	return publishing_authenticator_shotwell_google_google_type_id__volatile;
}



