/* GoogleAuthenticator.c generated by valac 0.40.4, the Vala compiler * generated from GoogleAuthenticator.vala, do not modify */ #include #include #include #include #include "shotwell-plugin-common.h" #include #include "shotwell-plugin-dev-1.0.h" #include #include #include #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; enum { PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_0_PROPERTY, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES }; static GParamSpec* publishing_authenticator_shotwell_google_web_authentication_pane_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES]; #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_NUM_SIGNALS }; static guint publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_SIGNALS] = {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; enum { PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_0_PROPERTY, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_NUM_PROPERTIES }; static GParamSpec* publishing_authenticator_shotwell_google_google_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_NUM_PROPERTIES]; #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; 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; 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; #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; #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; #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)) 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; #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" self = (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane*) g_object_new (object_type, "login-uri", auth_sequence_start_url, NULL); #line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; #line 305 "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 314 "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 329 "GoogleAuthenticator.c" } static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) { gint result = 0; gchar* _result_ = NULL; gchar* _tmp0_; gchar* _tmp1_; #line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); #line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (needle != NULL, 0); #line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle); #line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _result_ = _tmp0_; #line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = _result_; #line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp1_ != NULL) { #line 354 "GoogleAuthenticator.c" gchar* _tmp2_; #line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp2_ = _result_; #line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = (gint) (_tmp2_ - ((gchar*) self)); #line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; #line 362 "GoogleAuthenticator.c" } else { #line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; #line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; #line 368 "GoogleAuthenticator.c" } } static glong string_strnlen (gchar* str, glong maxlen) { glong result = 0L; gchar* end = NULL; gchar* _tmp0_; gchar* _tmp1_; #line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = memchr (str, 0, (gsize) maxlen); #line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" end = _tmp0_; #line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = end; #line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp1_ == NULL) { #line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = maxlen; #line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; #line 393 "GoogleAuthenticator.c" } else { gchar* _tmp2_; #line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp2_ = end; #line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = (glong) (_tmp2_ - str); #line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; #line 402 "GoogleAuthenticator.c" } } static gchar* string_substring (const gchar* self, glong offset, glong len) { gchar* result = NULL; glong string_length = 0L; gboolean _tmp0_ = FALSE; glong _tmp6_; gchar* _tmp7_; #line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); #line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (offset >= ((glong) 0)) { #line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = len >= ((glong) 0); #line 423 "GoogleAuthenticator.c" } else { #line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = FALSE; #line 427 "GoogleAuthenticator.c" } #line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp0_) { #line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" string_length = string_strnlen ((gchar*) self, offset + len); #line 433 "GoogleAuthenticator.c" } else { gint _tmp1_; gint _tmp2_; #line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = strlen (self); #line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp2_ = _tmp1_; #line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" string_length = (glong) _tmp2_; #line 443 "GoogleAuthenticator.c" } #line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (offset < ((glong) 0)) { #line 447 "GoogleAuthenticator.c" glong _tmp3_; #line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp3_ = string_length; #line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" offset = _tmp3_ + offset; #line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (offset >= ((glong) 0), NULL); #line 455 "GoogleAuthenticator.c" } else { glong _tmp4_; #line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp4_ = string_length; #line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (offset <= _tmp4_, NULL); #line 462 "GoogleAuthenticator.c" } #line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (len < ((glong) 0)) { #line 466 "GoogleAuthenticator.c" glong _tmp5_; #line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp5_ = string_length; #line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" len = _tmp5_ - offset; #line 472 "GoogleAuthenticator.c" } #line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp6_ = string_length; #line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail ((offset + len) <= _tmp6_, NULL); #line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len); #line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = _tmp7_; #line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; #line 484 "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_; #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" if (string_index_of (_tmp5_, "state=connect", 0) > 0) { #line 519 "GoogleAuthenticator.c" gint auth_code_field_start = 0; const gchar* _tmp6_; gint _tmp7_; gchar* auth_code = NULL; const gchar* _tmp8_; gint _tmp9_; gchar* _tmp10_; const gchar* _tmp11_; #line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = page_title; #line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" auth_code_field_start = string_index_of (_tmp6_, "code=", 0); #line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = auth_code_field_start; #line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp7_ < 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 540 "GoogleAuthenticator.c" } #line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = page_title; #line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp9_ = auth_code_field_start; #line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp10_ = string_substring (_tmp8_, (glong) (_tmp9_ + 5), (glong) -1); #line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" auth_code = _tmp10_; #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" _tmp11_ = 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, _tmp11_); #line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (auth_code); #line 558 "GoogleAuthenticator.c" } #line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (page_title); #line 562 "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 577 "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 595 "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 627 "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 646 "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 658 "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 667 "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 680 "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 693 "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 709 "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; #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" self = (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, 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" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "code", auth_code); #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 751 "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 761 "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 770 "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; const gchar* _tmp0_; #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" self = (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, 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" _tmp0_ = session->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", _tmp0_); #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 816 "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 825 "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 834 "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; const gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; #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" self = (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, 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" _tmp0_ = session->access_token; #line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_strconcat ("Bearer ", _tmp0_, NULL); #line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = _tmp1_; #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", _tmp2_); #line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp2_); #line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; #line 882 "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 891 "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 900 "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 929 "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 938 "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 947 "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_; GHashFunc _tmp1_; GEqualFunc _tmp2_; GHashTable* _tmp3_; gchar* _tmp4_; PublishingAuthenticatorShotwellGoogleSession* _tmp5_; gchar* _tmp6_; #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_ = _g_object_ref0 (host); #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 = _tmp0_; #line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_str_hash; #line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_str_equal; #line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _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 = _tmp3_; #line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = g_strdup (scope); #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 = _tmp4_; #line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = 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 = _tmp5_; #line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = g_strdup (welcome_message); #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 = _tmp6_; #line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; #line 1009 "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 1020 "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_; #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 1045 "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 1051 "GoogleAuthenticator.c" } else { #line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = FALSE; #line 1055 "GoogleAuthenticator.c" } #line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp2_) { #line 1059 "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 1071 "GoogleAuthenticator.c" } #line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty ()) { #line 1075 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp6_; SpitPublishingPluginHost* _tmp7_; #line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = self->priv->host; #line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_set_service_locked (_tmp6_, FALSE); #line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = self->priv->host; #line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_install_static_message_pane (_tmp7_, _ ("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 1086 "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 1090 "GoogleAuthenticator.c" } #line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (refresh_token); #line 1094 "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 1109 "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 1118 "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 1139 "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 1159 "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 1169 "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 1180 "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 1321 "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_; #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" g_debug ("GoogleAuthenticator.vala:163: EVENT: user authorized scope %s with aut" \ "h_code %s", _tmp2_, auth_code); #line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_get_access_tokens (self, auth_code); #line 1348 "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 1358 "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 1369 "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_; PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* _tmp2_; 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_ = publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (_tmp1_, auth_code); #line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" tokens_txn = _tmp2_; #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 1402 "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 1410 "GoogleAuthenticator.c" goto __catch3_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 1421 "GoogleAuthenticator.c" } } goto __finally3; __catch3_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp3_; GError* _tmp4_; #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" _tmp3_ = self->priv->host; #line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = err; #line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp3_, _tmp4_); #line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); #line 1442 "GoogleAuthenticator.c" } __finally3: #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 1455 "GoogleAuthenticator.c" } #line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (tokens_txn); #line 1459 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) { guint _tmp0_; guint _tmp1_; gchar* _tmp2_; gchar* _tmp3_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_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" _tmp2_ = publishing_rest_support_transaction_get_response (txn); #line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; #line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp3_); #line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); #line 1493 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) { guint _tmp0_; guint _tmp1_; gchar* _tmp2_; gchar* _tmp3_; SpitPublishingPluginHost* _tmp4_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_error_publishing_rest_support_transaction_network_error, self); #line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = publishing_rest_support_transaction_get_response (txn); #line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; #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'", _tmp3_); #line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); #line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = self->priv->host; #line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp4_, err); #line 1531 "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 1540 "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* _tmp9_; JsonNode* _tmp10_; JsonObject* _tmp11_; JsonObject* _tmp12_; gboolean _tmp13_ = FALSE; JsonObject* _tmp14_; JsonObject* _tmp19_; JsonObject* _tmp23_; JsonObject* _tmp29_; 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 1571 "GoogleAuthenticator.c" { JsonParser* _tmp1_; #line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = parser; #line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" json_parser_load_from_data (_tmp1_, response_body, (gssize) -1, &_inner_error_); #line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1580 "GoogleAuthenticator.c" goto __catch4_g_error; } } goto __finally4; __catch4_g_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp2_; GError* _tmp3_; const gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; GError* _tmp7_; GError* _tmp8_; #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" _tmp2_ = self->priv->host; #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = err; #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_->message; #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = g_strconcat ("Couldn't parse JSON response: ", _tmp4_, NULL); #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = _tmp5_; #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp6_); #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = _tmp7_; #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp2_, _tmp8_); #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp8_); #line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp6_); #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 1625 "GoogleAuthenticator.c" } __finally4: #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 1638 "GoogleAuthenticator.c" } #line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp9_ = parser; #line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp10_ = json_parser_get_root (_tmp9_); #line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp11_ = json_node_get_object (_tmp10_); #line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp12_ = _json_object_ref0 (_tmp11_); #line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" response_obj = _tmp12_; #line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp14_ = response_obj; #line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (!json_object_has_member (_tmp14_, "access_token")) { #line 1654 "GoogleAuthenticator.c" JsonObject* _tmp15_; #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" _tmp13_ = !json_object_has_member (_tmp15_, "refresh_token"); #line 1660 "GoogleAuthenticator.c" } else { #line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp13_ = FALSE; #line 1664 "GoogleAuthenticator.c" } #line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp13_) { #line 1668 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp16_; GError* _tmp17_; GError* _tmp18_; #line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp16_ = self->priv->host; #line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp17_ = 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" _tmp18_ = _tmp17_; #line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp16_, _tmp18_); #line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp18_); #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 1688 "GoogleAuthenticator.c" } #line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp19_ = response_obj; #line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp19_, "expires_in")) { #line 1694 "GoogleAuthenticator.c" gint64 duration = 0LL; JsonObject* _tmp20_; gint64 abs_time = 0LL; gint64 _tmp21_; gint64 _tmp22_; #line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp20_ = response_obj; #line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" duration = json_object_get_int_member (_tmp20_, "expires_in"); #line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp21_ = duration; #line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" abs_time = g_get_real_time () + ((_tmp21_ * 1000L) * 1000L); #line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp22_ = abs_time; #line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (self, _tmp22_); #line 1712 "GoogleAuthenticator.c" } #line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp23_ = response_obj; #line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp23_, "refresh_token")) { #line 1718 "GoogleAuthenticator.c" gchar* refresh_token = NULL; JsonObject* _tmp24_; const gchar* _tmp25_; gchar* _tmp26_; const gchar* _tmp27_; #line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp24_ = response_obj; #line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp25_ = json_object_get_string_member (_tmp24_, "refresh_token"); #line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp26_ = g_strdup (_tmp25_); #line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" refresh_token = _tmp26_; #line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp27_ = refresh_token; #line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp27_, "") != 0) { #line 1736 "GoogleAuthenticator.c" const gchar* _tmp28_; #line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp28_ = refresh_token; #line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_on_refresh_token_available (self, _tmp28_); #line 1742 "GoogleAuthenticator.c" } #line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (refresh_token); #line 1746 "GoogleAuthenticator.c" } #line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp29_ = response_obj; #line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp29_, "access_token")) { #line 1752 "GoogleAuthenticator.c" gchar* access_token = NULL; JsonObject* _tmp30_; const gchar* _tmp31_; gchar* _tmp32_; const gchar* _tmp33_; #line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp30_ = response_obj; #line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp31_ = json_object_get_string_member (_tmp30_, "access_token"); #line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp32_ = g_strdup (_tmp31_); #line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" access_token = _tmp32_; #line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp33_ = access_token; #line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp33_, "") != 0) { #line 1770 "GoogleAuthenticator.c" const gchar* _tmp34_; #line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp34_ = access_token; #line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_on_access_token_available (self, _tmp34_); #line 1776 "GoogleAuthenticator.c" } #line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (access_token); #line 1780 "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 1786 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) { GHashTable* _tmp0_; gchar* _tmp1_; GVariant* _tmp2_; PublishingAuthenticatorShotwellGoogleSession* _tmp3_; gchar* _tmp4_; #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" g_debug ("GoogleAuthenticator.vala:248: EVENT: an OAuth refresh token has become" \ " available; token = '%s'.", token); #line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->params; #line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_strdup ("RefreshToken"); #line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_variant_new_string (token); #line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_variant_ref_sink (_tmp2_); #line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp0_, _tmp1_, _tmp2_); #line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = self->priv->session; #line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = g_strdup (token); #line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_->refresh_token); #line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_->refresh_token = _tmp4_; #line 1823 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, gint64 abs_time) { PublishingAuthenticatorShotwellGoogleSession* _tmp0_; GHashTable* _tmp1_; gchar* _tmp2_; GVariant* _tmp3_; #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" g_debug ("EVENT: an OAuth access token expiry time became available; time = %'" G_GINT64_FORMAT "'.", abs_time); #line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->session; #line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_->expires_at = abs_time; #line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->params; #line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_strdup ("ExpiryTime"); #line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = g_variant_new_int64 (abs_time); #line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_variant_ref_sink (_tmp3_); #line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp1_, _tmp2_, _tmp3_); #line 1853 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, const gchar* token) { PublishingAuthenticatorShotwellGoogleSession* _tmp0_; gchar* _tmp1_; GHashTable* _tmp2_; gchar* _tmp3_; GVariant* _tmp4_; #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" g_debug ("GoogleAuthenticator.vala:264: EVENT: an OAuth access token has become " \ "available; token = '%s'.", token); #line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->session; #line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_strdup (token); #line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp0_->access_token); #line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_->access_token = _tmp1_; #line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->params; #line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = g_strdup ("AccessToken"); #line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = g_variant_new_string (token); #line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_variant_ref_sink (_tmp4_); #line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp2_, _tmp3_, _tmp4_); #line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_fetch_username (self); #line 1892 "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 1902 "GoogleAuthenticator.c" } static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { #line 280 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error ((PublishingAuthenticatorShotwellGoogleGoogle*) self, _sender, err); #line 1913 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self) { SpitPublishingPluginHost* _tmp0_; 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 __catch5_g_error; } } goto __finally5; __catch5_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" } __finally5: #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) { guint _tmp0_; guint _tmp1_; gchar* _tmp2_; gchar* _tmp3_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_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" _tmp2_ = publishing_rest_support_transaction_get_response (txn); #line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; #line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_extract_username (self, _tmp3_); #line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); #line 2027 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) { guint _tmp0_; guint _tmp1_; SpitPublishingPluginHost* _tmp2_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 300 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_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" _tmp2_ = self->priv->host; #line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp2_, err); #line 2057 "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* _tmp9_; JsonNode* _tmp10_; JsonObject* _tmp11_; JsonObject* _tmp12_; JsonObject* _tmp13_; JsonObject* _tmp22_; PublishingAuthenticatorShotwellGoogleSession* _tmp31_; SpitPublishingPluginHost* _tmp32_; PublishingAuthenticatorShotwellGoogleSession* _tmp33_; const gchar* _tmp34_; 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 2089 "GoogleAuthenticator.c" { JsonParser* _tmp1_; #line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = parser; #line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" json_parser_load_from_data (_tmp1_, response_body, (gssize) -1, &_inner_error_); #line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 2098 "GoogleAuthenticator.c" goto __catch6_g_error; } } goto __finally6; __catch6_g_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp2_; GError* _tmp3_; const gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; GError* _tmp7_; GError* _tmp8_; #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" _tmp2_ = self->priv->host; #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = err; #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_->message; #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = g_strconcat ("Couldn't parse JSON response: ", _tmp4_, NULL); #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = _tmp5_; #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp6_); #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = _tmp7_; #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp2_, _tmp8_); #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp8_); #line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp6_); #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 2143 "GoogleAuthenticator.c" } __finally6: #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 2156 "GoogleAuthenticator.c" } #line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp9_ = parser; #line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp10_ = json_parser_get_root (_tmp9_); #line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp11_ = json_node_get_object (_tmp10_); #line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp12_ = _json_object_ref0 (_tmp11_); #line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" response_obj = _tmp12_; #line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp13_ = response_obj; #line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp13_, "name")) { #line 2172 "GoogleAuthenticator.c" gchar* username = NULL; JsonObject* _tmp14_; const gchar* _tmp15_; gchar* _tmp16_; const gchar* _tmp17_; #line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp14_ = response_obj; #line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp15_ = json_object_get_string_member (_tmp14_, "name"); #line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp16_ = g_strdup (_tmp15_); #line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" username = _tmp16_; #line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp17_ = username; #line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp17_, "") != 0) { #line 2190 "GoogleAuthenticator.c" GHashTable* _tmp18_; gchar* _tmp19_; const gchar* _tmp20_; GVariant* _tmp21_; #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp18_ = self->priv->params; #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp19_ = g_strdup ("UserName"); #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp20_ = username; #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp21_ = g_variant_new_string (_tmp20_); #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_variant_ref_sink (_tmp21_); #line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp18_, _tmp19_, _tmp21_); #line 2207 "GoogleAuthenticator.c" } #line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (username); #line 2211 "GoogleAuthenticator.c" } #line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp22_ = response_obj; #line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp22_, "access_token")) { #line 2217 "GoogleAuthenticator.c" gchar* access_token = NULL; JsonObject* _tmp23_; const gchar* _tmp24_; gchar* _tmp25_; const gchar* _tmp26_; #line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp23_ = response_obj; #line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp24_ = json_object_get_string_member (_tmp23_, "access_token"); #line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp25_ = g_strdup (_tmp24_); #line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" access_token = _tmp25_; #line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp26_ = access_token; #line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp26_, "") != 0) { #line 2235 "GoogleAuthenticator.c" GHashTable* _tmp27_; gchar* _tmp28_; const gchar* _tmp29_; GVariant* _tmp30_; #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp27_ = self->priv->params; #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp28_ = g_strdup ("AccessToken"); #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp29_ = access_token; #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp30_ = g_variant_new_string (_tmp29_); #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_variant_ref_sink (_tmp30_); #line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); #line 2252 "GoogleAuthenticator.c" } #line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (access_token); #line 2256 "GoogleAuthenticator.c" } #line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp31_ = self->priv->session; #line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _vala_assert (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)), "session.is_authenticated()"); #line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp32_ = self->priv->host; #line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp33_ = self->priv->session; #line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp34_ = _tmp33_->refresh_token; #line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", _tmp34_); #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 2276 "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 2286 "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 2297 "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 2327 "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 2335 "GoogleAuthenticator.c" goto __catch7_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 2346 "GoogleAuthenticator.c" } } goto __finally7; __catch7_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 2367 "GoogleAuthenticator.c" } __finally7: #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 2380 "GoogleAuthenticator.c" } #line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); #line 2384 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn) { guint _tmp0_; guint _tmp1_; PublishingAuthenticatorShotwellGoogleSession* _tmp2_; gchar* _tmp3_; gchar* _tmp4_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_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" _tmp2_ = self->priv->session; #line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession))) { #line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; #line 2417 "GoogleAuthenticator.c" } #line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = publishing_rest_support_transaction_get_response (txn); #line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_; #line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp4_); #line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp4_); #line 2427 "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 2441 "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 2452 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, PublishingRESTSupportTransaction* txn, GError* err) { guint _tmp0_; guint _tmp1_; PublishingAuthenticatorShotwellGoogleSession* _tmp2_; gboolean _tmp3_ = FALSE; SpitPublishingPluginHost* _tmp5_; #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" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); #line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); #line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_signal_handlers_disconnect_matched (txn, 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_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" _tmp2_ = self->priv->session; #line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession))) { #line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; #line 2486 "GoogleAuthenticator.c" } #line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (publishing_rest_support_transaction_get_status_code (txn) == ((guint) SOUP_STATUS_BAD_REQUEST)) { #line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = TRUE; #line 2492 "GoogleAuthenticator.c" } else { #line 386 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = publishing_rest_support_transaction_get_status_code (txn) == ((guint) SOUP_STATUS_UNAUTHORIZED); #line 2496 "GoogleAuthenticator.c" } #line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp3_) { #line 2500 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp4_; #line 388 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = 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 (_tmp4_, 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 2508 "GoogleAuthenticator.c" } #line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = self->priv->host; #line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp5_, err); #line 2514 "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 2523 "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 2542 "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 2555 "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 2568 "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 2587 "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 2608 "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 2632 "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; }