diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/authenticator/shotwell/GoogleAuthenticator.c | 1969 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/GoogleAuthenticator.vala | 53 |
2 files changed, 1051 insertions, 971 deletions
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.c b/plugins/authenticator/shotwell/GoogleAuthenticator.c index 644ee53..2b09bab 100644 --- a/plugins/authenticator/shotwell/GoogleAuthenticator.c +++ b/plugins/authenticator/shotwell/GoogleAuthenticator.c @@ -9,9 +9,10 @@ #include <string.h> #include "shotwell-plugin-common.h" #include <webkit2/webkit2.h> +#include <libsoup/soup.h> +#include <gio/gio.h> #include "shotwell-plugin-dev-1.0.h" #include <glib/gi18n-lib.h> -#include <libsoup/soup.h> #include <json-glib/json-glib.h> @@ -30,9 +31,12 @@ enum { 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)) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define __vala_SoupURI_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupURI_free (var), NULL))) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_SIGNALS }; @@ -97,7 +101,6 @@ enum { 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))) @@ -116,6 +119,10 @@ struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass { ShotwellPluginsCommonWebAuthenticationPaneClass parent_class; }; +struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate { + gchar* auth_code; +}; + struct _PublishingAuthenticatorShotwellGoogleSession { PublishingRESTSupportSession parent_instance; PublishingAuthenticatorShotwellGoogleSessionPrivate * priv; @@ -186,13 +193,25 @@ static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_goog #define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID "534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67.apps.googleusercontent.c" \ "om" +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REVERSE_CLIENT_ID "com.googleusercontent.apps.534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav" \ +"67" #define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_SECRET "pwpzZ7W1TCcD5uIfYCu8sM7x" +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CALLBACK_URI PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REVERSE_CLIENT_ID ":/auth-callback" GType publishing_authenticator_shotwell_google_web_authentication_pane_get_type (void) G_GNUC_CONST; +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate)) +static void publishing_authenticator_shotwell_google_web_authentication_pane_real_constructed (GObject* base); +static void publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* self, + WebKitURISchemeRequest* request); +static void _publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, + gpointer self); +static void publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base); +static void _vala_SoupURI_free (SoupURI* self); +static guint8* _vala_array_dup2 (guint8* self, + int length); 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); @@ -291,197 +310,56 @@ static void _publishing_authenticator_shotwell_google_google_on_service_welcome_ 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) +static gpointer +_g_object_ref0 (gpointer self) { - 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" +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + return self ? g_object_ref (self) : NULL; +#line 317 "GoogleAuthenticator.c" } -static gint -string_index_of (const gchar* self, - const gchar* needle, - gint start_index) +static void +_publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, + gpointer self) { - 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" - } +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb ((PublishingAuthenticatorShotwellGoogleWebAuthenticationPane*) self, request); +#line 327 "GoogleAuthenticator.c" } -static glong -string_strnlen (gchar* str, - glong maxlen) +static void +publishing_authenticator_shotwell_google_web_authentication_pane_real_constructed (GObject* base) { - 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" - } + PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self; + WebKitWebContext* ctx = NULL; + WebKitWebContext* _tmp0_; + WebKitWebContext* _tmp1_; +#line 16 "/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 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + G_OBJECT_CLASS (publishing_authenticator_shotwell_google_web_authentication_pane_parent_class)->constructed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane), G_TYPE_OBJECT, GObject)); +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp0_ = webkit_web_context_get_default (); +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + ctx = _tmp1_; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + webkit_web_context_register_uri_scheme (ctx, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REVERSE_CLIENT_ID, _publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback, g_object_ref (self), g_object_unref); +#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_object_unref0 (ctx); +#line 352 "GoogleAuthenticator.c" } -static gchar* -string_substring (const gchar* self, - glong offset, - glong len) +static void +_vala_SoupURI_free (SoupURI* self) { - 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" +#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_boxed_free (soup_uri_get_type (), self); +#line 361 "GoogleAuthenticator.c" } @@ -489,98 +367,288 @@ static void publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) { PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self; - gchar* page_title = NULL; + SoupURI* uri = 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" + SoupURI* _tmp3_; + SoupURI* _tmp4_; + gboolean _tmp5_ = FALSE; + SoupURI* _tmp6_; + const gchar* _tmp7_; + const gchar* _tmp9_; +#line 23 "/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" +#line 24 "/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" +#line 24 "/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" +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp2_ = webkit_web_view_get_uri (_tmp1_); +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp3_ = soup_uri_new (_tmp2_); +#line 24 "/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; + _g_object_unref0 (_tmp1_); #line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - auth_code_field_start = string_index_of (_tmp6_, "code=", 0); + uri = _tmp4_; #line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp7_ = auth_code_field_start; + _tmp6_ = uri; #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); + _tmp7_ = _tmp6_->scheme; +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + if (g_strcmp0 (_tmp7_, PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REVERSE_CLIENT_ID) == 0) { +#line 401 "GoogleAuthenticator.c" + const gchar* _tmp8_; +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp8_ = self->priv->auth_code; +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp5_ = _tmp8_ == NULL; +#line 407 "GoogleAuthenticator.c" + } else { +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp5_ = FALSE; +#line 411 "GoogleAuthenticator.c" + } +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + if (_tmp5_) { #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_; + g_signal_emit (self, publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL], 0); +#line 417 "GoogleAuthenticator.c" + } +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp9_ = self->priv->auth_code; +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + if (_tmp9_ != NULL) { +#line 423 "GoogleAuthenticator.c" + const gchar* _tmp10_; +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp10_ = self->priv->auth_code; #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_); + g_signal_emit (self, publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL], 0, _tmp10_); +#line 429 "GoogleAuthenticator.c" + } #line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (auth_code); -#line 558 "GoogleAuthenticator.c" + __vala_SoupURI_free0 (uri); +#line 433 "GoogleAuthenticator.c" +} + + +static guint8* +string_get_data (const gchar* self, + int* result_length1) +{ + guint8* result; + guint8* res = NULL; + gint res_length1; + gint _res_size_; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; +#line 1442 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + res = (guint8*) self; +#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + res_length1 = -1; +#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _res_size_ = res_length1; +#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + res_length1 = (gint) _tmp1_; +#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = res_length1; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = res; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3__length1 = res_length1; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4__length1 = _tmp3__length1; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (result_length1) { +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + *result_length1 = _tmp4__length1; +#line 480 "GoogleAuthenticator.c" } -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (page_title); -#line 562 "GoogleAuthenticator.c" +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + return result; +#line 486 "GoogleAuthenticator.c" +} + + +static guint8* +_vala_array_dup2 (guint8* self, + int length) +{ +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + return g_memdup (self, length * sizeof (guint8)); +#line 496 "GoogleAuthenticator.c" +} + + +static void +publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* self, + WebKitURISchemeRequest* request) +{ + SoupURI* uri = NULL; + const gchar* _tmp0_; + SoupURI* _tmp1_; + const gchar* _tmp2_; + GHashTable* form_data = NULL; + const gchar* _tmp3_; + GHashTable* _tmp4_; + gconstpointer _tmp5_; + gchar* _tmp6_; + gchar* response = NULL; + gchar* _tmp7_; + GMemoryInputStream* mins = NULL; + guint8* _tmp8_; + gint _tmp8__length1; + guint8* _tmp9_; + gint _tmp9__length1; + guint8* _tmp10_; + gint _tmp10__length1; + GMemoryInputStream* _tmp11_; +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_WEB_AUTHENTICATION_PANE (self)); +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_return_if_fail (WEBKIT_IS_URI_SCHEME_REQUEST (request)); +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp0_ = webkit_uri_scheme_request_get_uri (request); +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp1_ = soup_uri_new (_tmp0_); +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + uri = _tmp1_; +#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp2_ = webkit_uri_scheme_request_get_uri (request); +#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:36: URI: %s", _tmp2_); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp3_ = uri->query; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp4_ = soup_form_decode (_tmp3_); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + form_data = _tmp4_; +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp5_ = g_hash_table_lookup (form_data, "code"); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp6_ = g_strdup ((const gchar*) _tmp5_); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_free0 (self->priv->auth_code); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + self->priv->auth_code = _tmp6_; +#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp7_ = g_strdup (""); +#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + response = _tmp7_; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp8_ = string_get_data (response, &_tmp8__length1); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp9_ = _tmp8_; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp9__length1 = _tmp8__length1; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup2 (_tmp9_, _tmp9__length1) : ((gpointer) _tmp9_); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp10__length1 = _tmp9__length1; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp11_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp10_, _tmp10__length1, NULL); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + mins = _tmp11_; +#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + webkit_uri_scheme_request_finish (request, G_TYPE_CHECK_INSTANCE_CAST (mins, g_input_stream_get_type (), GInputStream), (gint64) -1, "text/plain"); +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_object_unref0 (mins); +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_free0 (response); +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_hash_table_unref0 (form_data); +#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + __vala_SoupURI_free0 (uri); +#line 579 "GoogleAuthenticator.c" +} + + +PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* +publishing_authenticator_shotwell_google_web_authentication_pane_construct (GType object_type, + const gchar* auth_sequence_start_url) +{ + PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self = NULL; +#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_return_val_if_fail (auth_sequence_start_url != NULL, NULL); +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + self = (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane*) g_object_new (object_type, "login-uri", auth_sequence_start_url, NULL); +#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + return self; +#line 594 "GoogleAuthenticator.c" +} + + +PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* +publishing_authenticator_shotwell_google_web_authentication_pane_new (const gchar* auth_sequence_start_url) +{ +#line 47 "/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 603 "GoogleAuthenticator.c" +} + + +gboolean +publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty (void) +{ + gboolean result = FALSE; + gboolean _tmp0_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp0_ = publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + result = _tmp0_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + return result; +#line 618 "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" +#line 10 "/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" +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate)); +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + ((GObjectClass *) klass)->constructed = (void (*) (GObject *)) publishing_authenticator_shotwell_google_web_authentication_pane_real_constructed; +#line 10 "/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" +#line 10 "/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" +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL] = g_signal_new ("error", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 10 "/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" +#line 639 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_web_authentication_pane_instance_init (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self) { +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self); +#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + self->priv->auth_code = NULL; +#line 650 "GoogleAuthenticator.c" } @@ -588,11 +656,13 @@ 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" +#line 10 "/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" +#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _g_free0 (self->priv->auth_code); +#line 10 "/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" +#line 664 "GoogleAuthenticator.c" } @@ -616,34 +686,34 @@ publishing_authenticator_shotwell_google_session_real_is_authenticated (Publishi PublishingAuthenticatorShotwellGoogleSession * self; gboolean result = FALSE; const gchar* _tmp0_; -#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 61 "/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" +#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->access_token; -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" result = _tmp0_ != NULL; -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return result; -#line 627 "GoogleAuthenticator.c" +#line 696 "GoogleAuthenticator.c" } void publishing_authenticator_shotwell_google_session_deauthenticate (PublishingAuthenticatorShotwellGoogleSession* self) { -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 65 "/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" +#line 66 "/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" +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->access_token = NULL; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 67 "/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" +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->refresh_token = NULL; -#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->expires_at = (gint64) -1; -#line 646 "GoogleAuthenticator.c" +#line 715 "GoogleAuthenticator.c" } @@ -651,46 +721,46 @@ PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_construct (GType object_type) { PublishingAuthenticatorShotwellGoogleSession* self = NULL; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 56 "/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" +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; -#line 658 "GoogleAuthenticator.c" +#line 727 "GoogleAuthenticator.c" } PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_new (void) { -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 56 "/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" +#line 736 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_session_class_init (PublishingAuthenticatorShotwellGoogleSessionClass * klass) { -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 56 "/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" +#line 56 "/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" +#line 56 "/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" +#line 749 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_session_instance_init (PublishingAuthenticatorShotwellGoogleSession * self) { -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->access_token = NULL; -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->refresh_token = NULL; -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->expires_at = (gint64) -1; -#line 693 "GoogleAuthenticator.c" +#line 762 "GoogleAuthenticator.c" } @@ -698,15 +768,15 @@ static void publishing_authenticator_shotwell_google_session_finalize (PublishingRESTSupportSession * obj) { PublishingAuthenticatorShotwellGoogleSession * self; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 56 "/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" +#line 57 "/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" +#line 58 "/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" +#line 56 "/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" +#line 778 "GoogleAuthenticator.c" } @@ -730,25 +800,25 @@ publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct const gchar* auth_code) { PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* self = NULL; -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 75 "/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" +#line 75 "/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" +#line 76 "/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" +#line 78 "/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" +#line 79 "/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" +#line 80 "/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" +#line 81 "/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", PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CALLBACK_URI); +#line 82 "/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" +#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; -#line 751 "GoogleAuthenticator.c" +#line 820 "GoogleAuthenticator.c" } @@ -756,18 +826,18 @@ 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" +#line 75 "/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" +#line 830 "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" +#line 72 "/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" +#line 839 "GoogleAuthenticator.c" } @@ -797,41 +867,41 @@ publishing_authenticator_shotwell_google_refresh_access_token_transaction_constr { PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* self = NULL; const gchar* _tmp0_; -#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 89 "/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" +#line 90 "/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" +#line 92 "/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" +#line 93 "/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" +#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = session->refresh_token; -#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 94 "/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" +#line 95 "/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" +#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; -#line 816 "GoogleAuthenticator.c" +#line 885 "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" +#line 89 "/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" +#line 894 "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" +#line 86 "/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" +#line 903 "GoogleAuthenticator.c" } @@ -863,41 +933,41 @@ publishing_authenticator_shotwell_google_username_fetch_transaction_construct (G const gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 101 "/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" +#line 102 "/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" +#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = session->access_token; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 103 "/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" +#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = _tmp1_; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 103 "/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" +#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp2_); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; -#line 882 "GoogleAuthenticator.c" +#line 951 "GoogleAuthenticator.c" } PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session) { -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 101 "/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" +#line 960 "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" +#line 99 "/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" +#line 969 "GoogleAuthenticator.c" } @@ -921,30 +991,21 @@ publishing_authenticator_shotwell_google_username_fetch_transaction_get_type (vo } -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" +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" var = (g_free (var), NULL); -#line 938 "GoogleAuthenticator.c" +#line 998 "GoogleAuthenticator.c" } static void _g_variant_unref0_ (gpointer var) { -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); -#line 947 "GoogleAuthenticator.c" +#line 1007 "GoogleAuthenticator.c" } @@ -962,51 +1023,51 @@ publishing_authenticator_shotwell_google_google_construct (GType object_type, gchar* _tmp4_; PublishingAuthenticatorShotwellGoogleSession* _tmp5_; gchar* _tmp6_; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 115 "/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" +#line 115 "/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" +#line 115 "/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" +#line 115 "/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" +#line 118 "/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" +#line 118 "/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" +#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->host = _tmp0_; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_str_hash; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_str_equal; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 119 "/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" +#line 119 "/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" +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->params = _tmp3_; -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = g_strdup (scope); -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 120 "/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" +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->scope = _tmp4_; -#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 121 "/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" +#line 121 "/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" +#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->session = _tmp5_; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 122 "/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" +#line 122 "/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" +#line 122 "/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" +#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self; -#line 1009 "GoogleAuthenticator.c" +#line 1069 "GoogleAuthenticator.c" } @@ -1015,9 +1076,9 @@ 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" +#line 115 "/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" +#line 1080 "GoogleAuthenticator.c" } @@ -1030,72 +1091,72 @@ publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishin gchar* _tmp1_; gboolean _tmp2_ = FALSE; const gchar* _tmp3_; -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 125 "/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" +#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->host; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 126 "/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" +#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" refresh_token = _tmp1_; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = refresh_token; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp3_ != NULL) { -#line 1045 "GoogleAuthenticator.c" +#line 1105 "GoogleAuthenticator.c" const gchar* _tmp4_; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = refresh_token; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_strcmp0 (_tmp4_, "") != 0; -#line 1051 "GoogleAuthenticator.c" +#line 1111 "GoogleAuthenticator.c" } else { -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = FALSE; -#line 1055 "GoogleAuthenticator.c" +#line 1115 "GoogleAuthenticator.c" } -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp2_) { -#line 1059 "GoogleAuthenticator.c" +#line 1119 "GoogleAuthenticator.c" const gchar* _tmp5_; -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = refresh_token; -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 128 "/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" +#line 129 "/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" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (refresh_token); -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1071 "GoogleAuthenticator.c" +#line 1131 "GoogleAuthenticator.c" } -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty ()) { -#line 1075 "GoogleAuthenticator.c" +#line 1135 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp6_; SpitPublishingPluginHost* _tmp7_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = self->priv->host; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 135 "/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" +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = self->priv->host; -#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 137 "/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" +#line 1146 "GoogleAuthenticator.c" } else { -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 139 "/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 1150 "GoogleAuthenticator.c" } -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (refresh_token); -#line 1094 "GoogleAuthenticator.c" +#line 1154 "GoogleAuthenticator.c" } @@ -1104,22 +1165,22 @@ publishing_authenticator_shotwell_google_google_real_can_logout (SpitPublishingA { PublishingAuthenticatorShotwellGoogleGoogle * self; gboolean result = FALSE; -#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 143 "/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" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" result = TRUE; -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return result; -#line 1109 "GoogleAuthenticator.c" +#line 1169 "GoogleAuthenticator.c" } static gpointer _g_hash_table_ref0 (gpointer self) { -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self ? g_hash_table_ref (self) : NULL; -#line 1118 "GoogleAuthenticator.c" +#line 1178 "GoogleAuthenticator.c" } @@ -1130,17 +1191,17 @@ publishing_authenticator_shotwell_google_google_real_get_authentication_paramete GHashTable* result = NULL; GHashTable* _tmp0_; GHashTable* _tmp1_; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 147 "/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" +#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->params; -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 148 "/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" +#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" result = _tmp1_; -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return result; -#line 1139 "GoogleAuthenticator.c" +#line 1199 "GoogleAuthenticator.c" } @@ -1150,17 +1211,17 @@ publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthe PublishingAuthenticatorShotwellGoogleGoogle * self; PublishingAuthenticatorShotwellGoogleSession* _tmp0_; SpitPublishingPluginHost* _tmp1_; -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 151 "/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" +#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->session; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 152 "/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" +#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->host; -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 153 "/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" +#line 1219 "GoogleAuthenticator.c" } @@ -1168,9 +1229,9 @@ static void publishing_authenticator_shotwell_google_google_real_refresh (SpitPublishingAuthenticator* base) { PublishingAuthenticatorShotwellGoogleGoogle * self; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 156 "/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" +#line 1229 "GoogleAuthenticator.c" } @@ -1179,9 +1240,9 @@ _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_pub const gchar* auth_code, gpointer self) { -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 174 "/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" +#line 1240 "GoogleAuthenticator.c" } @@ -1220,110 +1281,110 @@ publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (Pu PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp28_; SpitPublishingPluginHost* _tmp29_; PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp30_; -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 160 "/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" \ +#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:161: 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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + _tmp0_ = soup_uri_encode (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CALLBACK_URI, NULL); +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = _tmp0_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = _tmp4_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp7_ = _tmp6_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = self->priv->scope; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp10_ = _tmp9_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp12_ = _tmp11_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp14_ = _tmp13_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp16_ = _tmp15_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp18_ = _tmp17_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp20_ = _tmp19_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp22_ = _tmp21_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp24_ = _tmp23_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/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" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp26_ = _tmp25_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp24_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp22_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp20_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp18_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp16_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp14_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp12_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp10_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp7_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp5_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp1_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" user_authorization_url = _tmp26_; -#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 173 "/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" +#line 173 "/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" +#line 173 "/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" +#line 174 "/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" +#line 174 "/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" +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp29_ = self->priv->host; -#line 157 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 176 "/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" +#line 176 "/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" +#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (user_authorization_url); -#line 1321 "GoogleAuthenticator.c" +#line 1381 "GoogleAuthenticator.c" } @@ -1334,24 +1395,24 @@ publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (Pub PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp0_; guint _tmp1_; const gchar* _tmp2_; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 179 "/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" +#line 179 "/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" +#line 180 "/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" +#line 180 "/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" +#line 180 "/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" +#line 182 "/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" \ +#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:182: EVENT: user authorized scope %s with aut" \ "h_code %s", _tmp2_, auth_code); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 184 "/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" +#line 1408 "GoogleAuthenticator.c" } @@ -1359,9 +1420,9 @@ 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" +#line 193 "/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" +#line 1418 "GoogleAuthenticator.c" } @@ -1370,9 +1431,9 @@ _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publ GError* err, gpointer self) { -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 194 "/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" +#line 1429 "GoogleAuthenticator.c" } @@ -1385,47 +1446,47 @@ publishing_authenticator_shotwell_google_google_do_get_access_tokens (Publishing PublishingAuthenticatorShotwellGoogleSession* _tmp1_; PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* _tmp2_; GError * _inner_error_ = NULL; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 187 "/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" +#line 187 "/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" \ +#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:188: ACTION: exchanging authorization code fo" \ "r access & refresh tokens"); -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->host; -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 190 "/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" +#line 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->session; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 192 "/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" +#line 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" tokens_txn = _tmp2_; -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 193 "/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" +#line 194 "/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 1462 "GoogleAuthenticator.c" { -#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 197 "/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" +#line 197 "/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" +#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 1410 "GoogleAuthenticator.c" +#line 1470 "GoogleAuthenticator.c" goto __catch3_spit_publishing_publishing_error; } -#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 197 "/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" +#line 197 "/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" +#line 197 "/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" +#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1421 "GoogleAuthenticator.c" +#line 1481 "GoogleAuthenticator.c" } } goto __finally3; @@ -1434,36 +1495,36 @@ publishing_authenticator_shotwell_google_google_do_get_access_tokens (Publishing GError* err = NULL; SpitPublishingPluginHost* _tmp3_; GError* _tmp4_; -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" err = _inner_error_; -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _inner_error_ = NULL; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = self->priv->host; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = err; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 199 "/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" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); -#line 1442 "GoogleAuthenticator.c" +#line 1502 "GoogleAuthenticator.c" } __finally3: -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 196 "/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" +#line 196 "/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" +#line 196 "/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" +#line 196 "/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" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1455 "GoogleAuthenticator.c" +#line 1515 "GoogleAuthenticator.c" } -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (tokens_txn); -#line 1459 "GoogleAuthenticator.c" +#line 1519 "GoogleAuthenticator.c" } @@ -1475,30 +1536,30 @@ publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (P guint _tmp1_; gchar* _tmp2_; gchar* _tmp3_; -#line 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 203 "/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" +#line 203 "/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" +#line 204 "/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" +#line 204 "/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" +#line 205 "/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" +#line 205 "/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" \ +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:207: %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" +#line 210 "/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" +#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; -#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 210 "/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" +#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); -#line 1493 "GoogleAuthenticator.c" +#line 1553 "GoogleAuthenticator.c" } @@ -1512,41 +1573,41 @@ publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (Publ gchar* _tmp2_; gchar* _tmp3_; SpitPublishingPluginHost* _tmp4_; -#line 194 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 213 "/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" +#line 213 "/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" +#line 215 "/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" +#line 215 "/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" +#line 216 "/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" +#line 216 "/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" +#line 218 "/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" +#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 218 "/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" +#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = self->priv->host; -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp4_, err); -#line 1531 "GoogleAuthenticator.c" +#line 1591 "GoogleAuthenticator.c" } static gpointer _json_object_ref0 (gpointer self) { -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return self ? json_object_ref (self) : NULL; -#line 1540 "GoogleAuthenticator.c" +#line 1600 "GoogleAuthenticator.c" } @@ -1567,27 +1628,27 @@ publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAut JsonObject* _tmp23_; JsonObject* _tmp29_; GError * _inner_error_ = NULL; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 224 "/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" +#line 224 "/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" \ +#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:225: ACTION: extracting OAuth tokens from bod" \ "y of server response"); -#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = json_parser_new (); -#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" parser = _tmp0_; -#line 1571 "GoogleAuthenticator.c" +#line 1631 "GoogleAuthenticator.c" { JsonParser* _tmp1_; -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = parser; -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 230 "/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" +#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1580 "GoogleAuthenticator.c" +#line 1640 "GoogleAuthenticator.c" goto __catch4_g_error; } } @@ -1602,198 +1663,198 @@ publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAut gchar* _tmp6_; GError* _tmp7_; GError* _tmp8_; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" err = _inner_error_; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _inner_error_ = NULL; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->host; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = err; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_->message; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/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" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = _tmp5_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/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" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = _tmp7_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/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" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp8_); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp6_); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1625 "GoogleAuthenticator.c" +#line 1685 "GoogleAuthenticator.c" } __finally4: -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 229 "/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" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 229 "/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" +#line 229 "/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" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1638 "GoogleAuthenticator.c" +#line 1698 "GoogleAuthenticator.c" } -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp9_ = parser; -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 237 "/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" +#line 237 "/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" +#line 237 "/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" +#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" response_obj = _tmp12_; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp14_ = response_obj; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (!json_object_has_member (_tmp14_, "access_token")) { -#line 1654 "GoogleAuthenticator.c" +#line 1714 "GoogleAuthenticator.c" JsonObject* _tmp15_; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp15_ = response_obj; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp13_ = !json_object_has_member (_tmp15_, "refresh_token"); -#line 1660 "GoogleAuthenticator.c" +#line 1720 "GoogleAuthenticator.c" } else { -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp13_ = FALSE; -#line 1664 "GoogleAuthenticator.c" +#line 1724 "GoogleAuthenticator.c" } -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp13_) { -#line 1668 "GoogleAuthenticator.c" +#line 1728 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp16_; GError* _tmp17_; GError* _tmp18_; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp16_ = self->priv->host; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 240 "/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" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp18_ = _tmp17_; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 240 "/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" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp18_); -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 242 "/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" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1688 "GoogleAuthenticator.c" +#line 1748 "GoogleAuthenticator.c" } -#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp19_ = response_obj; -#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp19_, "expires_in")) { -#line 1694 "GoogleAuthenticator.c" +#line 1754 "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" +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp20_ = response_obj; -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 246 "/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" +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp21_ = duration; -#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 247 "/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" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp22_ = abs_time; -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 248 "/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 1772 "GoogleAuthenticator.c" } -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp23_ = response_obj; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp23_, "refresh_token")) { -#line 1718 "GoogleAuthenticator.c" +#line 1778 "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" +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp24_ = response_obj; -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 252 "/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" +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp26_ = g_strdup (_tmp25_); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" refresh_token = _tmp26_; -#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp27_ = refresh_token; -#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp27_, "") != 0) { -#line 1736 "GoogleAuthenticator.c" +#line 1796 "GoogleAuthenticator.c" const gchar* _tmp28_; -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp28_ = refresh_token; -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 255 "/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 1802 "GoogleAuthenticator.c" } -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (refresh_token); -#line 1746 "GoogleAuthenticator.c" +#line 1806 "GoogleAuthenticator.c" } -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp29_ = response_obj; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp29_, "access_token")) { -#line 1752 "GoogleAuthenticator.c" +#line 1812 "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" +#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp30_ = response_obj; -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 259 "/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" +#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp32_ = g_strdup (_tmp31_); -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" access_token = _tmp32_; -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp33_ = access_token; -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp33_, "") != 0) { -#line 1770 "GoogleAuthenticator.c" +#line 1830 "GoogleAuthenticator.c" const gchar* _tmp34_; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 262 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp34_ = access_token; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 262 "/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 1836 "GoogleAuthenticator.c" } -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (access_token); -#line 1780 "GoogleAuthenticator.c" +#line 1840 "GoogleAuthenticator.c" } -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 224 "/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" +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 1786 "GoogleAuthenticator.c" +#line 1846 "GoogleAuthenticator.c" } @@ -1806,32 +1867,32 @@ publishing_authenticator_shotwell_google_google_on_refresh_token_available (Publ GVariant* _tmp2_; PublishingAuthenticatorShotwellGoogleSession* _tmp3_; gchar* _tmp4_; -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 266 "/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" +#line 266 "/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" \ +#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:267: EVENT: an OAuth refresh token has become" \ " available; token = '%s'.", token); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->params; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_strdup ("RefreshToken"); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 268 "/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" +#line 268 "/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" +#line 268 "/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" +#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = self->priv->session; -#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = g_strdup (token); -#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 270 "/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" +#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_->refresh_token = _tmp4_; -#line 1823 "GoogleAuthenticator.c" +#line 1883 "GoogleAuthenticator.c" } @@ -1843,25 +1904,25 @@ publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (Publish GHashTable* _tmp1_; gchar* _tmp2_; GVariant* _tmp3_; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 273 "/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" +#line 274 "/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" +#line 277 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->session; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 277 "/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" +#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->params; -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = g_strdup ("ExpiryTime"); -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 278 "/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" +#line 278 "/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" +#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp1_, _tmp2_, _tmp3_); -#line 1853 "GoogleAuthenticator.c" +#line 1913 "GoogleAuthenticator.c" } @@ -1874,34 +1935,34 @@ publishing_authenticator_shotwell_google_google_on_access_token_available (Publi GHashTable* _tmp2_; gchar* _tmp3_; GVariant* _tmp4_; -#line 263 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 282 "/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" +#line 282 "/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 " \ +#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:283: EVENT: an OAuth access token has become " \ "available; token = '%s'.", token); -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->session; -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = g_strdup (token); -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 285 "/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" +#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_->access_token = _tmp1_; -#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->params; -#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = g_strdup ("AccessToken"); -#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 286 "/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" +#line 286 "/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" +#line 286 "/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" +#line 288 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_fetch_username (self); -#line 1892 "GoogleAuthenticator.c" +#line 1952 "GoogleAuthenticator.c" } @@ -1909,9 +1970,9 @@ 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" +#line 298 "/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" +#line 1962 "GoogleAuthenticator.c" } @@ -1920,9 +1981,9 @@ _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_e GError* err, gpointer self) { -#line 280 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 299 "/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" +#line 1973 "GoogleAuthenticator.c" } @@ -1935,36 +1996,36 @@ publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAut PublishingAuthenticatorShotwellGoogleSession* _tmp2_; PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* _tmp3_; GError * _inner_error_ = NULL; -#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 291 "/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" \ +#line 292 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:292: ACTION: running network transaction to f" \ "etch username."); -#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->host; -#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 294 "/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" +#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->host; -#line 276 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 295 "/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" +#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->session; -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 297 "/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" +#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" txn = _tmp3_; -#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 298 "/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" +#line 299 "/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 2008 "GoogleAuthenticator.c" { -#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 302 "/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" +#line 302 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1954 "GoogleAuthenticator.c" +#line 2014 "GoogleAuthenticator.c" goto __catch5_g_error; } } @@ -1974,36 +2035,36 @@ publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAut GError* err = NULL; SpitPublishingPluginHost* _tmp4_; GError* _tmp5_; -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" err = _inner_error_; -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _inner_error_ = NULL; -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = self->priv->host; -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = err; -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 304 "/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" +#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); -#line 1976 "GoogleAuthenticator.c" +#line 2036 "GoogleAuthenticator.c" } __finally5: -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 301 "/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" +#line 301 "/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" +#line 301 "/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" +#line 301 "/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" +#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 1989 "GoogleAuthenticator.c" +#line 2049 "GoogleAuthenticator.c" } -#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 1993 "GoogleAuthenticator.c" +#line 2053 "GoogleAuthenticator.c" } @@ -2015,30 +2076,30 @@ publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_co guint _tmp1_; gchar* _tmp2_; gchar* _tmp3_; -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 308 "/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" +#line 308 "/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" +#line 309 "/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" +#line 309 "/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" +#line 310 "/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" +#line 310 "/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" \ +#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:312: EVENT: username fetch transaction comple" \ "ted successfully."); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 314 "/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" +#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = _tmp2_; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 314 "/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" +#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp3_); -#line 2027 "GoogleAuthenticator.c" +#line 2087 "GoogleAuthenticator.c" } @@ -2050,26 +2111,26 @@ publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_er guint _tmp0_; guint _tmp1_; SpitPublishingPluginHost* _tmp2_; -#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 317 "/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" +#line 317 "/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" +#line 319 "/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" +#line 319 "/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" +#line 320 "/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" +#line 320 "/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" \ +#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:322: EVENT: username fetch transaction caused" \ " a network error"); -#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->host; -#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp2_, err); -#line 2057 "GoogleAuthenticator.c" +#line 2117 "GoogleAuthenticator.c" } @@ -2091,27 +2152,27 @@ publishing_authenticator_shotwell_google_google_do_extract_username (PublishingA PublishingAuthenticatorShotwellGoogleSession* _tmp33_; const gchar* _tmp34_; GError * _inner_error_ = NULL; -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 327 "/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" +#line 327 "/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" \ +#line 328 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:328: ACTION: extracting username from body of" \ " server response"); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = json_parser_new (); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" parser = _tmp0_; -#line 2089 "GoogleAuthenticator.c" +#line 2149 "GoogleAuthenticator.c" { JsonParser* _tmp1_; -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = parser; -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 333 "/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" +#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2098 "GoogleAuthenticator.c" +#line 2158 "GoogleAuthenticator.c" goto __catch6_g_error; } } @@ -2126,170 +2187,170 @@ publishing_authenticator_shotwell_google_google_do_extract_username (PublishingA gchar* _tmp6_; GError* _tmp7_; GError* _tmp8_; -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" err = _inner_error_; -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _inner_error_ = NULL; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->host; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = err; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_->message; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/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" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp6_ = _tmp5_; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/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" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp8_ = _tmp7_; -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/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" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (_tmp8_); -#line 316 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp6_); -#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); -#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2143 "GoogleAuthenticator.c" +#line 2203 "GoogleAuthenticator.c" } __finally6: -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 332 "/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" +#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 332 "/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" +#line 332 "/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" +#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2156 "GoogleAuthenticator.c" +#line 2216 "GoogleAuthenticator.c" } -#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp9_ = parser; -#line 321 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 340 "/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" +#line 340 "/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" +#line 340 "/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" +#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" response_obj = _tmp12_; -#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp13_ = response_obj; -#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp13_, "name")) { -#line 2172 "GoogleAuthenticator.c" +#line 2232 "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" +#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp14_ = response_obj; -#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 343 "/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" +#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp16_ = g_strdup (_tmp15_); -#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" username = _tmp16_; -#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 345 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp17_ = username; -#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 345 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp17_, "") != 0) { -#line 2190 "GoogleAuthenticator.c" +#line 2250 "GoogleAuthenticator.c" GHashTable* _tmp18_; gchar* _tmp19_; const gchar* _tmp20_; GVariant* _tmp21_; -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp18_ = self->priv->params; -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp19_ = g_strdup ("UserName"); -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp20_ = username; -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 346 "/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" +#line 346 "/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" +#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp18_, _tmp19_, _tmp21_); -#line 2207 "GoogleAuthenticator.c" +#line 2267 "GoogleAuthenticator.c" } -#line 323 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (username); -#line 2211 "GoogleAuthenticator.c" +#line 2271 "GoogleAuthenticator.c" } -#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp22_ = response_obj; -#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (json_object_has_member (_tmp22_, "access_token")) { -#line 2217 "GoogleAuthenticator.c" +#line 2277 "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" +#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp23_ = response_obj; -#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 350 "/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" +#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp25_ = g_strdup (_tmp24_); -#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" access_token = _tmp25_; -#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 352 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp26_ = access_token; -#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 352 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (g_strcmp0 (_tmp26_, "") != 0) { -#line 2235 "GoogleAuthenticator.c" +#line 2295 "GoogleAuthenticator.c" GHashTable* _tmp27_; gchar* _tmp28_; const gchar* _tmp29_; GVariant* _tmp30_; -#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp27_ = self->priv->params; -#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp28_ = g_strdup ("AccessToken"); -#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp29_ = access_token; -#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 353 "/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" +#line 353 "/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" +#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); -#line 2252 "GoogleAuthenticator.c" +#line 2312 "GoogleAuthenticator.c" } -#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (access_token); -#line 2256 "GoogleAuthenticator.c" +#line 2316 "GoogleAuthenticator.c" } -#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 358 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp31_ = self->priv->session; -#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 358 "/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" +#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp32_ = self->priv->host; -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp33_ = self->priv->session; -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp34_ = _tmp33_->refresh_token; -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 359 "/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" +#line 361 "/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" +#line 327 "/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" +#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_object_unref0 (parser); -#line 2276 "GoogleAuthenticator.c" +#line 2336 "GoogleAuthenticator.c" } @@ -2297,9 +2358,9 @@ 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" +#line 372 "/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" +#line 2346 "GoogleAuthenticator.c" } @@ -2308,9 +2369,9 @@ _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transac GError* err, gpointer self) { -#line 354 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 373 "/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" +#line 2357 "GoogleAuthenticator.c" } @@ -2322,45 +2383,45 @@ publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_ac PublishingAuthenticatorShotwellGoogleSession* _tmp1_; PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* _tmp2_; GError * _inner_error_ = NULL; -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 365 "/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" \ +#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:366: ACTION: exchanging OAuth refresh token f" \ "or OAuth access token."); -#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->host; -#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 368 "/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" +#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp1_ = self->priv->session; -#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 370 "/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" +#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" txn = _tmp2_; -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 372 "/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" +#line 373 "/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 2387 "GoogleAuthenticator.c" { -#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 376 "/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" +#line 376 "/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" +#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2335 "GoogleAuthenticator.c" +#line 2395 "GoogleAuthenticator.c" goto __catch7_spit_publishing_publishing_error; } -#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 376 "/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" +#line 376 "/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" +#line 376 "/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" +#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2346 "GoogleAuthenticator.c" +#line 2406 "GoogleAuthenticator.c" } } goto __finally7; @@ -2369,36 +2430,36 @@ publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_ac GError* err = NULL; SpitPublishingPluginHost* _tmp3_; GError* _tmp4_; -#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" err = _inner_error_; -#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _inner_error_ = NULL; -#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = self->priv->host; -#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = err; -#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 378 "/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" +#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_error_free0 (err); -#line 2367 "GoogleAuthenticator.c" +#line 2427 "GoogleAuthenticator.c" } __finally7: -#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 375 "/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" +#line 375 "/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" +#line 375 "/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" +#line 375 "/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" +#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2380 "GoogleAuthenticator.c" +#line 2440 "GoogleAuthenticator.c" } -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 2384 "GoogleAuthenticator.c" +#line 2444 "GoogleAuthenticator.c" } @@ -2411,38 +2472,38 @@ publishing_authenticator_shotwell_google_google_on_refresh_access_token_transact PublishingAuthenticatorShotwellGoogleSession* _tmp2_; gchar* _tmp3_; gchar* _tmp4_; -#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 382 "/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" +#line 382 "/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" +#line 384 "/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" +#line 384 "/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" +#line 385 "/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" +#line 385 "/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 " \ +#line 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:387: EVENT: refresh access token transaction " \ "completed successfully."); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->session; -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 389 "/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" +#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2417 "GoogleAuthenticator.c" +#line 2477 "GoogleAuthenticator.c" } -#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 392 "/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" +#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = _tmp3_; -#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 392 "/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" +#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _g_free0 (_tmp4_); -#line 2427 "GoogleAuthenticator.c" +#line 2487 "GoogleAuthenticator.c" } @@ -2450,13 +2511,13 @@ static gboolean ___lambda4_ (PublishingAuthenticatorShotwellGoogleGoogle* self) { gboolean result = FALSE; -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 408 "/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" +#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" result = FALSE; -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return result; -#line 2441 "GoogleAuthenticator.c" +#line 2501 "GoogleAuthenticator.c" } @@ -2465,9 +2526,9 @@ ____lambda4__gsource_func (gpointer self) { gboolean result; result = ___lambda4_ ((PublishingAuthenticatorShotwellGoogleGoogle*) self); -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return result; -#line 2452 "GoogleAuthenticator.c" +#line 2512 "GoogleAuthenticator.c" } @@ -2481,65 +2542,65 @@ publishing_authenticator_shotwell_google_google_on_refresh_access_token_transact PublishingAuthenticatorShotwellGoogleSession* _tmp2_; gboolean _tmp3_ = FALSE; SpitPublishingPluginHost* _tmp5_; -#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 395 "/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" +#line 395 "/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" +#line 397 "/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" +#line 397 "/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" +#line 398 "/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" +#line 398 "/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 " \ +#line 400 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:400: EVENT: refresh access token transaction " \ "caused a network error."); -#line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 402 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp2_ = self->priv->session; -#line 383 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 402 "/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" +#line 403 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" return; -#line 2486 "GoogleAuthenticator.c" +#line 2546 "GoogleAuthenticator.c" } -#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 404 "/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" +#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp3_ = TRUE; -#line 2492 "GoogleAuthenticator.c" +#line 2552 "GoogleAuthenticator.c" } else { -#line 386 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 405 "/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 2556 "GoogleAuthenticator.c" } -#line 385 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_tmp3_) { -#line 2500 "GoogleAuthenticator.c" +#line 2560 "GoogleAuthenticator.c" SpitPublishingPluginHost* _tmp4_; -#line 388 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 407 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp4_ = self->priv->host; -#line 388 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 407 "/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" +#line 408 "/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 2568 "GoogleAuthenticator.c" } -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 411 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp5_ = self->priv->host; -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 411 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp5_, err); -#line 2514 "GoogleAuthenticator.c" +#line 2574 "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" +#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_on_service_welcome_login ((PublishingAuthenticatorShotwellGoogleGoogle*) self); -#line 2523 "GoogleAuthenticator.c" +#line 2583 "GoogleAuthenticator.c" } @@ -2548,84 +2609,84 @@ publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (Pu { SpitPublishingPluginHost* _tmp0_; const gchar* _tmp1_; -#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 414 "/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" +#line 415 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:415: ACTION: showing service welcome pane."); +#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _tmp0_ = self->priv->host; -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 417 "/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" +#line 417 "/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" +#line 2602 "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" +#line 420 "/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" \ +#line 421 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" + g_debug ("GoogleAuthenticator.vala:421: EVENT: user clicked 'Login' in welcome p" \ "ane."); -#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 423 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (self); -#line 2555 "GoogleAuthenticator.c" +#line 2615 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_class_init (PublishingAuthenticatorShotwellGoogleGoogleClass * klass) { -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 107 "/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" +#line 107 "/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" +#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_google_google_finalize; -#line 2568 "GoogleAuthenticator.c" +#line 2628 "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" +#line 107 "/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" +#line 107 "/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" +#line 107 "/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" +#line 107 "/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" +#line 107 "/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" +#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_google_google_real_refresh; -#line 2587 "GoogleAuthenticator.c" +#line 2647 "GoogleAuthenticator.c" } static void publishing_authenticator_shotwell_google_google_instance_init (PublishingAuthenticatorShotwellGoogleGoogle * self) { -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 107 "/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" +#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->scope = NULL; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->host = NULL; -#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->params = NULL; -#line 92 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 111 "/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" +#line 112 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->session = NULL; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" self->priv->welcome_message = NULL; -#line 2608 "GoogleAuthenticator.c" +#line 2668 "GoogleAuthenticator.c" } @@ -2633,23 +2694,23 @@ static void publishing_authenticator_shotwell_google_google_finalize (GObject * obj) { PublishingAuthenticatorShotwellGoogleGoogle * self; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" +#line 107 "/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" +#line 108 "/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" +#line 109 "/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" +#line 110 "/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" +#line 111 "/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" +#line 112 "/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" +#line 113 "/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" +#line 107 "/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" +#line 2692 "GoogleAuthenticator.c" } diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala b/plugins/authenticator/shotwell/GoogleAuthenticator.vala index 9271b57..f561197 100644 --- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala +++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala @@ -3,34 +3,53 @@ using Shotwell.Plugins; namespace Publishing.Authenticator.Shotwell.Google { private const string OAUTH_CLIENT_ID = "534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67.apps.googleusercontent.com"; + private const string REVERSE_CLIENT_ID = "com.googleusercontent.apps.534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67"; private const string OAUTH_CLIENT_SECRET = "pwpzZ7W1TCcD5uIfYCu8sM7x"; + private const string OAUTH_CALLBACK_URI = REVERSE_CLIENT_ID + ":/auth-callback"; private class WebAuthenticationPane : Common.WebAuthenticationPane { public static bool cache_dirty = false; + private string? auth_code = null; - public signal void authorized(string auth_code); + public signal void error(); - public WebAuthenticationPane(string auth_sequence_start_url) { - Object (login_uri : auth_sequence_start_url); - } + public override void constructed() { + base.constructed(); - public static bool is_cache_dirty() { - return cache_dirty; + var ctx = WebKit.WebContext.get_default(); + ctx.register_uri_scheme(REVERSE_CLIENT_ID, this.on_shotwell_auth_request_cb); } public override void on_page_load() { - string page_title = get_view ().get_title(); - if (page_title.index_of("state=connect") > 0) { - int auth_code_field_start = page_title.index_of("code="); - if (auth_code_field_start < 0) - return; + var uri = new Soup.URI(get_view().get_uri()); + if (uri.scheme == REVERSE_CLIENT_ID && this.auth_code == null) { + this.error(); + } - string auth_code = page_title.substring(auth_code_field_start + 5); // 5 = "code=".length + if (this.auth_code != null) { + this.authorized(this.auth_code); + } + } - cache_dirty = true; + private void on_shotwell_auth_request_cb(WebKit.URISchemeRequest request) { + var uri = new Soup.URI(request.get_uri()); + debug("URI: %s", request.get_uri()); + var form_data = Soup.Form.decode (uri.query); + this.auth_code = form_data.lookup("code"); - authorized(auth_code); - } + var response = ""; + var mins = new MemoryInputStream.from_data(response.data, null); + request.finish(mins, -1, "text/plain"); + } + + public signal void authorized(string auth_code); + + public WebAuthenticationPane(string auth_sequence_start_url) { + Object (login_uri : auth_sequence_start_url); + } + + public static bool is_cache_dirty() { + return cache_dirty; } } @@ -59,7 +78,7 @@ namespace Publishing.Authenticator.Shotwell.Google { add_argument("code", auth_code); add_argument("client_id", OAUTH_CLIENT_ID); add_argument("client_secret", OAUTH_CLIENT_SECRET); - add_argument("redirect_uri", "urn:ietf:wg:oauth:2.0:oob"); + add_argument("redirect_uri", OAUTH_CALLBACK_URI); add_argument("grant_type", "authorization_code"); } } @@ -144,7 +163,7 @@ namespace Publishing.Authenticator.Shotwell.Google { string user_authorization_url = "https://accounts.google.com/o/oauth2/auth?" + "response_type=code&" + "client_id=" + OAUTH_CLIENT_ID + "&" + - "redirect_uri=" + Soup.URI.encode("urn:ietf:wg:oauth:2.0:oob", null) + "&" + + "redirect_uri=" + Soup.URI.encode(OAUTH_CALLBACK_URI, null) + "&" + "scope=" + Soup.URI.encode(this.scope, null) + "+" + Soup.URI.encode("https://www.googleapis.com/auth/userinfo.profile", null) + "&" + "state=connect&" + |