/* GoogleAuthenticator.c generated by valac 0.36.6, 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))
enum  {
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL,
	PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_LAST_SIGNAL
};
static guint publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_LAST_SIGNAL] = {0};

#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_;
#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 274 "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 281 "GoogleAuthenticator.c"
}


gboolean publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty (void) {
	gboolean result = FALSE;
	gboolean _tmp0_;
#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 294 "GoogleAuthenticator.c"
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 321 "GoogleAuthenticator.c"
		gchar* _tmp4_;
#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 329 "GoogleAuthenticator.c"
	} else {
#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = -1;
#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 335 "GoogleAuthenticator.c"
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 359 "GoogleAuthenticator.c"
		glong _tmp4_;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 367 "GoogleAuthenticator.c"
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 379 "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_;
	glong _tmp8_;
	glong _tmp14_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	gchar* _tmp22_;
#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 403 "GoogleAuthenticator.c"
		glong _tmp2_;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 409 "GoogleAuthenticator.c"
	} else {
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 413 "GoogleAuthenticator.c"
	}
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 417 "GoogleAuthenticator.c"
		glong _tmp3_;
		glong _tmp4_;
		glong _tmp5_;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 429 "GoogleAuthenticator.c"
	} else {
		gint _tmp6_;
		gint _tmp7_;
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 439 "GoogleAuthenticator.c"
	}
#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 445 "GoogleAuthenticator.c"
		glong _tmp9_;
		glong _tmp10_;
		glong _tmp11_;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 459 "GoogleAuthenticator.c"
	} else {
		glong _tmp12_;
		glong _tmp13_;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 469 "GoogleAuthenticator.c"
	}
#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 475 "GoogleAuthenticator.c"
		glong _tmp15_;
		glong _tmp16_;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 484 "GoogleAuthenticator.c"
	}
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 504 "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_;
	WebKitWebView* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_;
#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 540 "GoogleAuthenticator.c"
		gint auth_code_field_start = 0;
		const gchar* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gchar* auth_code = NULL;
		const gchar* _tmp10_;
		gint _tmp11_;
		gchar* _tmp12_;
		const gchar* _tmp13_;
#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 564 "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 (self, publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL], 0, _tmp13_);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (auth_code);
#line 582 "GoogleAuthenticator.c"
	}
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (page_title);
#line 586 "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 = (void (*) (ShotwellPluginsCommonWebAuthenticationPane *)) 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"
	publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL] = 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 599 "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 613 "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_;
#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 641 "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 658 "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 668 "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 675 "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 = (gboolean (*) (PublishingRESTSupportSession *)) publishing_authenticator_shotwell_google_session_real_is_authenticated;
#line 686 "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 697 "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 711 "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_;
	const gchar* _tmp1_;
#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 753 "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 760 "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 767 "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_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	const gchar* _tmp2_;
#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 812 "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 819 "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 826 "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_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
#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 873 "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 880 "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 887 "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 910 "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 917 "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 924 "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_;
	SpitPublishingPluginHost* _tmp1_;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
#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 990 "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 997 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	gchar* refresh_token = NULL;
	SpitPublishingPluginHost* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	gboolean _tmp6_;
#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 1021 "GoogleAuthenticator.c"
		const gchar* _tmp4_;
#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 1027 "GoogleAuthenticator.c"
	} else {
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp2_ = FALSE;
#line 1031 "GoogleAuthenticator.c"
	}
#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp2_) {
#line 1035 "GoogleAuthenticator.c"
		const gchar* _tmp5_;
#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 1047 "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 1053 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp7_;
		SpitPublishingPluginHost* _tmp8_;
#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"
		spit_publishing_plugin_host_install_static_message_pane (_tmp8_, _ ("You have already logged in and out of a Google service during this Sho" \
"twell session.\n" \
"\n" \
"To continue publishing to Google services, quit and restart Shotwell, " \
"then try publishing again."), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
#line 1064 "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 1068 "GoogleAuthenticator.c"
	}
#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_g_free0 (refresh_token);
#line 1072 "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 1085 "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 1092 "GoogleAuthenticator.c"
}


static GHashTable* publishing_authenticator_shotwell_google_google_real_get_authentication_parameter (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	GHashTable* result = NULL;
	GHashTable* _tmp0_;
	GHashTable* _tmp1_;
#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 1111 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthenticator* base) {
	PublishingAuthenticatorShotwellGoogleGoogle * self;
	PublishingAuthenticatorShotwellGoogleSession* _tmp0_;
	SpitPublishingPluginHost* _tmp1_;
#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 1129 "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 1137 "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 1144 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	gchar* user_authorization_url = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp27_;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp28_;
	SpitPublishingPluginHost* _tmp29_;
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp30_;
#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 1283 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code) {
	PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp0_;
	guint _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
#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 1313 "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 1320 "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 1327 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_get_access_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* auth_code) {
	SpitPublishingPluginHost* _tmp0_;
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* tokens_txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	const gchar* _tmp2_;
	PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* _tmp3_;
	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 1360 "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 1368 "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 1379 "GoogleAuthenticator.c"
		}
	}
	goto __finally5;
	__catch5_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_;
		GError* _tmp5_;
#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 1400 "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 1413 "GoogleAuthenticator.c"
	}
#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (tokens_txn);
#line 1417 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingRESTSupportTransaction* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
#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 1457 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingRESTSupportTransaction* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	SpitPublishingPluginHost* _tmp7_;
	GError* _tmp8_;
#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 1503 "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 1510 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* response_body) {
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	JsonObject* response_obj = NULL;
	JsonParser* _tmp10_;
	JsonNode* _tmp11_;
	JsonObject* _tmp12_;
	JsonObject* _tmp13_;
	gboolean _tmp14_ = FALSE;
	JsonObject* _tmp15_;
	gboolean _tmp16_;
	JsonObject* _tmp22_;
	gboolean _tmp23_;
	JsonObject* _tmp29_;
	gboolean _tmp30_;
	JsonObject* _tmp36_;
	gboolean _tmp37_;
	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 1542 "GoogleAuthenticator.c"
	{
		JsonParser* _tmp1_;
		const gchar* _tmp2_;
#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 1554 "GoogleAuthenticator.c"
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		GError* _tmp8_;
		GError* _tmp9_;
#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 1599 "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 1612 "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 1630 "GoogleAuthenticator.c"
		JsonObject* _tmp17_;
		gboolean _tmp18_;
#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 1639 "GoogleAuthenticator.c"
	} else {
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_tmp14_ = FALSE;
#line 1643 "GoogleAuthenticator.c"
	}
#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp14_) {
#line 1647 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp19_;
		GError* _tmp20_;
		GError* _tmp21_;
#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 1667 "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 1675 "GoogleAuthenticator.c"
		gint64 duration = 0LL;
		JsonObject* _tmp24_;
		gint64 _tmp25_;
		gint64 abs_time = 0LL;
		gint64 _tmp26_;
		gint64 _tmp27_;
		gint64 _tmp28_;
#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 1699 "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 1707 "GoogleAuthenticator.c"
		gchar* refresh_token = NULL;
		JsonObject* _tmp31_;
		const gchar* _tmp32_;
		gchar* _tmp33_;
		const gchar* _tmp34_;
#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 1725 "GoogleAuthenticator.c"
			const gchar* _tmp35_;
#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 1731 "GoogleAuthenticator.c"
		}
#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (refresh_token);
#line 1735 "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 1743 "GoogleAuthenticator.c"
		gchar* access_token = NULL;
		JsonObject* _tmp38_;
		const gchar* _tmp39_;
		gchar* _tmp40_;
		const gchar* _tmp41_;
#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 1761 "GoogleAuthenticator.c"
			const gchar* _tmp42_;
#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 1767 "GoogleAuthenticator.c"
		}
#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (access_token);
#line 1771 "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 1777 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) {
	const gchar* _tmp0_;
	GHashTable* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	GVariant* _tmp4_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
#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 1820 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, gint64 abs_time) {
	gint64 _tmp0_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	gint64 _tmp2_;
	GHashTable* _tmp3_;
	gchar* _tmp4_;
	gint64 _tmp5_;
	GVariant* _tmp6_;
#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 1856 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) {
	const gchar* _tmp0_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GHashTable* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	GVariant* _tmp7_;
#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 1901 "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 1908 "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 1915 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_;
	SpitPublishingPluginHost* _tmp1_;
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp2_;
	PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* _tmp3_;
	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 1948 "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 1954 "GoogleAuthenticator.c"
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp4_;
		GError* _tmp5_;
#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 1976 "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 1989 "GoogleAuthenticator.c"
	}
#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 1993 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingRESTSupportTransaction* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
#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 2033 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	SpitPublishingPluginHost* _tmp4_;
	GError* _tmp5_;
#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 2068 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_extract_username (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* response_body) {
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	JsonObject* response_obj = NULL;
	JsonParser* _tmp10_;
	JsonNode* _tmp11_;
	JsonObject* _tmp12_;
	JsonObject* _tmp13_;
	JsonObject* _tmp14_;
	gboolean _tmp15_;
	JsonObject* _tmp24_;
	gboolean _tmp25_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp34_;
	gboolean _tmp35_;
	SpitPublishingPluginHost* _tmp36_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp37_;
	const gchar* _tmp38_;
	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 2100 "GoogleAuthenticator.c"
	{
		JsonParser* _tmp1_;
		const gchar* _tmp2_;
#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 2112 "GoogleAuthenticator.c"
			goto __catch8_g_error;
		}
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		GError* _tmp8_;
		GError* _tmp9_;
#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 2157 "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 2170 "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 2188 "GoogleAuthenticator.c"
		gchar* username = NULL;
		JsonObject* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		const gchar* _tmp19_;
#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 2206 "GoogleAuthenticator.c"
			GHashTable* _tmp20_;
			gchar* _tmp21_;
			const gchar* _tmp22_;
			GVariant* _tmp23_;
#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 2223 "GoogleAuthenticator.c"
		}
#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (username);
#line 2227 "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 2235 "GoogleAuthenticator.c"
		gchar* access_token = NULL;
		JsonObject* _tmp26_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
		const gchar* _tmp29_;
#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 2253 "GoogleAuthenticator.c"
			GHashTable* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			GVariant* _tmp33_;
#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 2270 "GoogleAuthenticator.c"
		}
#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
		_g_free0 (access_token);
#line 2274 "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 2296 "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 2303 "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 2310 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_;
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* txn = NULL;
	PublishingAuthenticatorShotwellGoogleSession* _tmp1_;
	PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* _tmp2_;
	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 2338 "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 2346 "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 2357 "GoogleAuthenticator.c"
		}
	}
	goto __finally9;
	__catch9_spit_publishing_publishing_error:
	{
		GError* err = NULL;
		SpitPublishingPluginHost* _tmp3_;
		GError* _tmp4_;
#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 2378 "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 2391 "GoogleAuthenticator.c"
	}
#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	_publishing_rest_support_transaction_unref0 (txn);
#line 2395 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp4_;
	gboolean _tmp5_;
	PublishingRESTSupportTransaction* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
#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 2435 "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 2447 "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 2459 "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 2468 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) {
	PublishingRESTSupportTransaction* _tmp0_;
	guint _tmp1_;
	PublishingRESTSupportTransaction* _tmp2_;
	guint _tmp3_;
	PublishingAuthenticatorShotwellGoogleSession* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_ = FALSE;
	PublishingRESTSupportTransaction* _tmp7_;
	guint _tmp8_;
	SpitPublishingPluginHost* _tmp12_;
	GError* _tmp13_;
#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 2510 "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 2520 "GoogleAuthenticator.c"
	} else {
		PublishingRESTSupportTransaction* _tmp9_;
		guint _tmp10_;
#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 2530 "GoogleAuthenticator.c"
	}
#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
	if (_tmp6_) {
#line 2534 "GoogleAuthenticator.c"
		SpitPublishingPluginHost* _tmp11_;
#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 2542 "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 2550 "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 2557 "GoogleAuthenticator.c"
}


static void publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (PublishingAuthenticatorShotwellGoogleGoogle* self) {
	SpitPublishingPluginHost* _tmp0_;
	const gchar* _tmp1_;
#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 2574 "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 2585 "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 2596 "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 2613 "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 2632 "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 2654 "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;
}



