diff options
Diffstat (limited to 'plugins/authenticator/shotwell')
-rw-r--r-- | plugins/authenticator/shotwell/FacebookPublishingAuthenticator.c | 2419 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c | 1674 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/GoogleAuthenticator.c | 2733 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/OAuth1Authenticator.c | 772 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c | 416 | ||||
-rw-r--r-- | plugins/authenticator/shotwell/TumblrAuthenticator.c | 1488 |
6 files changed, 0 insertions, 9502 deletions
diff --git a/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.c b/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.c deleted file mode 100644 index d1e2389..0000000 --- a/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.c +++ /dev/null @@ -1,2419 +0,0 @@ -/* FacebookPublishingAuthenticator.c generated by valac 0.40.4, the Vala compiler - * generated from FacebookPublishingAuthenticator.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include "shotwell-plugin-common.h" -#include <locale.h> -#include <webkit2/webkit2.h> -#include "shotwell-plugin-dev-1.0.h" -#include <glib/gi18n-lib.h> -#include <libsoup/soup.h> -#include <gobject/gvaluecollector.h> - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE (publishing_authenticator_shotwell_facebook_web_authentication_pane_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFacebookWebAuthenticationPane)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass)) - -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPane PublishingAuthenticatorShotwellFacebookWebAuthenticationPane; -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass; -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPanePrivate PublishingAuthenticatorShotwellFacebookWebAuthenticationPanePrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_facebook_web_authentication_pane_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES]; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP (publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_IS_LOCALE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_IS_LOCALE_LOOKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass)) - -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup; -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupPrivate PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupPrivate; -#define _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref0(var) ((var == NULL) ? NULL : (var = (publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -typedef struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneParamSpecLocaleLookup PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneParamSpecLocaleLookup; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_SUCCEEDED_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_FAILED_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_NUM_SIGNALS -}; -static guint publishing_authenticator_shotwell_facebook_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_NUM_SIGNALS] = {0}; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK (publishing_authenticator_shotwell_facebook_facebook_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebookClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebookClass)) - -typedef struct _PublishingAuthenticatorShotwellFacebookFacebook PublishingAuthenticatorShotwellFacebookFacebook; -typedef struct _PublishingAuthenticatorShotwellFacebookFacebookClass PublishingAuthenticatorShotwellFacebookFacebookClass; -typedef struct _PublishingAuthenticatorShotwellFacebookFacebookPrivate PublishingAuthenticatorShotwellFacebookFacebookPrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_facebook_facebook_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_NUM_PROPERTIES]; -#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPane { - ShotwellPluginsCommonWebAuthenticationPane parent_instance; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPanePrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass { - ShotwellPluginsCommonWebAuthenticationPaneClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup { - GTypeInstance parent_instance; - volatile int ref_count; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupPrivate * priv; - gchar* prefix; - gchar* translation; - gchar* exception_code; - gchar* exception_translation; - gchar* exception_code_2; - gchar* exception_translation_2; -}; - -struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass { - GTypeClass parent_class; - void (*finalize) (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup *self); -}; - -struct _PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneParamSpecLocaleLookup { - GParamSpec parent_instance; -}; - -struct _PublishingAuthenticatorShotwellFacebookFacebook { - GObject parent_instance; - PublishingAuthenticatorShotwellFacebookFacebookPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFacebookFacebookClass { - GObjectClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFacebookFacebookPrivate { - SpitPublishingPluginHost* host; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* web_auth_pane; - GHashTable* params; -}; - - -static gpointer publishing_authenticator_shotwell_facebook_web_authentication_pane_parent_class = NULL; -static gboolean publishing_authenticator_shotwell_facebook_web_authentication_pane_cache_dirty; -static gboolean publishing_authenticator_shotwell_facebook_web_authentication_pane_cache_dirty = FALSE; -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup** publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table; -static gint publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table_length1; -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup** publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table = NULL; -static gint publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table_length1 = 0; -static gint _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table_size_ = 0; -static gpointer publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_facebook_facebook_parent_class = NULL; -static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_facebook_facebook_spit_publishing_authenticator_parent_iface = NULL; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_APPLICATION_ID "1612018629063184" -GType publishing_authenticator_shotwell_facebook_web_authentication_pane_get_type (void) G_GNUC_CONST; -static gpointer publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (gpointer instance); -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (gpointer instance); -static GParamSpec* publishing_authenticator_shotwell_facebook_web_authentication_pane_param_spec_locale_lookup (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) G_GNUC_UNUSED; -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_value_set_locale_lookup (GValue* value, - gpointer v_object) G_GNUC_UNUSED; -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_value_take_locale_lookup (GValue* value, - gpointer v_object) G_GNUC_UNUSED; -static gpointer publishing_authenticator_shotwell_facebook_web_authentication_pane_value_get_locale_lookup (const GValue* value) G_GNUC_UNUSED; -static GType publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new (const gchar* prefix, - const gchar* translation, - const gchar* exception_code, - const gchar* exception_translation, - const gchar* exception_code_2, - const gchar* exception_translation_2); -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_construct (GType object_type, - const gchar* prefix, - const gchar* translation, - const gchar* exception_code, - const gchar* exception_translation, - const gchar* exception_code_2, - const gchar* exception_translation_2); -PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* publishing_authenticator_shotwell_facebook_web_authentication_pane_new (void); -PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* publishing_authenticator_shotwell_facebook_web_authentication_pane_construct (GType object_type); -static gchar* publishing_authenticator_shotwell_facebook_web_authentication_pane_get_login_url (void); -static gchar* publishing_authenticator_shotwell_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (void); -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base); -gboolean publishing_authenticator_shotwell_facebook_web_authentication_pane_is_cache_dirty (void); -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_finalize (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * obj); -static void publishing_authenticator_shotwell_facebook_web_authentication_pane_finalize (GObject * obj); -GType publishing_authenticator_shotwell_facebook_facebook_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebookPrivate)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Facebook.\n" \ -"\n" \ -"If you don’t yet have a Facebook account, you can create one during th" \ -"e login process. During login, Shotwell Connect may ask you for permis" \ -"sion to upload photos and publish to your feed. These permissions are " \ -"required for Shotwell Connect to function.") -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_RESTART_ERROR_MESSAGE _ ("You have already logged in and out of Facebook during this Shotwell se" \ -"ssion.\n" \ -"To continue publishing to Facebook, quit and restart Shotwell, then tr" \ -"y publishing again.") -PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_construct (GType object_type, - SpitPublishingPluginHost* host); -static void _g_free0_ (gpointer var); -static void _g_variant_unref0_ (gpointer var); -static void publishing_authenticator_shotwell_facebook_facebook_real_authenticate (SpitPublishingAuthenticator* base); -static gboolean publishing_authenticator_shotwell_facebook_facebook_is_persistent_session_valid (PublishingAuthenticatorShotwellFacebookFacebook* self); -static gchar* publishing_authenticator_shotwell_facebook_facebook_get_persistent_access_token (PublishingAuthenticatorShotwellFacebookFacebook* self); -static void publishing_authenticator_shotwell_facebook_facebook_do_show_service_welcome_pane (PublishingAuthenticatorShotwellFacebookFacebook* self); -static gboolean publishing_authenticator_shotwell_facebook_facebook_real_can_logout (SpitPublishingAuthenticator* base); -static GHashTable* publishing_authenticator_shotwell_facebook_facebook_real_get_authentication_parameter (SpitPublishingAuthenticator* base); -void publishing_authenticator_shotwell_facebook_facebook_invalidate_persistent_session (PublishingAuthenticatorShotwellFacebookFacebook* self); -static void publishing_authenticator_shotwell_facebook_facebook_set_persistent_access_token (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* access_token); -static void publishing_authenticator_shotwell_facebook_facebook_real_logout (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_facebook_facebook_real_refresh (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_facebook_facebook_on_login_clicked (PublishingAuthenticatorShotwellFacebookFacebook* self); -static void _publishing_authenticator_shotwell_facebook_facebook_on_login_clicked_spit_publishing_login_callback (gpointer self); -static void publishing_authenticator_shotwell_facebook_facebook_do_hosted_web_authentication (PublishingAuthenticatorShotwellFacebookFacebook* self); -static void publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* success_url); -static void _publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_succeeded (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _sender, - const gchar* success_url, - gpointer self); -static void publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed (PublishingAuthenticatorShotwellFacebookFacebook* self); -static void _publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_failed (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _sender, - gpointer self); -static void publishing_authenticator_shotwell_facebook_facebook_do_authenticate_session (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* good_login_uri); -static void publishing_authenticator_shotwell_facebook_facebook_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - - -PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* -publishing_authenticator_shotwell_facebook_web_authentication_pane_construct (GType object_type) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane * self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_get_login_url (); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane*) g_object_new (object_type, "login-uri", _tmp1_, NULL); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (_tmp1_); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self; -#line 238 "FacebookPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* -publishing_authenticator_shotwell_facebook_web_authentication_pane_new (void) -{ -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_facebook_web_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE); -#line 247 "FacebookPublishingAuthenticator.c" -} - - -static gpointer -_publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref0 (gpointer self) -{ -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self ? publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (self) : NULL; -#line 256 "FacebookPublishingAuthenticator.c" -} - - -static gboolean -string_contains (const gchar* self, - const gchar* needle) -{ - gboolean result = FALSE; - gchar* _tmp0_; -#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, FALSE); -#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (needle != NULL, FALSE); -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = strstr ((gchar*) self, (gchar*) needle); -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp0_ != NULL; -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 276 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -publishing_authenticator_shotwell_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (void) -{ - gchar* result = NULL; - const gchar* raw_system_locale = NULL; - const gchar* _tmp0_; - gboolean _tmp1_ = FALSE; - const gchar* _tmp2_; - gchar* system_locale = NULL; - const gchar* _tmp5_; - gchar** _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint _tmp8__length1; - const gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup** _tmp12_; - gint _tmp12__length1; - gchar* _tmp40_; -#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = setlocale (LC_ALL, ""); -#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - raw_system_locale = _tmp0_; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = raw_system_locale; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp2_ == NULL) { -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = TRUE; -#line 310 "FacebookPublishingAuthenticator.c" - } else { - const gchar* _tmp3_; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = raw_system_locale; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = g_strcmp0 (_tmp3_, "") == 0; -#line 317 "FacebookPublishingAuthenticator.c" - } -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp1_) { -#line 321 "FacebookPublishingAuthenticator.c" - gchar* _tmp4_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = g_strdup ("www"); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp4_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 329 "FacebookPublishingAuthenticator.c" - } -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = raw_system_locale; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp7_ = _tmp6_ = g_strsplit (_tmp5_, ".", 0); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8__length1 = _vala_array_length (_tmp6_); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp9_ = _tmp8_[0]; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp10_ = g_strdup (_tmp9_); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp11_ = _tmp10_; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - system_locale = _tmp11_; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp12_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp12__length1 = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table_length1; -#line 353 "FacebookPublishingAuthenticator.c" - { - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup** locale_lookup_collection = NULL; - gint locale_lookup_collection_length1 = 0; - gint _locale_lookup_collection_size_ = 0; - gint locale_lookup_it = 0; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - locale_lookup_collection = _tmp12_; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - locale_lookup_collection_length1 = _tmp12__length1; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - for (locale_lookup_it = 0; locale_lookup_it < _tmp12__length1; locale_lookup_it = locale_lookup_it + 1) { -#line 365 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp13_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* locale_lookup = NULL; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp13_ = _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref0 (locale_lookup_collection[locale_lookup_it]); -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - locale_lookup = _tmp13_; -#line 372 "FacebookPublishingAuthenticator.c" - { - const gchar* _tmp14_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp15_; - const gchar* _tmp16_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp17_; - const gchar* _tmp18_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp27_; - const gchar* _tmp28_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp37_; - const gchar* _tmp38_; - gchar* _tmp39_; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp14_ = system_locale; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp15_ = locale_lookup; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp16_ = _tmp15_->prefix; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (!g_str_has_prefix (_tmp14_, _tmp16_)) { -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - continue; -#line 396 "FacebookPublishingAuthenticator.c" - } -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp17_ = locale_lookup; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp18_ = _tmp17_->exception_code; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp18_ != NULL) { -#line 404 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp19_; - const gchar* _tmp20_; - const gchar* _tmp21_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp22_; - const gchar* _tmp23_; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp19_ = locale_lookup; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp20_ = _tmp19_->exception_translation; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _vala_assert (_tmp20_ != NULL, "locale_lookup.exception_translation != null"); -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp21_ = system_locale; -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp22_ = locale_lookup; -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp23_ = _tmp22_->exception_code; -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (string_contains (_tmp21_, _tmp23_)) { -#line 424 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp24_ = locale_lookup; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp25_ = _tmp24_->exception_translation; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp26_ = g_strdup (_tmp25_); -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp26_; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (system_locale); -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 442 "FacebookPublishingAuthenticator.c" - } - } -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp27_ = locale_lookup; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp28_ = _tmp27_->exception_code_2; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp28_ != NULL) { -#line 451 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp29_; - const gchar* _tmp30_; - const gchar* _tmp31_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp32_; - const gchar* _tmp33_; -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp29_ = locale_lookup; -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp30_ = _tmp29_->exception_translation_2; -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _vala_assert (_tmp30_ != NULL, "locale_lookup.exception_translation_2 != null"); -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp31_ = system_locale; -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp32_ = locale_lookup; -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp33_ = _tmp32_->exception_code_2; -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (string_contains (_tmp31_, _tmp33_)) { -#line 471 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp34_; - const gchar* _tmp35_; - gchar* _tmp36_; -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp34_ = locale_lookup; -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp35_ = _tmp34_->exception_translation_2; -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp36_ = g_strdup (_tmp35_); -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp36_; -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (system_locale); -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 489 "FacebookPublishingAuthenticator.c" - } - } -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp37_ = locale_lookup; -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp38_ = _tmp37_->translation; -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp39_ = g_strdup (_tmp38_); -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp39_; -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (system_locale); -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 506 "FacebookPublishingAuthenticator.c" - } - } - } -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp40_ = g_strdup ("www"); -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp40_; -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (system_locale); -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 518 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -publishing_authenticator_shotwell_facebook_web_authentication_pane_get_login_url (void) -{ - gchar* result = NULL; - gchar* facebook_locale = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (); -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - facebook_locale = _tmp0_; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = g_strdup_printf ("https://%s.facebook.com/dialog/oauth?client_id=%s&redirect_uri=https:/" \ -"/www.facebook.com/connect/login_success.html&display=popup&scope=publi" \ -"sh_actions,user_photos,user_videos&response_type=token", facebook_locale, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_APPLICATION_ID); -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp1_; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (facebook_locale); -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 541 "FacebookPublishingAuthenticator.c" -} - - -static gint -string_index_of_char (const gchar* self, - gunichar c, - gint start_index) -{ - gint result = 0; - gchar* _result_ = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 1045 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, 0); -#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c); -#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _result_; -#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_ != NULL) { -#line 564 "FacebookPublishingAuthenticator.c" - gchar* _tmp2_; -#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = _result_; -#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = (gint) (_tmp2_ - ((gchar*) self)); -#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 572 "FacebookPublishingAuthenticator.c" - } else { -#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = -1; -#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 578 "FacebookPublishingAuthenticator.c" - } -} - - -static gchar* -string_slice (const gchar* self, - glong start, - glong end) -{ - gchar* result = NULL; - glong string_length = 0L; - gint _tmp0_; - gint _tmp1_; - gboolean _tmp4_ = FALSE; - gboolean _tmp6_ = FALSE; - gchar* _tmp8_; -#line 1369 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = strlen (self); -#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - string_length = (glong) _tmp1_; -#line 1371 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (start < ((glong) 0)) { -#line 605 "FacebookPublishingAuthenticator.c" - glong _tmp2_; -#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = string_length; -#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - start = _tmp2_ + start; -#line 611 "FacebookPublishingAuthenticator.c" - } -#line 1374 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (end < ((glong) 0)) { -#line 615 "FacebookPublishingAuthenticator.c" - glong _tmp3_; -#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = string_length; -#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - end = _tmp3_ + end; -#line 621 "FacebookPublishingAuthenticator.c" - } -#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (start >= ((glong) 0)) { -#line 625 "FacebookPublishingAuthenticator.c" - glong _tmp5_; -#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = string_length; -#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = start <= _tmp5_; -#line 631 "FacebookPublishingAuthenticator.c" - } else { -#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = FALSE; -#line 635 "FacebookPublishingAuthenticator.c" - } -#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp4_, NULL); -#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (end >= ((glong) 0)) { -#line 641 "FacebookPublishingAuthenticator.c" - glong _tmp7_; -#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = string_length; -#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = end <= _tmp7_; -#line 647 "FacebookPublishingAuthenticator.c" - } else { -#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = FALSE; -#line 651 "FacebookPublishingAuthenticator.c" - } -#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp6_, NULL); -#line 1379 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (start <= end, NULL); -#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = g_strndup (((gchar*) self) + start, (gsize) (end - start)); -#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp8_; -#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 663 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -string_replace (const gchar* self, - const gchar* old, - const gchar* replacement) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - GError * _inner_error_ = NULL; -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (old != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (replacement != NULL, NULL); -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if ((*((gchar*) self)) == '\0') { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 686 "FacebookPublishingAuthenticator.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = (*((gchar*) old)) == '\0'; -#line 690 "FacebookPublishingAuthenticator.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = TRUE; -#line 696 "FacebookPublishingAuthenticator.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_strcmp0 (old, replacement) == 0; -#line 700 "FacebookPublishingAuthenticator.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 704 "FacebookPublishingAuthenticator.c" - gchar* _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = g_strdup (self); -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 712 "FacebookPublishingAuthenticator.c" - } - { - GRegex* regex = NULL; - gchar* _tmp3_; - gchar* _tmp4_; - GRegex* _tmp5_; - GRegex* _tmp6_; - gchar* _tmp7_ = NULL; - GRegex* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = g_regex_escape_string (old, -1); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = _tmp5_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp4_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - regex = _tmp6_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 740 "FacebookPublishingAuthenticator.c" - goto __catch0_g_regex_error; - } -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - 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 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 749 "FacebookPublishingAuthenticator.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = regex; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = _tmp9_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 763 "FacebookPublishingAuthenticator.c" - goto __catch0_g_regex_error; - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - 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 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 774 "FacebookPublishingAuthenticator.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp10_ = _tmp7_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = NULL; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp10_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp7_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 788 "FacebookPublishingAuthenticator.c" - } - goto __finally0; - __catch0_g_regex_error: - { - GError* e = NULL; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - e = _inner_error_; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _inner_error_ = NULL; -#line 1429 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_assert_not_reached (); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_error_free0 (e); -#line 802 "FacebookPublishingAuthenticator.c" - } - __finally0: -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - 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 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 813 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane * self; - gchar* loaded_url = NULL; - WebKitWebView* _tmp0_; - WebKitWebView* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - const gchar* _tmp9_; - const gchar* _tmp20_; - const gchar* _tmp25_; -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFacebookWebAuthenticationPane); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.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 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = webkit_web_view_get_uri (_tmp1_); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = g_strdup (_tmp3_); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (_tmp1_); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - loaded_url = _tmp5_; -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp6_ = loaded_url; -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp7_ = g_strconcat ("loaded url: ", _tmp6_, NULL); -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:132: %s", _tmp8_); -#line 132 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (_tmp8_); -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp9_ = loaded_url; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (string_contains (_tmp9_, "?")) { -#line 867 "FacebookPublishingAuthenticator.c" - gint index = 0; - const gchar* _tmp10_; - gchar* params = NULL; - const gchar* _tmp11_; - gint _tmp12_; - const gchar* _tmp13_; - gint _tmp14_; - gint _tmp15_; - gchar* _tmp16_; - const gchar* _tmp17_; - const gchar* _tmp18_; - gchar* _tmp19_; -#line 136 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp10_ = loaded_url; -#line 136 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - index = string_index_of_char (_tmp10_, (gunichar) '?', 0); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp11_ = loaded_url; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp12_ = index; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp13_ = loaded_url; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp14_ = strlen (_tmp13_); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp15_ = _tmp14_; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp16_ = string_slice (_tmp11_, (glong) _tmp12_, (glong) _tmp15_); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - params = _tmp16_; -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp17_ = loaded_url; -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp18_ = params; -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp19_ = string_replace (_tmp17_, _tmp18_, ""); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (loaded_url); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - loaded_url = _tmp19_; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (params); -#line 910 "FacebookPublishingAuthenticator.c" - } -#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp20_ = loaded_url; -#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (string_contains (_tmp20_, "login_success")) { -#line 916 "FacebookPublishingAuthenticator.c" - WebKitWebView* _tmp21_; - WebKitWebView* _tmp22_; - const gchar* _tmp23_; - const gchar* _tmp24_; -#line 143 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_cache_dirty = TRUE; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp21_ = shotwell_plugins_common_web_authentication_pane_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane)); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp22_ = _tmp21_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp23_ = webkit_web_view_get_uri (_tmp22_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp24_ = _tmp23_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_facebook_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_SUCCEEDED_SIGNAL], 0, _tmp24_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (_tmp22_); -#line 145 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (loaded_url); -#line 145 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return; -#line 939 "FacebookPublishingAuthenticator.c" - } -#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp25_ = loaded_url; -#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (string_contains (_tmp25_, "login_failure")) { -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_facebook_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_FAILED_SIGNAL], 0); -#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (loaded_url); -#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return; -#line 951 "FacebookPublishingAuthenticator.c" - } -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (loaded_url); -#line 955 "FacebookPublishingAuthenticator.c" -} - - -gboolean -publishing_authenticator_shotwell_facebook_web_authentication_pane_is_cache_dirty (void) -{ - gboolean result = FALSE; - gboolean _tmp0_; -#line 156 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_cache_dirty; -#line 156 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp0_; -#line 156 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 970 "FacebookPublishingAuthenticator.c" -} - - -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_construct (GType object_type, - const gchar* prefix, - const gchar* translation, - const gchar* exception_code, - const gchar* exception_translation, - const gchar* exception_code_2, - const gchar* exception_translation_2) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (prefix != NULL, NULL); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (translation != NULL, NULL); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup*) g_type_create_instance (object_type); -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = g_strdup (prefix); -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->prefix); -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->prefix = _tmp0_; -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = g_strdup (translation); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->translation); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->translation = _tmp1_; -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = g_strdup (exception_code); -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_code); -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->exception_code = _tmp2_; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = g_strdup (exception_translation); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_translation); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->exception_translation = _tmp3_; -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = g_strdup (exception_code_2); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_code_2); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->exception_code_2 = _tmp4_; -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = g_strdup (exception_translation_2); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_translation_2); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->exception_translation_2 = _tmp5_; -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self; -#line 1034 "FacebookPublishingAuthenticator.c" -} - - -static PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new (const gchar* prefix, - const gchar* translation, - const gchar* exception_code, - const gchar* exception_translation, - const gchar* exception_code_2, - const gchar* exception_translation_2) -{ -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, prefix, translation, exception_code, exception_translation, exception_code_2, exception_translation_2); -#line 1048 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_init (GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = NULL; -#line 1057 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_free_value (GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (value->data[0].v_pointer); -#line 1068 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (src_value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - dest_value->data[0].v_pointer = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (src_value->data[0].v_pointer); -#line 1081 "FacebookPublishingAuthenticator.c" - } else { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - dest_value->data[0].v_pointer = NULL; -#line 1085 "FacebookPublishingAuthenticator.c" - } -} - - -static gpointer -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_peek_pointer (const GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return value->data[0].v_pointer; -#line 1095 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (collect_values[0].v_pointer) { -#line 1107 "FacebookPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * object; - object = collect_values[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (object->parent_instance.g_class == NULL) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1114 "FacebookPublishingAuthenticator.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1118 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (object); -#line 1122 "FacebookPublishingAuthenticator.c" - } else { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = NULL; -#line 1126 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return NULL; -#line 1130 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup ** object_p; - object_p = collect_values[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (!object_p) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1146 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (!value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - *object_p = NULL; -#line 1152 "FacebookPublishingAuthenticator.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - *object_p = value->data[0].v_pointer; -#line 1156 "FacebookPublishingAuthenticator.c" - } else { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - *object_p = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (value->data[0].v_pointer); -#line 1160 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return NULL; -#line 1164 "FacebookPublishingAuthenticator.c" -} - - -static GParamSpec* -publishing_authenticator_shotwell_facebook_web_authentication_pane_param_spec_locale_lookup (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneParamSpecLocaleLookup* spec; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP), NULL); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return G_PARAM_SPEC (spec); -#line 1184 "FacebookPublishingAuthenticator.c" -} - - -static gpointer -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_get_locale_lookup (const GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP), NULL); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return value->data[0].v_pointer; -#line 1195 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_set_locale_lookup (GValue* value, - gpointer v_object) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * old; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - old = value->data[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (v_object) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = v_object; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (value->data[0].v_pointer); -#line 1218 "FacebookPublishingAuthenticator.c" - } else { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = NULL; -#line 1222 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (old) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (old); -#line 1228 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_value_take_locale_lookup (GValue* value, - gpointer v_object) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * old; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - old = value->data[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (v_object) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = v_object; -#line 1250 "FacebookPublishingAuthenticator.c" - } else { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - value->data[0].v_pointer = NULL; -#line 1254 "FacebookPublishingAuthenticator.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (old) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (old); -#line 1260 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_class_init (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass * klass) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_parent_class = g_type_class_peek_parent (klass); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - ((PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass *) klass)->finalize = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_finalize; -#line 1272 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_instance_init (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * self) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->ref_count = 1; -#line 1281 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_finalize (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * obj) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * self; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_handlers_destroy (self); -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->prefix); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->translation); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_code); -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_translation); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_code_2); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (self->exception_translation_2); -#line 1305 "FacebookPublishingAuthenticator.c" -} - - -static GType -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_init, publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_free_value, publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_copy_value, publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_peek_pointer, "p", publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_collect_value, "p", publishing_authenticator_shotwell_facebook_web_authentication_pane_value_locale_lookup_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id; - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id__volatile, publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id); - } - return publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_type_id__volatile; -} - - -static gpointer -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_ref (gpointer instance) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * self; - self = instance; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_atomic_int_inc (&self->ref_count); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return instance; -#line 1334 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_unref (gpointer instance) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup * self; - self = instance; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_GET_CLASS (self)->finalize (self); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1349 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_class_init (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass * klass) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp0_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp1_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp2_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp3_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp4_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp5_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp6_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp7_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp8_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp9_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp10_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp11_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp12_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp13_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp14_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp15_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp16_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp17_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp18_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp19_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp20_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp21_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp22_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp23_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp24_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp25_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp26_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp27_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp28_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp29_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp30_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp31_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp32_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp33_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp34_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp35_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp36_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp37_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp38_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp39_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp40_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp41_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp42_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp43_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup* _tmp44_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup** _tmp45_; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_parent_class = g_type_class_peek_parent (klass); -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - ((ShotwellPluginsCommonWebAuthenticationPaneClass *) klass)->on_page_load = (void (*) (ShotwellPluginsCommonWebAuthenticationPane *)) publishing_authenticator_shotwell_facebook_web_authentication_pane_real_on_page_load; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_facebook_web_authentication_pane_finalize; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_SUCCEEDED_SIGNAL] = g_signal_new ("login-succeeded", PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_WEB_AUTHENTICATION_PANE_LOGIN_FAILED_SIGNAL] = g_signal_new ("login-failed", PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("es", "es-la", "ES", "es-es", NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("en", "en-gb", "US", "en-us", NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("fr", "fr-fr", "CA", "fr-ca", NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("pt", "pt-br", "PT", "pt-pt", NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("zh", "zh-cn", "HK", "zh-hk", "TW", "zh-tw"); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("af", "af-za", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp6_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ar", "ar-ar", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp7_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("nb", "nb-no", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("no", "nb-no", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp9_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("id", "id-id", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp10_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ms", "ms-my", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp11_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ca", "ca-es", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp12_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("cs", "cs-cz", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp13_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("cy", "cy-gb", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp14_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("da", "da-dk", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp15_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("de", "de-de", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp16_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("tl", "tl-ph", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp17_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ko", "ko-kr", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp18_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("hr", "hr-hr", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp19_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("it", "it-it", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp20_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("lt", "lt-lt", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp21_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("hu", "hu-hu", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp22_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("nl", "nl-nl", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp23_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ja", "ja-jp", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp24_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("nb", "nb-no", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp25_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("no", "nb-no", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp26_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("pl", "pl-pl", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp27_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ro", "ro-ro", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp28_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ru", "ru-ru", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp29_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("sk", "sk-sk", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp30_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("sl", "sl-si", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp31_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("sv", "sv-se", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp32_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("th", "th-th", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp33_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("vi", "vi-vn", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp34_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("tr", "tr-tr", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp35_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("el", "el-gr", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp36_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("bg", "bg-bg", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp37_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("sr", "sr-rs", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp38_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("he", "he-il", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp39_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("hi", "hi-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp40_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("bn", "bn-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp41_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("pa", "pa-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp42_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ta", "ta-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp43_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("te", "te-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp44_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_new ("ml", "ml-in", NULL, NULL, NULL, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_ = g_new0 (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneLocaleLookup*, 45 + 1); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[0] = _tmp0_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[1] = _tmp1_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[2] = _tmp2_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[3] = _tmp3_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[4] = _tmp4_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[5] = _tmp5_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[6] = _tmp6_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[7] = _tmp7_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[8] = _tmp8_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[9] = _tmp9_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[10] = _tmp10_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[11] = _tmp11_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[12] = _tmp12_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[13] = _tmp13_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[14] = _tmp14_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[15] = _tmp15_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[16] = _tmp16_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[17] = _tmp17_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[18] = _tmp18_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[19] = _tmp19_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[20] = _tmp20_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[21] = _tmp21_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[22] = _tmp22_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[23] = _tmp23_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[24] = _tmp24_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[25] = _tmp25_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[26] = _tmp26_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[27] = _tmp27_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[28] = _tmp28_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[29] = _tmp29_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[30] = _tmp30_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[31] = _tmp31_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[32] = _tmp32_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[33] = _tmp33_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[34] = _tmp34_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[35] = _tmp35_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[36] = _tmp36_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[37] = _tmp37_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[38] = _tmp38_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[39] = _tmp39_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[40] = _tmp40_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[41] = _tmp41_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[42] = _tmp42_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[43] = _tmp43_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp45_[44] = _tmp44_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table = _tmp45_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_web_authentication_pane_locale_lookup_table_length1 = 45; -#line 1599 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_instance_init (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane * self) -{ -} - - -static void -publishing_authenticator_shotwell_facebook_web_authentication_pane_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane * self; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFacebookWebAuthenticationPane); -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_facebook_web_authentication_pane_parent_class)->finalize (obj); -#line 1617 "FacebookPublishingAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_facebook_web_authentication_pane_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFacebookWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_facebook_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_facebook_web_authentication_pane_instance_init, NULL }; - GType publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id; - publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id = g_type_register_static (SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, "PublishingAuthenticatorShotwellFacebookWebAuthenticationPane", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id); - } - return publishing_authenticator_shotwell_facebook_web_authentication_pane_type_id__volatile; -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 172 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 1640 "FacebookPublishingAuthenticator.c" -} - - -static void -_g_free0_ (gpointer var) -{ -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - var = (g_free (var), NULL); -#line 1649 "FacebookPublishingAuthenticator.c" -} - - -static void -_g_variant_unref0_ (gpointer var) -{ -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); -#line 1658 "FacebookPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFacebookFacebook* -publishing_authenticator_shotwell_facebook_facebook_construct (GType object_type, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self = NULL; - SpitPublishingPluginHost* _tmp0_; - GHashFunc _tmp1_; - GEqualFunc _tmp2_; - GHashTable* _tmp3_; -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFacebookFacebook*) g_object_new (object_type, NULL); -#line 172 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = _g_object_ref0 (host); -#line 172 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 172 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->priv->host = _tmp0_; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = g_str_hash; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = g_str_equal; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_); -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->priv->params = _tmp3_; -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self; -#line 1693 "FacebookPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFacebookFacebook* -publishing_authenticator_shotwell_facebook_facebook_new (SpitPublishingPluginHost* host) -{ -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_facebook_facebook_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, host); -#line 1702 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_real_authenticate (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (publishing_authenticator_shotwell_facebook_facebook_is_persistent_session_valid (self)) { -#line 1714 "FacebookPublishingAuthenticator.c" - gchar* access_token = NULL; - gchar* _tmp0_; - GHashTable* _tmp1_; - gchar* _tmp2_; - const gchar* _tmp3_; - GVariant* _tmp4_; -#line 181 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_facebook_get_persistent_access_token (self); -#line 181 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - access_token = _tmp0_; -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = self->priv->params; -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = g_strdup ("AccessToken"); -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = access_token; -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = g_variant_new_string (_tmp3_); -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_variant_ref_sink (_tmp4_); -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_hash_table_insert (_tmp1_, _tmp2_, _tmp4_); -#line 183 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated"); -#line 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return; -#line 1743 "FacebookPublishingAuthenticator.c" - } -#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (publishing_authenticator_shotwell_facebook_web_authentication_pane_is_cache_dirty ()) { -#line 1747 "FacebookPublishingAuthenticator.c" - SpitPublishingPluginHost* _tmp5_; - SpitPublishingPluginHost* _tmp6_; -#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = self->priv->host; -#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp5_, FALSE); -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp6_ = self->priv->host; -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_static_message_pane (_tmp6_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_RESTART_ERROR_MESSAGE, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 1758 "FacebookPublishingAuthenticator.c" - } else { -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_do_show_service_welcome_pane (self); -#line 1762 "FacebookPublishingAuthenticator.c" - } -} - - -static gboolean -publishing_authenticator_shotwell_facebook_facebook_real_can_logout (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; - gboolean result = FALSE; -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = TRUE; -#line 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 1778 "FacebookPublishingAuthenticator.c" -} - - -static gpointer -_g_hash_table_ref0 (gpointer self) -{ -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return self ? g_hash_table_ref (self) : NULL; -#line 1787 "FacebookPublishingAuthenticator.c" -} - - -static GHashTable* -publishing_authenticator_shotwell_facebook_facebook_real_get_authentication_parameter (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; - GHashTable* result = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = self->priv->params; -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = _g_hash_table_ref0 (_tmp0_); -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp1_; -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 1808 "FacebookPublishingAuthenticator.c" -} - - -void -publishing_authenticator_shotwell_facebook_facebook_invalidate_persistent_session (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:206: invalidating saved Facebook " \ -"session."); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_set_persistent_access_token (self, ""); -#line 1821 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_real_logout (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_invalidate_persistent_session (self); -#line 1833 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_real_refresh (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 1843 "FacebookPublishingAuthenticator.c" -} - - -static gboolean -publishing_authenticator_shotwell_facebook_facebook_is_persistent_session_valid (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ - gboolean result = FALSE; - gchar* token = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp3_; -#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self), FALSE); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_facebook_facebook_get_persistent_access_token (self); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - token = _tmp0_; -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = token; -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp1_ != NULL) { -#line 1865 "FacebookPublishingAuthenticator.c" - const gchar* _tmp2_; -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = token; -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:223: existing Facebook session fo" \ -"und in configuration database (access_token = %s).", _tmp2_); -#line 1871 "FacebookPublishingAuthenticator.c" - } else { -#line 226 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:226: no existing Facebook session" \ -" available."); -#line 1875 "FacebookPublishingAuthenticator.c" - } -#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = token; -#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp3_ != NULL; -#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (token); -#line 228 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 1885 "FacebookPublishingAuthenticator.c" -} - - -static gchar* -publishing_authenticator_shotwell_facebook_facebook_get_persistent_access_token (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 231 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self), NULL); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_token", NULL); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - result = _tmp1_; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return result; -#line 1905 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_set_persistent_access_token (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* access_token) -{ - SpitPublishingPluginHost* _tmp0_; -#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (access_token != NULL); -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_token", access_token); -#line 1922 "FacebookPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_facebook_facebook_on_login_clicked_spit_publishing_login_callback (gpointer self) -{ -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_on_login_clicked ((PublishingAuthenticatorShotwellFacebookFacebook*) self); -#line 1931 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_do_show_service_welcome_pane (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:240: ACTION: showing service welc" \ -"ome pane."); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_welcome_pane (_tmp0_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_SERVICE_WELCOME_MESSAGE, _publishing_authenticator_shotwell_facebook_facebook_on_login_clicked_spit_publishing_login_callback, self); -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = self->priv->host; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp1_, FALSE); -#line 1952 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_on_login_clicked (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:247: EVENT: user clicked 'Login' " \ -"on welcome pane."); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_do_hosted_web_authentication (self); -#line 1965 "FacebookPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_succeeded (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _sender, - const gchar* success_url, - gpointer self) -{ -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded ((PublishingAuthenticatorShotwellFacebookFacebook*) self, success_url); -#line 1976 "FacebookPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_failed (PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _sender, - gpointer self) -{ -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed ((PublishingAuthenticatorShotwellFacebookFacebook*) self); -#line 1986 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_do_hosted_web_authentication (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ - SpitPublishingPluginHost* _tmp0_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _tmp1_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _tmp2_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _tmp3_; - SpitPublishingPluginHost* _tmp4_; - PublishingAuthenticatorShotwellFacebookWebAuthenticationPane* _tmp5_; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:253: ACTION: doing hosted web aut" \ -"hentication."); -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 257 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_facebook_web_authentication_pane_new (); -#line 257 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->web_auth_pane); -#line 257 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->priv->web_auth_pane = _tmp1_; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = self->priv->web_auth_pane; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_connect_object (_tmp2_, "login-succeeded", (GCallback) _publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_succeeded, self, 0); -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = self->priv->web_auth_pane; -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_connect_object (_tmp3_, "login-failed", (GCallback) _publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed_publishing_authenticator_shotwell_facebook_web_authentication_pane_login_failed, self, 0); -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = self->priv->web_auth_pane; -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 2027 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_succeeded (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* success_url) -{ -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (success_url != NULL); -#line 267 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:267: EVENT: hosted web login succ" \ -"eeded."); -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_do_authenticate_session (self, success_url); -#line 2043 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_on_web_auth_pane_login_failed (PublishingAuthenticatorShotwellFacebookFacebook* self) -{ -#line 272 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:273: EVENT: hosted web login fail" \ -"ed."); -#line 281 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_do_show_service_welcome_pane (self); -#line 2056 "FacebookPublishingAuthenticator.c" -} - - -static gint -string_index_of (const gchar* self, - const gchar* needle, - gint start_index) -{ - gint result = 0; - gchar* _result_ = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, 0); -#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (needle != NULL, 0); -#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle); -#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _result_; -#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_ != NULL) { -#line 2081 "FacebookPublishingAuthenticator.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 2089 "FacebookPublishingAuthenticator.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 2095 "FacebookPublishingAuthenticator.c" - } -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_do_authenticate_session (PublishingAuthenticatorShotwellFacebookFacebook* self, - const gchar* good_login_uri) -{ - gchar* decoded_uri = NULL; - gchar* _tmp0_; - gchar* access_token = NULL; - gint index = 0; - const gchar* _tmp1_; - gint _tmp2_; - const gchar* _tmp9_; - gchar* trailing_params = NULL; - const gchar* _tmp13_; - gint _tmp14_; - const gchar* _tmp21_; - const gchar* _tmp25_; - gchar* _tmp26_; - GHashTable* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - GVariant* _tmp30_; - const gchar* _tmp31_; -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK (self)); -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_return_if_fail (good_login_uri != NULL); -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_debug ("FacebookPublishingAuthenticator.vala:285: ACTION: preparing to extract" \ -" session information encoded in uri = '%s'", good_login_uri); -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp0_ = soup_uri_decode (good_login_uri); -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - decoded_uri = _tmp0_; -#line 292 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - access_token = NULL; -#line 293 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp1_ = decoded_uri; -#line 293 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - index = string_index_of (_tmp1_, "#access_token=", 0); -#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp2_ = index; -#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp2_ >= 0) { -#line 2142 "FacebookPublishingAuthenticator.c" - const gchar* _tmp3_; - gint _tmp4_; - const gchar* _tmp5_; - gint _tmp6_; - gint _tmp7_; - gchar* _tmp8_; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp3_ = decoded_uri; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp4_ = index; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp5_ = decoded_uri; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp6_ = strlen (_tmp5_); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp7_ = _tmp6_; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp8_ = string_slice (_tmp3_, (glong) _tmp4_, (glong) _tmp7_); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - access_token = _tmp8_; -#line 2165 "FacebookPublishingAuthenticator.c" - } -#line 296 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp9_ = access_token; -#line 296 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp9_ == NULL) { -#line 2171 "FacebookPublishingAuthenticator.c" - SpitPublishingPluginHost* _tmp10_; - GError* _tmp11_; - GError* _tmp12_; -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp10_ = self->priv->host; -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp11_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Server redirect URL contained no access token"); -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp12_ = _tmp11_; -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp10_, _tmp12_); -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_error_free0 (_tmp12_); -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (decoded_uri); -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - return; -#line 2191 "FacebookPublishingAuthenticator.c" - } -#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - trailing_params = NULL; -#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp13_ = access_token; -#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - index = string_index_of_char (_tmp13_, (gunichar) '&', 0); -#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp14_ = index; -#line 305 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp14_ >= 0) { -#line 2203 "FacebookPublishingAuthenticator.c" - const gchar* _tmp15_; - gint _tmp16_; - const gchar* _tmp17_; - gint _tmp18_; - gint _tmp19_; - gchar* _tmp20_; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp15_ = access_token; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp16_ = index; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp17_ = access_token; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp18_ = strlen (_tmp17_); -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp19_ = _tmp18_; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp20_ = string_slice (_tmp15_, (glong) _tmp16_, (glong) _tmp19_); -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (trailing_params); -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - trailing_params = _tmp20_; -#line 2226 "FacebookPublishingAuthenticator.c" - } -#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp21_ = trailing_params; -#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - if (_tmp21_ != NULL) { -#line 2232 "FacebookPublishingAuthenticator.c" - const gchar* _tmp22_; - const gchar* _tmp23_; - gchar* _tmp24_; -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp22_ = access_token; -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp23_ = trailing_params; -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp24_ = string_replace (_tmp22_, _tmp23_, ""); -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - access_token = _tmp24_; -#line 2246 "FacebookPublishingAuthenticator.c" - } -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp25_ = access_token; -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp26_ = string_replace (_tmp25_, "#access_token=", ""); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - access_token = _tmp26_; -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp27_ = self->priv->params; -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp28_ = g_strdup ("AccessToken"); -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp29_ = access_token; -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp30_ = g_variant_new_string (_tmp29_); -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_variant_ref_sink (_tmp30_); -#line 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _tmp31_ = access_token; -#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_set_persistent_access_token (self, _tmp31_); -#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated"); -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (trailing_params); -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (access_token); -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_free0 (decoded_uri); -#line 2280 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_class_init (PublishingAuthenticatorShotwellFacebookFacebookClass * klass) -{ -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_parent_class = g_type_class_peek_parent (klass); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFacebookFacebookPrivate)); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_facebook_facebook_finalize; -#line 2293 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) -{ -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - publishing_authenticator_shotwell_facebook_facebook_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_facebook_facebook_real_authenticate; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_facebook_facebook_real_can_logout; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_facebook_facebook_real_get_authentication_parameter; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_facebook_facebook_real_logout; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_facebook_facebook_real_refresh; -#line 2312 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_instance_init (PublishingAuthenticatorShotwellFacebookFacebook * self) -{ -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_GET_PRIVATE (self); -#line 162 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self->priv->web_auth_pane = NULL; -#line 2323 "FacebookPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_facebook_facebook_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellFacebookFacebook * self; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook); -#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 162 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->web_auth_pane); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FacebookPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_facebook_facebook_parent_class)->finalize (obj); -#line 2341 "FacebookPublishingAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_facebook_facebook_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_facebook_facebook_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_facebook_facebook_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFacebookFacebookClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_facebook_facebook_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFacebookFacebook), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_facebook_facebook_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_facebook_facebook_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_shotwell_facebook_facebook_type_id; - publishing_authenticator_shotwell_facebook_facebook_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellFacebookFacebook", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_shotwell_facebook_facebook_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info); - g_once_init_leave (&publishing_authenticator_shotwell_facebook_facebook_type_id__volatile, publishing_authenticator_shotwell_facebook_facebook_type_id); - } - return publishing_authenticator_shotwell_facebook_facebook_type_id__volatile; -} - - -static void -_vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void -_vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint -_vala_array_length (gpointer array) -{ - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c deleted file mode 100644 index bdee2ff..0000000 --- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c +++ /dev/null @@ -1,1674 +0,0 @@ -/* FlickrPublishingAuthenticator.c generated by valac 0.40.4, the Vala compiler - * generated from FlickrPublishingAuthenticator.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <glib/gi18n-lib.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" - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION (publishing_authenticator_shotwell_flickr_authentication_request_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_AUTHENTICATION_REQUEST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_AUTHENTICATION_REQUEST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction; -typedef struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass; -typedef struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionPrivate PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction; -typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass; -typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE (publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane PublishingAuthenticatorShotwellFlickrWebAuthenticationPane; -typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass; -typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_flickr_web_authentication_pane_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES]; -#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_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_NUM_SIGNALS -}; -static guint publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_NUM_SIGNALS] = {0}; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) - -typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR (publishing_authenticator_shotwell_flickr_flickr_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrFlickr PublishingAuthenticatorShotwellFlickrFlickr; -typedef struct _PublishingAuthenticatorShotwellFlickrFlickrClass PublishingAuthenticatorShotwellFlickrFlickrClass; -typedef struct _PublishingAuthenticatorShotwellFlickrFlickrPrivate PublishingAuthenticatorShotwellFlickrFlickrPrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_flickr_flickr_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_NUM_PROPERTIES]; -#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))) - -struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction { - PublishingRESTSupportOAuth1Transaction parent_instance; - PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass { - PublishingRESTSupportOAuth1TransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction { - PublishingRESTSupportOAuth1Transaction parent_instance; - PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass { - PublishingRESTSupportOAuth1TransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane { - ShotwellPluginsCommonWebAuthenticationPane parent_instance; - PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass { - ShotwellPluginsCommonWebAuthenticationPaneClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate { - gchar* auth_code; -}; - -struct _PublishingAuthenticatorShotwellOAuth1Authenticator { - GObject parent_instance; - PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; - GHashTable* params; - PublishingRESTSupportOAuth1Session* session; - SpitPublishingPluginHost* host; -}; - -struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { - GObjectClass parent_class; - void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -}; - -struct _PublishingAuthenticatorShotwellFlickrFlickr { - PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance; - PublishingAuthenticatorShotwellFlickrFlickrPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrFlickrClass { - PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class; -}; - - -static gpointer publishing_authenticator_shotwell_flickr_authentication_request_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_flickr_flickr_parent_class = NULL; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENDPOINT_URL "https://api.flickr.com/services/rest" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_EXPIRED_SESSION_ERROR_CODE "98" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY "60dd96d4a2ad04888b09c9e18d82c26f" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET "d0960565e03547c1" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Flickr.\n" \ -"\n" \ -"Click Log in to log into Flickr in your Web browser. You will have to " \ -"authorize Shotwell Connect to link to your Flickr account.") -GType publishing_authenticator_shotwell_flickr_authentication_request_transaction_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingRESTSupportOAuth1Session* session); -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session); -GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, - const gchar* user_verifier); -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session, - const gchar* user_verifier); -GType publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LOGIN_URI "https://www.flickr.com/services/oauth/authorize?oauth_token=%s&perms=w" \ -"rite" -PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_new (const gchar* token); -PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (GType object_type, - const gchar* token); -static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed (GObject* base); -static void publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* self, - WebKitURISchemeRequest* request); -static void _publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, - gpointer self); -static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base); -static void _vala_SoupURI_free (SoupURI* self); -static guint8* _vala_array_dup1 (guint8* self, - int length); -static void publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize (GObject * obj); -GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; -GType publishing_authenticator_shotwell_flickr_flickr_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, - SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, - const gchar* api_key, - const gchar* api_secret, - SpitPublishingPluginHost* host); -static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (PublishingAuthenticatorShotwellFlickrFlickr* self); -static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -static void publishing_authenticator_shotwell_flickr_flickr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -static void publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* response); -static void publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* token, - const gchar* token_secret); -static void publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* token); -static void publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* pin); -static void _publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, - const gchar* auth_code, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_on_web_login_error (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void _publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static void publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* response); - - -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* -publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session) -{ - PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* self = NULL; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, session, "https://www.flickr.com/services/oauth/request_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 268 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* -publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingRESTSupportOAuth1Session* session) -{ -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, session); -#line 277 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_authentication_request_transaction_class_init (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass * klass) -{ -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_authentication_request_transaction_parent_class = g_type_class_peek_parent (klass); -#line 286 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_authentication_request_transaction_instance_init (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_flickr_authentication_request_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_authentication_request_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_authentication_request_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id; - publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id); - } - return publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* -publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session, - const gchar* user_verifier) -{ - PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (user_verifier != NULL, NULL); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, session, "https://www.flickr.com/services/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_verifier", user_verifier); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_rest_support_oauth1_session_get_request_phase_token (session); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp1_); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp1_); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 338 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* -publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, - const gchar* user_verifier) -{ -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, user_verifier); -#line 348 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass * klass) -{ -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 357 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_instance_init (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id; - publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id); - } - return publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* -publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (GType object_type, - const gchar* token) -{ - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (token != NULL, NULL); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = g_strdup_printf (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LOGIN_URI, token); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane*) g_object_new (object_type, "login-uri", _tmp1_, NULL); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp1_); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 400 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* -publishing_authenticator_shotwell_flickr_web_authentication_pane_new (const gchar* token) -{ -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, token); -#line 409 "FlickrPublishingAuthenticator.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 418 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, - gpointer self) -{ -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb ((PublishingAuthenticatorShotwellFlickrWebAuthenticationPane*) self, request); -#line 428 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed (GObject* base) -{ - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; - WebKitWebContext* ctx = NULL; - WebKitWebContext* _tmp0_; - WebKitWebContext* _tmp1_; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); -#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_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 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = webkit_web_context_get_default (); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ctx = _tmp1_; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - webkit_web_context_register_uri_scheme (ctx, "shotwell-auth", _publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback, g_object_ref (self), g_object_unref); -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (ctx); -#line 453 "FlickrPublishingAuthenticator.c" -} - - -static void -_vala_SoupURI_free (SoupURI* self) -{ -#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_boxed_free (soup_uri_get_type (), self); -#line 462 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) -{ - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; - SoupURI* uri = NULL; - WebKitWebView* _tmp0_; - WebKitWebView* _tmp1_; - const gchar* _tmp2_; - SoupURI* _tmp3_; - SoupURI* _tmp4_; - gboolean _tmp5_ = FALSE; - SoupURI* _tmp6_; - const gchar* _tmp7_; - const gchar* _tmp9_; -#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = webkit_web_view_get_uri (_tmp1_); -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = soup_uri_new (_tmp2_); -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (_tmp1_); -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - uri = _tmp4_; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = uri; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = _tmp6_->scheme; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (g_strcmp0 (_tmp7_, "shotwell-auth") == 0) { -#line 502 "FlickrPublishingAuthenticator.c" - const gchar* _tmp8_; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = self->priv->auth_code; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _tmp8_ == NULL; -#line 508 "FlickrPublishingAuthenticator.c" - } else { -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = FALSE; -#line 512 "FlickrPublishingAuthenticator.c" - } -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp5_) { -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL], 0); -#line 518 "FlickrPublishingAuthenticator.c" - } -#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = self->priv->auth_code; -#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp9_ != NULL) { -#line 524 "FlickrPublishingAuthenticator.c" - const gchar* _tmp10_; -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = self->priv->auth_code; -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL], 0, _tmp10_); -#line 530 "FlickrPublishingAuthenticator.c" - } -#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - __vala_SoupURI_free0 (uri); -#line 534 "FlickrPublishingAuthenticator.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 581 "FlickrPublishingAuthenticator.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 587 "FlickrPublishingAuthenticator.c" -} - - -static guint8* -_vala_array_dup1 (guint8* self, - int length) -{ -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_memdup (self, length * sizeof (guint8)); -#line 597 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* self, - WebKitURISchemeRequest* request) -{ - SoupURI* uri = NULL; - const gchar* _tmp0_; - SoupURI* _tmp1_; - GHashTable* form_data = NULL; - const gchar* _tmp2_; - GHashTable* _tmp3_; - gconstpointer _tmp4_; - gchar* _tmp5_; - gchar* response = NULL; - gchar* _tmp6_; - GMemoryInputStream* mins = NULL; - guint8* _tmp7_; - gint _tmp7__length1; - guint8* _tmp8_; - gint _tmp8__length1; - guint8* _tmp9_; - gint _tmp9__length1; - GMemoryInputStream* _tmp10_; -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE (self)); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (WEBKIT_IS_URI_SCHEME_REQUEST (request)); -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = webkit_uri_scheme_request_get_uri (request); -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = soup_uri_new (_tmp0_); -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - uri = _tmp1_; -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = uri->query; -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = soup_form_decode (_tmp2_); -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - form_data = _tmp3_; -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = g_hash_table_lookup (form_data, "oauth_verifier"); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = g_strdup ((const gchar*) _tmp4_); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->auth_code); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->auth_code = _tmp5_; -#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_strdup (""); -#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - response = _tmp6_; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = string_get_data (response, &_tmp7__length1); -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8__length1 = _tmp7__length1; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup1 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9__length1 = _tmp8__length1; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp9_, _tmp9__length1, NULL); -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - mins = _tmp10_; -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - webkit_uri_scheme_request_finish (request, G_TYPE_CHECK_INSTANCE_CAST (mins, g_input_stream_get_type (), GInputStream), (gint64) -1, "text/plain"); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (mins); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (response); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_hash_table_unref0 (form_data); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - __vala_SoupURI_free0 (uri); -#line 675 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_class_init (PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass * klass) -{ -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class = g_type_class_peek_parent (klass); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate)); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((GObjectClass *) klass)->constructed = (void (*) (GObject *)) publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((ShotwellPluginsCommonWebAuthenticationPaneClass *) klass)->on_page_load = (void (*) (ShotwellPluginsCommonWebAuthenticationPane *)) publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL] = g_signal_new ("authorized", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL] = g_signal_new ("error", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 696 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_instance_init (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self) -{ -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->auth_code = NULL; -#line 707 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->auth_code); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class)->finalize (obj); -#line 721 "FlickrPublishingAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_web_authentication_pane_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id; - publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id = g_type_register_static (SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, "PublishingAuthenticatorShotwellFlickrWebAuthenticationPane", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id); - } - return publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile; -} - - -PublishingAuthenticatorShotwellFlickrFlickr* -publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorShotwellFlickrFlickr * self = NULL; -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrFlickr*) publishing_authenticator_shotwell_oauth1_authenticator_construct (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET, host); -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 750 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrFlickr* -publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host) -{ -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_flickr_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, host); -#line 759 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellFlickrFlickr * self; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator))) { -#line 771 "FlickrPublishingAuthenticator.c" - PublishingRESTSupportOAuth1Session* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:84: attempt start: a persistent ses" \ -"sion is available; using it"); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = _tmp5_; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp0_, _tmp2_, _tmp4_, _tmp6_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp6_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp4_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp2_); -#line 803 "FlickrPublishingAuthenticator.c" - } else { -#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:89: attempt start: no persistent se" \ -"ssion available; showing login welcome pane"); -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (self); -#line 809 "FlickrPublishingAuthenticator.c" - } -} - - -static gboolean -publishing_authenticator_shotwell_flickr_flickr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellFlickrFlickr * self; - gboolean result = FALSE; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = TRUE; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 825 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellFlickrFlickr * self; - PublishingRESTSupportOAuth1Session* _tmp0_; -#line 98 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_oauth1_session_deauthenticate (_tmp0_); -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 842 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellFlickrFlickr * self; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 852 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self) -{ -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked ((PublishingAuthenticatorShotwellFlickrFlickr*) self); -#line 861 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (PublishingAuthenticatorShotwellFlickrFlickr* self) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:108: ACTION: installing login welco" \ -"me pane"); -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_welcome_pane (_tmp1_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SERVICE_WELCOME_MESSAGE, _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback, self); -#line 882 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked (PublishingAuthenticatorShotwellFlickrFlickr* self) -{ -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:115: EVENT: user clicked 'Login' bu" \ -"tton in the welcome pane"); -#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (self); -#line 895 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender); -#line 905 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender, err); -#line 916 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (PublishingAuthenticatorShotwellFlickrFlickr* self) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* txn = NULL; - PublishingRESTSupportOAuth1Session* _tmp2_; - PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* _tmp3_; - GError * _inner_error_ = NULL; -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:121: ACTION: running authentication" \ -" request transaction"); -#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_static_message_pane (_tmp1_, _ ("Preparing for login…"), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (_tmp2_); -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - txn = _tmp3_; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 951 "FlickrPublishingAuthenticator.c" - { -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 959 "FlickrPublishingAuthenticator.c" - goto __catch1_spit_publishing_publishing_error; - } -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 970 "FlickrPublishingAuthenticator.c" - } - } - goto __finally1; - __catch1_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp4_; - GError* _tmp5_; -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - err = _inner_error_; -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _inner_error_ = NULL; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = err; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (err); -#line 991 "FlickrPublishingAuthenticator.c" - } - __finally1: -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 1004 "FlickrPublishingAuthenticator.c" - } -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 1008 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:141: EVENT: OAuth authentication re" \ -"quest transaction completed; response = '%s'", _tmp3_); -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp3_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = publishing_rest_support_transaction_get_response (txn); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (self, _tmp5_); -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp5_); -#line 1050 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - SpitPublishingPluginHost* _tmp2_; -#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:152: EVENT: OAuth authentication re" \ -"quest transaction caused a network error"); -#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, err); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 1082 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* response) -{ - gchar* oauth_token = NULL; - gchar* oauth_token_secret = NULL; - GHashTable* data = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; - gconstpointer _tmp2_ = NULL; - gchar* _tmp3_; - GHashTable* _tmp4_; - gconstpointer _tmp5_ = NULL; - gchar* _tmp6_; - gboolean _tmp7_ = FALSE; - const gchar* _tmp8_; - const gchar* _tmp13_; - const gchar* _tmp14_; -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (response != NULL); -#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:159: ACTION: parsing authorization " \ -"request response '%s' into token and secret", response); -#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - oauth_token = NULL; -#line 162 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - oauth_token_secret = NULL; -#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = soup_form_decode (response); -#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data = _tmp0_; -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = data; -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_lookup_extended (_tmp1_, "oauth_token", NULL, &_tmp2_); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (oauth_token); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - oauth_token = _tmp3_; -#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = data; -#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_lookup_extended (_tmp4_, "oauth_token_secret", NULL, &_tmp5_); -#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (oauth_token_secret); -#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - oauth_token_secret = _tmp6_; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = oauth_token; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp8_ == NULL) { -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = TRUE; -#line 1144 "FlickrPublishingAuthenticator.c" - } else { - const gchar* _tmp9_; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = oauth_token_secret; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = _tmp9_ == NULL; -#line 1151 "FlickrPublishingAuthenticator.c" - } -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp7_) { -#line 1155 "FlickrPublishingAuthenticator.c" - SpitPublishingPluginHost* _tmp10_; - GError* _tmp11_; - GError* _tmp12_; -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "'%s' isn't a valid response to an OAuth authentication request", response); -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = _tmp11_; -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp10_, _tmp12_); -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (_tmp12_); -#line 1169 "FlickrPublishingAuthenticator.c" - } -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = oauth_token; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = oauth_token_secret; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (self, _tmp13_, _tmp14_); -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_hash_table_unref0 (data); -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (oauth_token_secret); -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (oauth_token); -#line 1183 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* token, - const gchar* token_secret) -{ - PublishingRESTSupportOAuth1Session* _tmp0_; -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token_secret != NULL); -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:177: EVENT: OAuth authentication to" \ -"ken (%s) and token secret (%s) available", token, token_secret); -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_oauth1_session_set_request_phase_credentials (_tmp0_, token, token_secret); -#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (self, token); -#line 1207 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, - const gchar* auth_code, - gpointer self) -{ -#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_verify_pin ((PublishingAuthenticatorShotwellFlickrFlickr*) self, auth_code); -#line 1218 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, - gpointer self) -{ -#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_web_login_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self); -#line 1228 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* token) -{ - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* pane = NULL; - PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_flickr_web_authentication_pane_new (token); -#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - pane = _tmp0_; -#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (pane, "authorized", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized, self, 0); -#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (pane, "error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error, self, 0); -#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (pane); -#line 1257 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_web_login_error (PublishingAuthenticatorShotwellFlickrFlickr* self) -{ - SpitPublishingPluginHost* _tmp0_; - GError* _tmp1_; - GError* _tmp2_; -#line 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_PROTOCOL_ERROR, _ ("Flickr authorization failed")); -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp0_, _tmp2_); -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (_tmp2_); -#line 1279 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender); -#line 1289 "FlickrPublishingAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender, err); -#line 1300 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* pin) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* txn = NULL; - PublishingRESTSupportOAuth1Session* _tmp2_; - PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* _tmp3_; - GError * _inner_error_ = NULL; -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (pin != NULL); -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:197: ACTION: validating authorizati" \ -"on PIN %s", pin); -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_static_message_pane (_tmp1_, _ ("Verifying authorization…"), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (_tmp2_, pin); -#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - txn = _tmp3_; -#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self, 0); -#line 1338 "FlickrPublishingAuthenticator.c" - { -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 1346 "FlickrPublishingAuthenticator.c" - goto __catch2_spit_publishing_publishing_error; - } -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 1357 "FlickrPublishingAuthenticator.c" - } - } - goto __finally2; - __catch2_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp4_; - GError* _tmp5_; -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - err = _inner_error_; -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _inner_error_ = NULL; -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = err; -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (err); -#line 1378 "FlickrPublishingAuthenticator.c" - } - __finally2: -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 1391 "FlickrPublishingAuthenticator.c" - } -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 1395 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); -#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:217: EVENT: fetching OAuth access t" \ -"oken over the network succeeded"); -#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (self, _tmp3_); -#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp3_); -#line 1429 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error (PublishingAuthenticatorShotwellFlickrFlickr* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - SpitPublishingPluginHost* _tmp2_; -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:227: EVENT: fetching OAuth access t" \ -"oken over the network caused an error."); -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, err); -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 1461 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (PublishingAuthenticatorShotwellFlickrFlickr* self, - const gchar* response) -{ - gchar* token = NULL; - gchar* token_secret = NULL; - gchar* username = NULL; - GHashTable* data = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; - gconstpointer _tmp2_ = NULL; - gchar* _tmp3_; - GHashTable* _tmp4_; - gconstpointer _tmp5_ = NULL; - gchar* _tmp6_; - GHashTable* _tmp7_; - gconstpointer _tmp8_ = NULL; - gchar* _tmp9_; - const gchar* _tmp10_; - const gchar* _tmp11_; - const gchar* _tmp12_; - gboolean _tmp13_ = FALSE; - gboolean _tmp14_ = FALSE; - const gchar* _tmp15_; -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (response != NULL); -#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:234: ACTION: extracting access phas" \ -"e credentials from '%s'", response); -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - token = NULL; -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - token_secret = NULL; -#line 238 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - username = NULL; -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = soup_form_decode (response); -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data = _tmp0_; -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = data; -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_lookup_extended (_tmp1_, "oauth_token", NULL, &_tmp2_); -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (token); -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - token = _tmp3_; -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = data; -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_lookup_extended (_tmp4_, "oauth_token_secret", NULL, &_tmp5_); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (token_secret); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - token_secret = _tmp6_; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = data; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_lookup_extended (_tmp7_, "username", NULL, &_tmp8_); -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (username); -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = g_strdup (_tmp8_); -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - username = _tmp9_; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = token; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = token_secret; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = username; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:245: access phase credentials: { to" \ -"ken = '%s'; token_secret = '%s'; username = '%s' }", _tmp10_, _tmp11_, _tmp12_); -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp15_ = token; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp15_ == NULL) { -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = TRUE; -#line 1549 "FlickrPublishingAuthenticator.c" - } else { - const gchar* _tmp16_; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp16_ = token_secret; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = _tmp16_ == NULL; -#line 1556 "FlickrPublishingAuthenticator.c" - } -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp14_) { -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = TRUE; -#line 1562 "FlickrPublishingAuthenticator.c" - } else { - const gchar* _tmp17_; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp17_ = username; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = _tmp17_ == NULL; -#line 1569 "FlickrPublishingAuthenticator.c" - } -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp13_) { -#line 1573 "FlickrPublishingAuthenticator.c" - SpitPublishingPluginHost* _tmp18_; - GError* _tmp19_; - GError* _tmp20_; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp19_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "expected " "access phase credentials to contain token, token secret, and username " \ -"but at " "least one of these is absent"); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp20_ = _tmp19_; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp18_, _tmp20_); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (_tmp20_); -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 1589 "FlickrPublishingAuthenticator.c" - } else { - PublishingRESTSupportOAuth1Session* _tmp21_; - const gchar* _tmp22_; - const gchar* _tmp23_; - const gchar* _tmp24_; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp21_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp22_ = token; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp23_ = token_secret; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp24_ = username; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp21_, _tmp22_, _tmp23_, _tmp24_); -#line 1605 "FlickrPublishingAuthenticator.c" - } -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_hash_table_unref0 (data); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (username); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (token_secret); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (token); -#line 1615 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_class_init (PublishingAuthenticatorShotwellFlickrFlickrClass * klass) -{ -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_parent_class = g_type_class_peek_parent (klass); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_authenticate; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_can_logout; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_logout; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_refresh; -#line 1632 "FlickrPublishingAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_flickr_flickr_instance_init (PublishingAuthenticatorShotwellFlickrFlickr * self) -{ -} - - -GType -publishing_authenticator_shotwell_flickr_flickr_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_flickr_flickr_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_flickr_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrFlickrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_flickr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrFlickr), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_flickr_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_flickr_type_id; - publishing_authenticator_shotwell_flickr_flickr_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, "PublishingAuthenticatorShotwellFlickrFlickr", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_flickr_type_id__volatile, publishing_authenticator_shotwell_flickr_flickr_type_id); - } - return publishing_authenticator_shotwell_flickr_flickr_type_id__volatile; -} - - - diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.c b/plugins/authenticator/shotwell/GoogleAuthenticator.c deleted file mode 100644 index 2b09bab..0000000 --- a/plugins/authenticator/shotwell/GoogleAuthenticator.c +++ /dev/null @@ -1,2733 +0,0 @@ -/* GoogleAuthenticator.c generated by valac 0.40.4, the Vala compiler - * generated from GoogleAuthenticator.vala, do not modify */ - - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include "shotwell-plugin-common.h" -#include <webkit2/webkit2.h> -#include <libsoup/soup.h> -#include <gio/gio.h> -#include "shotwell-plugin-dev-1.0.h" -#include <glib/gi18n-lib.h> -#include <json-glib/json-glib.h> - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE (publishing_authenticator_shotwell_google_web_authentication_pane_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPane)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPane PublishingAuthenticatorShotwellGoogleWebAuthenticationPane; -typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass; -typedef struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_google_web_authentication_pane_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_PROPERTIES]; -#define _g_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 -}; -static guint publishing_authenticator_shotwell_google_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_WEB_AUTHENTICATION_PANE_NUM_SIGNALS] = {0}; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION (publishing_authenticator_shotwell_google_session_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSession)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSessionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_SESSION, PublishingAuthenticatorShotwellGoogleSessionClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleSession PublishingAuthenticatorShotwellGoogleSession; -typedef struct _PublishingAuthenticatorShotwellGoogleSessionClass PublishingAuthenticatorShotwellGoogleSessionClass; -typedef struct _PublishingAuthenticatorShotwellGoogleSessionPrivate PublishingAuthenticatorShotwellGoogleSessionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION (publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GET_ACCESS_TOKENS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GET_ACCESS_TOKENS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GET_ACCESS_TOKENS_TRANSACTION, PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction; -typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass; -typedef struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION (publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_REFRESH_ACCESS_TOKEN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_REFRESH_ACCESS_TOKEN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_REFRESH_ACCESS_TOKEN_TRANSACTION, PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction; -typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass; -typedef struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION (publishing_authenticator_shotwell_google_username_fetch_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_USERNAME_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_USERNAME_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_USERNAME_FETCH_TRANSACTION, PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction; -typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass; -typedef struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE (publishing_authenticator_shotwell_google_google_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleGoogle PublishingAuthenticatorShotwellGoogleGoogle; -typedef struct _PublishingAuthenticatorShotwellGoogleGoogleClass PublishingAuthenticatorShotwellGoogleGoogleClass; -typedef struct _PublishingAuthenticatorShotwellGoogleGooglePrivate PublishingAuthenticatorShotwellGoogleGooglePrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_google_google_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_NUM_PROPERTIES]; -#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) -#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPane { - ShotwellPluginsCommonWebAuthenticationPane parent_instance; - PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass { - ShotwellPluginsCommonWebAuthenticationPaneClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleWebAuthenticationPanePrivate { - gchar* auth_code; -}; - -struct _PublishingAuthenticatorShotwellGoogleSession { - PublishingRESTSupportSession parent_instance; - PublishingAuthenticatorShotwellGoogleSessionPrivate * priv; - gchar* access_token; - gchar* refresh_token; - gint64 expires_at; -}; - -struct _PublishingAuthenticatorShotwellGoogleSessionClass { - PublishingRESTSupportSessionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleGoogle { - GObject parent_instance; - PublishingAuthenticatorShotwellGoogleGooglePrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellGoogleGoogleClass { - GObjectClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellGoogleGooglePrivate { - gchar* scope; - SpitPublishingPluginHost* host; - GHashTable* params; - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* web_auth_pane; - PublishingAuthenticatorShotwellGoogleSession* session; - gchar* welcome_message; -}; - - -static gpointer publishing_authenticator_shotwell_google_web_authentication_pane_parent_class = NULL; -extern gboolean publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty; -gboolean publishing_authenticator_shotwell_google_web_authentication_pane_cache_dirty = FALSE; -static gpointer publishing_authenticator_shotwell_google_session_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_google_get_access_tokens_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_google_refresh_access_token_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_google_username_fetch_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_google_google_parent_class = NULL; -static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_parent_iface = NULL; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_OAUTH_CLIENT_ID "534227538559-hvj2e8bj0vfv2f49r7gvjoq6jibfav67.apps.googleusercontent.c" \ -"om" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_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_finalize (GObject * obj); -GType publishing_authenticator_shotwell_google_session_get_type (void) G_GNUC_CONST; -static gboolean publishing_authenticator_shotwell_google_session_real_is_authenticated (PublishingRESTSupportSession* base); -void publishing_authenticator_shotwell_google_session_deauthenticate (PublishingAuthenticatorShotwellGoogleSession* self); -PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_new (void); -PublishingAuthenticatorShotwellGoogleSession* publishing_authenticator_shotwell_google_session_construct (GType object_type); -static void publishing_authenticator_shotwell_google_session_finalize (PublishingRESTSupportSession * obj); -GType publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GET_ACCESS_TOKENS_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token" -PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session, - const gchar* auth_code); -PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session, - const gchar* auth_code); -GType publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_REFRESH_ACCESS_TOKEN_TRANSACTION_ENDPOINT_URL "https://accounts.google.com/o/oauth2/token" -PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session); -PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* publishing_authenticator_shotwell_google_refresh_access_token_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session); -GType publishing_authenticator_shotwell_google_username_fetch_transaction_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_USERNAME_FETCH_TRANSACTION_ENDPOINT_URL "https://www.googleapis.com/oauth2/v1/userinfo" -PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session); -PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* publishing_authenticator_shotwell_google_username_fetch_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session); -GType publishing_authenticator_shotwell_google_google_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGooglePrivate)) -PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_new (const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_construct (GType object_type, - const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host); -static void _g_free0_ (gpointer var); -static void _g_variant_unref0_ (gpointer var); -static void publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* token); -static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (PublishingAuthenticatorShotwellGoogleGoogle* self); -static void publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (PublishingAuthenticatorShotwellGoogleGoogle* self); -static gboolean publishing_authenticator_shotwell_google_google_real_can_logout (SpitPublishingAuthenticator* base); -static GHashTable* publishing_authenticator_shotwell_google_google_real_get_authentication_parameter (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_google_google_real_refresh (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (PublishingAuthenticatorShotwellGoogleGoogle* self); -static void publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* auth_code); -static void _publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _sender, - const gchar* auth_code, - gpointer self); -static void publishing_authenticator_shotwell_google_google_do_get_access_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* auth_code); -static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static void publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* response_body); -static void publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, - gint64 abs_time); -static void publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* token); -static void publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self); -static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static void publishing_authenticator_shotwell_google_google_do_extract_username (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* response_body); -static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static gboolean ___lambda4_ (PublishingAuthenticatorShotwellGoogleGoogle* self); -static gboolean ____lambda4__gsource_func (gpointer self); -static void publishing_authenticator_shotwell_google_google_on_service_welcome_login (PublishingAuthenticatorShotwellGoogleGoogle* self); -static void _publishing_authenticator_shotwell_google_google_on_service_welcome_login_spit_publishing_login_callback (gpointer self); -static void publishing_authenticator_shotwell_google_google_finalize (GObject * obj); - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 317 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, - gpointer self) -{ -#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 void -publishing_authenticator_shotwell_google_web_authentication_pane_real_constructed (GObject* base) -{ - 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 void -_vala_SoupURI_free (SoupURI* self) -{ -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_boxed_free (soup_uri_get_type (), self); -#line 361 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) -{ - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self; - SoupURI* uri = NULL; - WebKitWebView* _tmp0_; - WebKitWebView* _tmp1_; - const gchar* _tmp2_; - 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 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 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = _tmp0_; -#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 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (_tmp1_); -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - uri = _tmp4_; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = uri; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _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" - 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" - 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" - __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 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 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 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 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_google_web_authentication_pane_finalize; -#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 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" -} - - -static void -publishing_authenticator_shotwell_google_web_authentication_pane_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane * self; -#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 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 664 "GoogleAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_google_web_authentication_pane_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_web_authentication_pane_instance_init, NULL }; - GType publishing_authenticator_shotwell_google_web_authentication_pane_type_id; - publishing_authenticator_shotwell_google_web_authentication_pane_type_id = g_type_register_static (SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, "PublishingAuthenticatorShotwellGoogleWebAuthenticationPane", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_google_web_authentication_pane_type_id); - } - return publishing_authenticator_shotwell_google_web_authentication_pane_type_id__volatile; -} - - -static gboolean -publishing_authenticator_shotwell_google_session_real_is_authenticated (PublishingRESTSupportSession* base) -{ - PublishingAuthenticatorShotwellGoogleSession * self; - gboolean result = FALSE; - const gchar* _tmp0_; -#line 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 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->access_token; -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - result = _tmp0_ != NULL; -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return result; -#line 696 "GoogleAuthenticator.c" -} - - -void -publishing_authenticator_shotwell_google_session_deauthenticate (PublishingAuthenticatorShotwellGoogleSession* self) -{ -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (self)); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->access_token); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->access_token = NULL; -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->refresh_token); -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->refresh_token = NULL; -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->expires_at = (gint64) -1; -#line 715 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleSession* -publishing_authenticator_shotwell_google_session_construct (GType object_type) -{ - PublishingAuthenticatorShotwellGoogleSession* self = NULL; -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self = (PublishingAuthenticatorShotwellGoogleSession*) publishing_rest_support_session_construct (object_type, NULL); -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self; -#line 727 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleSession* -publishing_authenticator_shotwell_google_session_new (void) -{ -#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 736 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_session_class_init (PublishingAuthenticatorShotwellGoogleSessionClass * klass) -{ -#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 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_authenticator_shotwell_google_session_finalize; -#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 749 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_session_instance_init (PublishingAuthenticatorShotwellGoogleSession * self) -{ -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->access_token = NULL; -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->refresh_token = NULL; -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->expires_at = (gint64) -1; -#line 762 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_session_finalize (PublishingRESTSupportSession * obj) -{ - PublishingAuthenticatorShotwellGoogleSession * self; -#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 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->access_token); -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->refresh_token); -#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 778 "GoogleAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_google_session_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_session_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_session_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleSession), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_session_instance_init, NULL }; - GType publishing_authenticator_shotwell_google_session_type_id; - publishing_authenticator_shotwell_google_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingAuthenticatorShotwellGoogleSession", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_google_session_type_id__volatile, publishing_authenticator_shotwell_google_session_type_id); - } - return publishing_authenticator_shotwell_google_session_type_id__volatile; -} - - -PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* -publishing_authenticator_shotwell_google_get_access_tokens_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session, - const gchar* auth_code) -{ - PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* self = NULL; -#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL); -#line 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (auth_code != NULL, NULL); -#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 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 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 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 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 75 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self; -#line 820 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* -publishing_authenticator_shotwell_google_get_access_tokens_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session, - const gchar* auth_code) -{ -#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 830 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_get_access_tokens_transaction_class_init (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass * klass) -{ -#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 839 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_get_access_tokens_transaction_instance_init (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_google_get_access_tokens_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_get_access_tokens_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_get_access_tokens_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id; - publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile, publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id); - } - return publishing_authenticator_shotwell_google_get_access_tokens_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* -publishing_authenticator_shotwell_google_refresh_access_token_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session) -{ - PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* self = NULL; - const gchar* _tmp0_; -#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL); -#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 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 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 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = session->refresh_token; -#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 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 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self; -#line 885 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* -publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session) -{ -#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 894 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_refresh_access_token_transaction_class_init (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass * klass) -{ -#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 903 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_refresh_access_token_transaction_instance_init (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_google_refresh_access_token_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_refresh_access_token_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_refresh_access_token_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id; - publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile, publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id); - } - return publishing_authenticator_shotwell_google_refresh_access_token_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* -publishing_authenticator_shotwell_google_username_fetch_transaction_construct (GType object_type, - PublishingAuthenticatorShotwellGoogleSession* session) -{ - PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_SESSION (session), NULL); -#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 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = session->access_token; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = g_strconcat ("Bearer ", _tmp0_, NULL); -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = _tmp1_; -#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 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp2_); -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self; -#line 951 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* -publishing_authenticator_shotwell_google_username_fetch_transaction_new (PublishingAuthenticatorShotwellGoogleSession* session) -{ -#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 960 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_username_fetch_transaction_class_init (PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass * klass) -{ -#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 969 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_username_fetch_transaction_instance_init (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_google_username_fetch_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleUsernameFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_username_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_username_fetch_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_google_username_fetch_transaction_type_id; - publishing_authenticator_shotwell_google_username_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_google_username_fetch_transaction_type_id); - } - return publishing_authenticator_shotwell_google_username_fetch_transaction_type_id__volatile; -} - - -static void -_g_free0_ (gpointer var) -{ -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - var = (g_free (var), NULL); -#line 998 "GoogleAuthenticator.c" -} - - -static void -_g_variant_unref0_ (gpointer var) -{ -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); -#line 1007 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleGoogle* -publishing_authenticator_shotwell_google_google_construct (GType object_type, - const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self = NULL; - SpitPublishingPluginHost* _tmp0_; - GHashFunc _tmp1_; - GEqualFunc _tmp2_; - GHashTable* _tmp3_; - gchar* _tmp4_; - PublishingAuthenticatorShotwellGoogleSession* _tmp5_; - gchar* _tmp6_; -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (scope != NULL, NULL); -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (welcome_message != NULL, NULL); -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self = (PublishingAuthenticatorShotwellGoogleGoogle*) g_object_new (object_type, NULL); -#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = _g_object_ref0 (host); -#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->host = _tmp0_; -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = g_str_hash; -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = g_str_equal; -#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 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->params = _tmp3_; -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = g_strdup (scope); -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->priv->scope); -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->scope = _tmp4_; -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_google_session_new (); -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->session = _tmp5_; -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = g_strdup (welcome_message); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->priv->welcome_message); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->welcome_message = _tmp6_; -#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self; -#line 1069 "GoogleAuthenticator.c" -} - - -PublishingAuthenticatorShotwellGoogleGoogle* -publishing_authenticator_shotwell_google_google_new (const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host) -{ -#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 1080 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_real_authenticate (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; - gchar* refresh_token = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_; -#line 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 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->host; -#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 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - refresh_token = _tmp1_; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = refresh_token; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_tmp3_ != NULL) { -#line 1105 "GoogleAuthenticator.c" - const gchar* _tmp4_; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = refresh_token; -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = g_strcmp0 (_tmp4_, "") != 0; -#line 1111 "GoogleAuthenticator.c" - } else { -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = FALSE; -#line 1115 "GoogleAuthenticator.c" - } -#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_tmp2_) { -#line 1119 "GoogleAuthenticator.c" - const gchar* _tmp5_; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = refresh_token; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_on_refresh_token_available (self, _tmp5_); -#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 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (refresh_token); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1131 "GoogleAuthenticator.c" - } -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (publishing_authenticator_shotwell_google_web_authentication_pane_is_cache_dirty ()) { -#line 1135 "GoogleAuthenticator.c" - SpitPublishingPluginHost* _tmp6_; - SpitPublishingPluginHost* _tmp7_; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = self->priv->host; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp6_, FALSE); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp7_ = self->priv->host; -#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 1146 "GoogleAuthenticator.c" - } else { -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (self); -#line 1150 "GoogleAuthenticator.c" - } -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (refresh_token); -#line 1154 "GoogleAuthenticator.c" -} - - -static gboolean -publishing_authenticator_shotwell_google_google_real_can_logout (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; - gboolean result = FALSE; -#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 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - result = TRUE; -#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return result; -#line 1169 "GoogleAuthenticator.c" -} - - -static gpointer -_g_hash_table_ref0 (gpointer self) -{ -#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self ? g_hash_table_ref (self) : NULL; -#line 1178 "GoogleAuthenticator.c" -} - - -static GHashTable* -publishing_authenticator_shotwell_google_google_real_get_authentication_parameter (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; - GHashTable* result = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; -#line 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 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->params; -#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = _g_hash_table_ref0 (_tmp0_); -#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - result = _tmp1_; -#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return result; -#line 1199 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_real_logout (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; - PublishingAuthenticatorShotwellGoogleSession* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#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 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->session; -#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_session_deauthenticate (_tmp0_); -#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->host; -#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 1219 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_real_refresh (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; -#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 1229 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized_publishing_authenticator_shotwell_google_web_authentication_pane_authorized (PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _sender, - const gchar* auth_code, - gpointer self) -{ -#line 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 1240 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ - gchar* user_authorization_url = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - const gchar* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - gchar* _tmp17_; - gchar* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - gchar* _tmp23_; - gchar* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp27_; - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp28_; - SpitPublishingPluginHost* _tmp29_; - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp30_; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 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 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 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = g_strconcat (_tmp3_, "&", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = g_strconcat (_tmp5_, "scope=", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp7_ = _tmp6_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp8_ = self->priv->scope; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp9_ = soup_uri_encode (_tmp8_, NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp10_ = _tmp9_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp11_ = g_strconcat (_tmp7_, _tmp10_, NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp12_ = _tmp11_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp13_ = g_strconcat (_tmp12_, "+", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp14_ = _tmp13_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp15_ = soup_uri_encode ("https://www.googleapis.com/auth/userinfo.profile", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp16_ = _tmp15_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp17_ = g_strconcat (_tmp14_, _tmp16_, NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp18_ = _tmp17_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp19_ = g_strconcat (_tmp18_, "&", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp20_ = _tmp19_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp21_ = g_strconcat (_tmp20_, "state=connect&", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp22_ = _tmp21_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp23_ = g_strconcat (_tmp22_, "access_type=offline&", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp24_ = _tmp23_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp25_ = g_strconcat (_tmp24_, "approval_prompt=force", NULL); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp26_ = _tmp25_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp24_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp22_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp20_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp18_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp16_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp14_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp12_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp10_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp7_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp5_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp3_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp1_); -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - user_authorization_url = _tmp26_; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp27_ = publishing_authenticator_shotwell_google_web_authentication_pane_new (user_authorization_url); -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (self->priv->web_auth_pane); -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->web_auth_pane = _tmp27_; -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp28_ = self->priv->web_auth_pane; -#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 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp29_ = self->priv->host; -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp30_ = self->priv->web_auth_pane; -#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 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (user_authorization_url); -#line 1381 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_web_auth_pane_authorized (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* auth_code) -{ - PublishingAuthenticatorShotwellGoogleWebAuthenticationPane* _tmp0_; - guint _tmp1_; - const gchar* _tmp2_; -#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (auth_code != NULL); -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->web_auth_pane; -#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 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 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->scope; -#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 184 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_get_access_tokens (self, auth_code); -#line 1408 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#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 1418 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_get_access_tokens_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 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 1429 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_get_access_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* auth_code) -{ - SpitPublishingPluginHost* _tmp0_; - PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* tokens_txn = NULL; - PublishingAuthenticatorShotwellGoogleSession* _tmp1_; - PublishingAuthenticatorShotwellGoogleGetAccessTokensTransaction* _tmp2_; - GError * _inner_error_ = NULL; -#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (auth_code != NULL); -#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 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_install_login_wait_pane (_tmp0_); -#line 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->session; -#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 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - tokens_txn = _tmp2_; -#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 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 1462 "GoogleAuthenticator.c" - { -#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 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 1470 "GoogleAuthenticator.c" - goto __catch3_spit_publishing_publishing_error; - } -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (tokens_txn); -#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 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1481 "GoogleAuthenticator.c" - } - } - goto __finally3; - __catch3_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp3_; - GError* _tmp4_; -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - err = _inner_error_; -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _inner_error_ = NULL; -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = self->priv->host; -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = err; -#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp3_, _tmp4_); -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (err); -#line 1502 "GoogleAuthenticator.c" - } - __finally3: -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (tokens_txn); -#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 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1515 "GoogleAuthenticator.c" - } -#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (tokens_txn); -#line 1519 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_get_access_tokens_complete (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 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 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp3_); -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp3_); -#line 1553 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_get_access_tokens_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - SpitPublishingPluginHost* _tmp4_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = _tmp2_; -#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 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp3_); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, err); -#line 1591 "GoogleAuthenticator.c" -} - - -static gpointer -_json_object_ref0 (gpointer self) -{ -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return self ? json_object_ref (self) : NULL; -#line 1600 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_extract_tokens (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* response_body) -{ - JsonParser* parser = NULL; - JsonParser* _tmp0_; - JsonObject* response_obj = NULL; - JsonParser* _tmp9_; - JsonNode* _tmp10_; - JsonObject* _tmp11_; - JsonObject* _tmp12_; - gboolean _tmp13_ = FALSE; - JsonObject* _tmp14_; - JsonObject* _tmp19_; - JsonObject* _tmp23_; - JsonObject* _tmp29_; - GError * _inner_error_ = NULL; -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (response_body != NULL); -#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 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = json_parser_new (); -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - parser = _tmp0_; -#line 1631 "GoogleAuthenticator.c" - { - JsonParser* _tmp1_; -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = parser; -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - json_parser_load_from_data (_tmp1_, response_body, (gssize) -1, &_inner_error_); -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1640 "GoogleAuthenticator.c" - goto __catch4_g_error; - } - } - goto __finally4; - __catch4_g_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp2_; - GError* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - GError* _tmp7_; - GError* _tmp8_; -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - err = _inner_error_; -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _inner_error_ = NULL; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->host; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = err; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = _tmp3_->message; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = g_strconcat ("Couldn't parse JSON response: ", _tmp4_, NULL); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = _tmp5_; -#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 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, _tmp8_); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (_tmp8_); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp6_); -#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (err); -#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1685 "GoogleAuthenticator.c" - } - __finally4: -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#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 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1698 "GoogleAuthenticator.c" - } -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp9_ = parser; -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp10_ = json_parser_get_root (_tmp9_); -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp11_ = json_node_get_object (_tmp10_); -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp12_ = _json_object_ref0 (_tmp11_); -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - response_obj = _tmp12_; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp14_ = response_obj; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (!json_object_has_member (_tmp14_, "access_token")) { -#line 1714 "GoogleAuthenticator.c" - JsonObject* _tmp15_; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp15_ = response_obj; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp13_ = !json_object_has_member (_tmp15_, "refresh_token"); -#line 1720 "GoogleAuthenticator.c" - } else { -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp13_ = FALSE; -#line 1724 "GoogleAuthenticator.c" - } -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_tmp13_) { -#line 1728 "GoogleAuthenticator.c" - SpitPublishingPluginHost* _tmp16_; - GError* _tmp17_; - GError* _tmp18_; -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp16_ = self->priv->host; -#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 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp18_ = _tmp17_; -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp16_, _tmp18_); -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (_tmp18_); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _json_object_unref0 (response_obj); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 1748 "GoogleAuthenticator.c" - } -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp19_ = response_obj; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (json_object_has_member (_tmp19_, "expires_in")) { -#line 1754 "GoogleAuthenticator.c" - gint64 duration = 0LL; - JsonObject* _tmp20_; - gint64 abs_time = 0LL; - gint64 _tmp21_; - gint64 _tmp22_; -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp20_ = response_obj; -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - duration = json_object_get_int_member (_tmp20_, "expires_in"); -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp21_ = duration; -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - abs_time = g_get_real_time () + ((_tmp21_ * 1000L) * 1000L); -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp22_ = abs_time; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (self, _tmp22_); -#line 1772 "GoogleAuthenticator.c" - } -#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp23_ = response_obj; -#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (json_object_has_member (_tmp23_, "refresh_token")) { -#line 1778 "GoogleAuthenticator.c" - gchar* refresh_token = NULL; - JsonObject* _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; - const gchar* _tmp27_; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp24_ = response_obj; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp25_ = json_object_get_string_member (_tmp24_, "refresh_token"); -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp26_ = g_strdup (_tmp25_); -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - refresh_token = _tmp26_; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp27_ = refresh_token; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (g_strcmp0 (_tmp27_, "") != 0) { -#line 1796 "GoogleAuthenticator.c" - const gchar* _tmp28_; -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp28_ = refresh_token; -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_on_refresh_token_available (self, _tmp28_); -#line 1802 "GoogleAuthenticator.c" - } -#line 251 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (refresh_token); -#line 1806 "GoogleAuthenticator.c" - } -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp29_ = response_obj; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (json_object_has_member (_tmp29_, "access_token")) { -#line 1812 "GoogleAuthenticator.c" - gchar* access_token = NULL; - JsonObject* _tmp30_; - const gchar* _tmp31_; - gchar* _tmp32_; - const gchar* _tmp33_; -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp30_ = response_obj; -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp31_ = json_object_get_string_member (_tmp30_, "access_token"); -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp32_ = g_strdup (_tmp31_); -#line 259 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - access_token = _tmp32_; -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp33_ = access_token; -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (g_strcmp0 (_tmp33_, "") != 0) { -#line 1830 "GoogleAuthenticator.c" - const gchar* _tmp34_; -#line 262 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp34_ = access_token; -#line 262 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_on_access_token_available (self, _tmp34_); -#line 1836 "GoogleAuthenticator.c" - } -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (access_token); -#line 1840 "GoogleAuthenticator.c" - } -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _json_object_unref0 (response_obj); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#line 1846 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_refresh_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* token) -{ - GHashTable* _tmp0_; - gchar* _tmp1_; - GVariant* _tmp2_; - PublishingAuthenticatorShotwellGoogleSession* _tmp3_; - gchar* _tmp4_; -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (token != NULL); -#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 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->params; -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = g_strdup ("RefreshToken"); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = g_variant_new_string (token); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_variant_ref_sink (_tmp2_); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_hash_table_insert (_tmp0_, _tmp1_, _tmp2_); -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = self->priv->session; -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = g_strdup (token); -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp3_->refresh_token); -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_->refresh_token = _tmp4_; -#line 1883 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_expiry_time_avilable (PublishingAuthenticatorShotwellGoogleGoogle* self, - gint64 abs_time) -{ - PublishingAuthenticatorShotwellGoogleSession* _tmp0_; - GHashTable* _tmp1_; - gchar* _tmp2_; - GVariant* _tmp3_; -#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 277 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->session; -#line 277 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_->expires_at = abs_time; -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->params; -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = g_strdup ("ExpiryTime"); -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = g_variant_new_int64 (abs_time); -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_variant_ref_sink (_tmp3_); -#line 278 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_hash_table_insert (_tmp1_, _tmp2_, _tmp3_); -#line 1913 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_access_token_available (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* token) -{ - PublishingAuthenticatorShotwellGoogleSession* _tmp0_; - gchar* _tmp1_; - GHashTable* _tmp2_; - gchar* _tmp3_; - GVariant* _tmp4_; -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (token != NULL); -#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 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->session; -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = g_strdup (token); -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp0_->access_token); -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_->access_token = _tmp1_; -#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->params; -#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = g_strdup ("AccessToken"); -#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = g_variant_new_string (token); -#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_variant_ref_sink (_tmp4_); -#line 286 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_hash_table_insert (_tmp2_, _tmp3_, _tmp4_); -#line 288 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_fetch_username (self); -#line 1952 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#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 1962 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 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 1973 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_fetch_username (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* txn = NULL; - PublishingAuthenticatorShotwellGoogleSession* _tmp2_; - PublishingAuthenticatorShotwellGoogleUsernameFetchTransaction* _tmp3_; - GError * _inner_error_ = NULL; -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_install_login_wait_pane (_tmp0_); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->host; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->session; -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_google_username_fetch_transaction_new (_tmp2_); -#line 297 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - txn = _tmp3_; -#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 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 2008 "GoogleAuthenticator.c" - { -#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 302 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2014 "GoogleAuthenticator.c" - goto __catch5_g_error; - } - } - goto __finally5; - __catch5_g_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp4_; - GError* _tmp5_; -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - err = _inner_error_; -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _inner_error_ = NULL; -#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = err; -#line 304 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (err); -#line 2036 "GoogleAuthenticator.c" - } - __finally5: -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#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 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 301 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2049 "GoogleAuthenticator.c" - } -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 2053 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 308 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 312 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_debug ("GoogleAuthenticator.vala:312: EVENT: username fetch transaction comple" \ -"ted successfully."); -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_extract_username (self, _tmp3_); -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp3_); -#line 2087 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_fetch_username_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - SpitPublishingPluginHost* _tmp2_; -#line 317 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 317 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_debug ("GoogleAuthenticator.vala:322: EVENT: username fetch transaction caused" \ -" a network error"); -#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->host; -#line 324 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, err); -#line 2117 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_extract_username (PublishingAuthenticatorShotwellGoogleGoogle* self, - const gchar* response_body) -{ - JsonParser* parser = NULL; - JsonParser* _tmp0_; - JsonObject* response_obj = NULL; - JsonParser* _tmp9_; - JsonNode* _tmp10_; - JsonObject* _tmp11_; - JsonObject* _tmp12_; - JsonObject* _tmp13_; - JsonObject* _tmp22_; - PublishingAuthenticatorShotwellGoogleSession* _tmp31_; - SpitPublishingPluginHost* _tmp32_; - PublishingAuthenticatorShotwellGoogleSession* _tmp33_; - const gchar* _tmp34_; - GError * _inner_error_ = NULL; -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (response_body != NULL); -#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 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = json_parser_new (); -#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - parser = _tmp0_; -#line 2149 "GoogleAuthenticator.c" - { - JsonParser* _tmp1_; -#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = parser; -#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - json_parser_load_from_data (_tmp1_, response_body, (gssize) -1, &_inner_error_); -#line 333 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2158 "GoogleAuthenticator.c" - goto __catch6_g_error; - } - } - goto __finally6; - __catch6_g_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp2_; - GError* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - GError* _tmp7_; - GError* _tmp8_; -#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - err = _inner_error_; -#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _inner_error_ = NULL; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->host; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = err; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = _tmp3_->message; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = g_strconcat ("Couldn't parse JSON response: ", _tmp4_, NULL); -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp6_ = _tmp5_; -#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 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, _tmp8_); -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (_tmp8_); -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp6_); -#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (err); -#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#line 337 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2203 "GoogleAuthenticator.c" - } - __finally6: -#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#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 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 332 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2216 "GoogleAuthenticator.c" - } -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp9_ = parser; -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp10_ = json_parser_get_root (_tmp9_); -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp11_ = json_node_get_object (_tmp10_); -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp12_ = _json_object_ref0 (_tmp11_); -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - response_obj = _tmp12_; -#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp13_ = response_obj; -#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (json_object_has_member (_tmp13_, "name")) { -#line 2232 "GoogleAuthenticator.c" - gchar* username = NULL; - JsonObject* _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; - const gchar* _tmp17_; -#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp14_ = response_obj; -#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp15_ = json_object_get_string_member (_tmp14_, "name"); -#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - username = _tmp16_; -#line 345 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp17_ = username; -#line 345 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (g_strcmp0 (_tmp17_, "") != 0) { -#line 2250 "GoogleAuthenticator.c" - GHashTable* _tmp18_; - gchar* _tmp19_; - const gchar* _tmp20_; - GVariant* _tmp21_; -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp18_ = self->priv->params; -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp19_ = g_strdup ("UserName"); -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp20_ = username; -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp21_ = g_variant_new_string (_tmp20_); -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_variant_ref_sink (_tmp21_); -#line 346 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_hash_table_insert (_tmp18_, _tmp19_, _tmp21_); -#line 2267 "GoogleAuthenticator.c" - } -#line 342 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (username); -#line 2271 "GoogleAuthenticator.c" - } -#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp22_ = response_obj; -#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (json_object_has_member (_tmp22_, "access_token")) { -#line 2277 "GoogleAuthenticator.c" - gchar* access_token = NULL; - JsonObject* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; - const gchar* _tmp26_; -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp23_ = response_obj; -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp24_ = json_object_get_string_member (_tmp23_, "access_token"); -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - access_token = _tmp25_; -#line 352 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp26_ = access_token; -#line 352 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (g_strcmp0 (_tmp26_, "") != 0) { -#line 2295 "GoogleAuthenticator.c" - GHashTable* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - GVariant* _tmp30_; -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp27_ = self->priv->params; -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp28_ = g_strdup ("AccessToken"); -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp29_ = access_token; -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp30_ = g_variant_new_string (_tmp29_); -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_variant_ref_sink (_tmp30_); -#line 353 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); -#line 2312 "GoogleAuthenticator.c" - } -#line 349 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (access_token); -#line 2316 "GoogleAuthenticator.c" - } -#line 358 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp31_ = self->priv->session; -#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 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp32_ = self->priv->host; -#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp33_ = self->priv->session; -#line 359 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp34_ = _tmp33_->refresh_token; -#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 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 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _json_object_unref0 (response_obj); -#line 327 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (parser); -#line 2336 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#line 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 2346 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 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 2357 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_exchange_refresh_token_for_access_token (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ - SpitPublishingPluginHost* _tmp0_; - PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* txn = NULL; - PublishingAuthenticatorShotwellGoogleSession* _tmp1_; - PublishingAuthenticatorShotwellGoogleRefreshAccessTokenTransaction* _tmp2_; - GError * _inner_error_ = NULL; -#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_install_login_wait_pane (_tmp0_); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->session; -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = publishing_authenticator_shotwell_google_refresh_access_token_transaction_new (_tmp1_); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - txn = _tmp2_; -#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 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 2387 "GoogleAuthenticator.c" - { -#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 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2395 "GoogleAuthenticator.c" - goto __catch7_spit_publishing_publishing_error; - } -#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#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 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 376 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2406 "GoogleAuthenticator.c" - } - } - goto __finally7; - __catch7_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp3_; - GError* _tmp4_; -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - err = _inner_error_; -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _inner_error_ = NULL; -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = self->priv->host; -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = err; -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp3_, _tmp4_); -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_error_free0 (err); -#line 2427 "GoogleAuthenticator.c" - } - __finally7: -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#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 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 375 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2440 "GoogleAuthenticator.c" - } -#line 365 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 2444 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_completed (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - PublishingAuthenticatorShotwellGoogleSession* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 382 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 382 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_debug ("GoogleAuthenticator.vala:387: EVENT: refresh access token transaction " \ -"completed successfully."); -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->session; -#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 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2477 "GoogleAuthenticator.c" - } -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = publishing_rest_support_transaction_get_response (txn); -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_extract_tokens (self, _tmp4_); -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (_tmp4_); -#line 2487 "GoogleAuthenticator.c" -} - - -static gboolean -___lambda4_ (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ - gboolean result = FALSE; -#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 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - result = FALSE; -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return result; -#line 2501 "GoogleAuthenticator.c" -} - - -static gboolean -____lambda4__gsource_func (gpointer self) -{ - gboolean result; - result = ___lambda4_ ((PublishingAuthenticatorShotwellGoogleGoogle*) self); -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return result; -#line 2512 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_refresh_access_token_transaction_error (PublishingAuthenticatorShotwellGoogleGoogle* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - PublishingAuthenticatorShotwellGoogleSession* _tmp2_; - gboolean _tmp3_ = FALSE; - SpitPublishingPluginHost* _tmp5_; -#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#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 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 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 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 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 402 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp2_ = self->priv->session; -#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 403 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - return; -#line 2546 "GoogleAuthenticator.c" - } -#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 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp3_ = TRUE; -#line 2552 "GoogleAuthenticator.c" - } else { -#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 2556 "GoogleAuthenticator.c" - } -#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - if (_tmp3_) { -#line 2560 "GoogleAuthenticator.c" - SpitPublishingPluginHost* _tmp4_; -#line 407 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp4_ = self->priv->host; -#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 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 2568 "GoogleAuthenticator.c" - } -#line 411 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp5_ = self->priv->host; -#line 411 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp5_, err); -#line 2574 "GoogleAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_google_google_on_service_welcome_login_spit_publishing_login_callback (gpointer self) -{ -#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_on_service_welcome_login ((PublishingAuthenticatorShotwellGoogleGoogle*) self); -#line 2583 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_do_show_service_welcome_pane (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 414 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _tmp1_ = self->priv->welcome_message; -#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 2602 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_on_service_welcome_login (PublishingAuthenticatorShotwellGoogleGoogle* self) -{ -#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE (self)); -#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 423 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - publishing_authenticator_shotwell_google_google_do_hosted_web_authentication (self); -#line 2615 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_class_init (PublishingAuthenticatorShotwellGoogleGoogleClass * klass) -{ -#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 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellGoogleGooglePrivate)); -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_google_google_finalize; -#line 2628 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) -{ -#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 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_google_google_real_authenticate; -#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 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 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_google_google_real_logout; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_google_google_real_refresh; -#line 2647 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_instance_init (PublishingAuthenticatorShotwellGoogleGoogle * self) -{ -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_PRIVATE (self); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->scope = NULL; -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->host = NULL; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->params = NULL; -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->web_auth_pane = NULL; -#line 112 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->session = NULL; -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - self->priv->welcome_message = NULL; -#line 2668 "GoogleAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_google_google_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellGoogleGoogle * self; -#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 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->priv->scope); -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_object_unref0 (self->priv->web_auth_pane); -#line 112 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - _g_free0 (self->priv->welcome_message); -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_google_google_parent_class)->finalize (obj); -#line 2692 "GoogleAuthenticator.c" -} - - -GType -publishing_authenticator_shotwell_google_google_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_google_google_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_google_google_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellGoogleGoogleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_google_google_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellGoogleGoogle), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_google_google_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_google_google_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_shotwell_google_google_type_id; - publishing_authenticator_shotwell_google_google_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellGoogleGoogle", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_shotwell_google_google_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info); - g_once_init_leave (&publishing_authenticator_shotwell_google_google_type_id__volatile, publishing_authenticator_shotwell_google_google_type_id); - } - return publishing_authenticator_shotwell_google_google_type_id__volatile; -} - - - diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.c b/plugins/authenticator/shotwell/OAuth1Authenticator.c deleted file mode 100644 index 7cf5780..0000000 --- a/plugins/authenticator/shotwell/OAuth1Authenticator.c +++ /dev/null @@ -1,772 +0,0 @@ -/* OAuth1Authenticator.c generated by valac 0.40.4, the Vala compiler - * generated from OAuth1Authenticator.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * Copyright 2017 Jens Georg <mail@jensge.org> - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include "shotwell-plugin-dev-1.0.h" -#include <stdlib.h> -#include <string.h> -#include "shotwell-plugin-common.h" - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) - -typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_oauth1_authenticator_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -struct _PublishingAuthenticatorShotwellOAuth1Authenticator { - GObject parent_instance; - PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; - GHashTable* params; - PublishingRESTSupportOAuth1Session* session; - SpitPublishingPluginHost* host; -}; - -struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { - GObjectClass parent_class; - void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -}; - - -static gpointer publishing_authenticator_shotwell_oauth1_authenticator_parent_class = NULL; -static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = NULL; - -GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; -void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, - gpointer self); -PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, - const gchar* api_key, - const gchar* api_secret, - SpitPublishingPluginHost* host); -static void _g_free0_ (gpointer var); -static void _g_variant_unref0_ (gpointer var); -static GVariant* _variant_new1 (const gchar* value); -static GVariant* _variant_new2 (const gchar* value); -void publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gboolean publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static gboolean publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base); -void publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -void publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* token); -void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* secret); -void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* username); -gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static GVariant* _variant_new3 (gchar* value); -static GVariant* _variant_new4 (gchar* value); -static GVariant* _variant_new5 (gchar* value); -static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj); - - -static void -_publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, - gpointer self) -{ -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated ((PublishingAuthenticatorShotwellOAuth1Authenticator*) self); -#line 105 "OAuth1Authenticator.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 114 "OAuth1Authenticator.c" -} - - -static void -_g_free0_ (gpointer var) -{ -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - var = (g_free (var), NULL); -#line 123 "OAuth1Authenticator.c" -} - - -static void -_g_variant_unref0_ (gpointer var) -{ -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); -#line 132 "OAuth1Authenticator.c" -} - - -static GVariant* -_variant_new1 (const gchar* value) -{ -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 141 "OAuth1Authenticator.c" -} - - -static GVariant* -_variant_new2 (const gchar* value) -{ -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 150 "OAuth1Authenticator.c" -} - - -PublishingAuthenticatorShotwellOAuth1Authenticator* -publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, - const gchar* api_key, - const gchar* api_secret, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorShotwellOAuth1Authenticator * self = NULL; - SpitPublishingPluginHost* _tmp0_; - GHashFunc _tmp1_; - GEqualFunc _tmp2_; - GHashTable* _tmp3_; - GHashTable* _tmp4_; - gchar* _tmp5_; - GVariant* _tmp6_; - GHashTable* _tmp7_; - gchar* _tmp8_; - GVariant* _tmp9_; - PublishingRESTSupportOAuth1Session* _tmp10_; - PublishingRESTSupportOAuth1Session* _tmp11_; - PublishingRESTSupportOAuth1Session* _tmp12_; -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (api_key != NULL, NULL); -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (api_secret != NULL, NULL); -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self = (PublishingAuthenticatorShotwellOAuth1Authenticator*) g_object_new (object_type, NULL); -#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = _g_object_ref0 (host); -#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_object_unref0 (self->host); -#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self->host = _tmp0_; -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = g_str_hash; -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp2_ = g_str_equal; -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_hash_table_unref0 (self->params); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self->params = _tmp3_; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp4_ = self->params; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp5_ = g_strdup ("ConsumerKey"); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp6_ = _variant_new1 (api_key); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_hash_table_insert (_tmp4_, _tmp5_, _tmp6_); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp7_ = self->params; -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp8_ = g_strdup ("ConsumerSecret"); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp9_ = _variant_new2 (api_secret); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_hash_table_insert (_tmp7_, _tmp8_, _tmp9_); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp10_ = publishing_rest_support_oauth1_session_new (NULL); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _publishing_rest_support_session_unref0 (self->session); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self->session = _tmp10_; -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp11_ = self->session; -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_rest_support_oauth1_session_set_api_credentials (_tmp11_, api_key, api_secret); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp12_ = self->session; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0); -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return self; -#line 230 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_authenticate'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return; -#line 241 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->authenticate (self); -#line 252 "OAuth1Authenticator.c" -} - - -static gboolean -publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - gboolean _tmp0_ = FALSE; -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_can_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return _tmp0_; -#line 264 "OAuth1Authenticator.c" -} - - -gboolean -publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->can_logout (self); -#line 275 "OAuth1Authenticator.c" -} - - -static gpointer -_g_hash_table_ref0 (gpointer self) -{ -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return self ? g_hash_table_ref (self) : NULL; -#line 284 "OAuth1Authenticator.c" -} - - -static GHashTable* -publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base) -{ - PublishingAuthenticatorShotwellOAuth1Authenticator * self; - GHashTable* result = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->params; -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = _g_hash_table_ref0 (_tmp0_); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - result = _tmp1_; -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return result; -#line 305 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return; -#line 316 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->logout (self); -#line 327 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_refresh'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return; -#line 338 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->refresh (self); -#line 349 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, ""); -#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, ""); -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, ""); -#line 364 "OAuth1Authenticator.c" -} - - -gboolean -publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - gchar* _tmp2_; - gchar* _tmp3_; - gboolean _tmp4_; -#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (self); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp3_ = _tmp2_; -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp4_ = _tmp3_ != NULL; -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp3_); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - if (_tmp4_) { -#line 389 "OAuth1Authenticator.c" - gchar* _tmp5_; - gchar* _tmp6_; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (self); -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp6_ = _tmp5_; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = _tmp6_ != NULL; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp6_); -#line 400 "OAuth1Authenticator.c" - } else { -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = FALSE; -#line 404 "OAuth1Authenticator.c" - } -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - if (_tmp1_) { -#line 408 "OAuth1Authenticator.c" - gchar* _tmp7_; - gchar* _tmp8_; -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp7_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (self); -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp8_ = _tmp7_; -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = _tmp8_ != NULL; -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp8_); -#line 419 "OAuth1Authenticator.c" - } else { -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = FALSE; -#line 423 "OAuth1Authenticator.c" - } -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - result = _tmp0_; -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return result; -#line 429 "OAuth1Authenticator.c" -} - - -gchar* -publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL); -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - result = _tmp1_; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return result; -#line 449 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* username) -{ - SpitPublishingPluginHost* _tmp0_; -#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (username != NULL); -#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", username); -#line 466 "OAuth1Authenticator.c" -} - - -gchar* -publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL); -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - result = _tmp1_; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return result; -#line 486 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* token) -{ - SpitPublishingPluginHost* _tmp0_; -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (token != NULL); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", token); -#line 503 "OAuth1Authenticator.c" -} - - -gchar* -publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", NULL); -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - result = _tmp1_; -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return result; -#line 523 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self, - const gchar* secret) -{ - SpitPublishingPluginHost* _tmp0_; -#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (secret != NULL); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->host; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", secret); -#line 540 "OAuth1Authenticator.c" -} - - -static GVariant* -_variant_new3 (gchar* value) -{ -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 549 "OAuth1Authenticator.c" -} - - -static GVariant* -_variant_new4 (gchar* value) -{ -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 558 "OAuth1Authenticator.c" -} - - -static GVariant* -_variant_new5 (gchar* value) -{ -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 567 "OAuth1Authenticator.c" -} - - -void -publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self) -{ - GHashTable* _tmp0_; - gchar* _tmp1_; - PublishingRESTSupportOAuth1Session* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - GVariant* _tmp5_; - GHashTable* _tmp6_; - gchar* _tmp7_; - PublishingRESTSupportOAuth1Session* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - GVariant* _tmp11_; - GHashTable* _tmp12_; - gchar* _tmp13_; - PublishingRESTSupportOAuth1Session* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - GVariant* _tmp17_; - PublishingRESTSupportOAuth1Session* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - PublishingRESTSupportOAuth1Session* _tmp21_; - gchar* _tmp22_; - gchar* _tmp23_; - PublishingRESTSupportOAuth1Session* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->params; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp1_ = g_strdup ("AuthToken"); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp2_ = self->session; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp3_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp2_); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp4_ = _tmp3_; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp5_ = _variant_new3 (_tmp4_); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_hash_table_insert (_tmp0_, _tmp1_, _tmp5_); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp4_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp6_ = self->params; -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp7_ = g_strdup ("AuthTokenSecret"); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp8_ = self->session; -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp9_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp8_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp10_ = _tmp9_; -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp11_ = _variant_new4 (_tmp10_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_hash_table_insert (_tmp6_, _tmp7_, _tmp11_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp10_); -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp12_ = self->params; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp13_ = g_strdup ("Username"); -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp14_ = self->session; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp15_ = publishing_rest_support_oauth1_session_get_username (_tmp14_); -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp16_ = _tmp15_; -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp17_ = _variant_new5 (_tmp16_); -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_hash_table_insert (_tmp12_, _tmp13_, _tmp17_); -#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp16_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp18_ = self->session; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp19_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp18_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp20_ = _tmp19_; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, _tmp20_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp20_); -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp21_ = self->session; -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp22_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp21_); -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp23_ = _tmp22_; -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, _tmp23_); -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp23_); -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp24_ = self->session; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp25_ = publishing_rest_support_oauth1_session_get_username (_tmp24_); -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp26_ = _tmp25_; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, _tmp26_); -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_free0 (_tmp26_); -#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated"); -#line 683 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_class_init (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass * klass) -{ -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_parent_class = g_type_class_peek_parent (klass); -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_logout; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_refresh; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_oauth1_authenticator_finalize; -#line 702 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) -{ -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface); -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_authenticate; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_can_logout; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_logout; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_refresh; -#line 721 "OAuth1Authenticator.c" -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_instance_init (PublishingAuthenticatorShotwellOAuth1Authenticator * self) -{ -} - - -static void -publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellOAuth1Authenticator * self; - PublishingRESTSupportOAuth1Session* _tmp0_; - guint _tmp1_; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _tmp0_ = self->session; -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self); -#line 11 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_hash_table_unref0 (self->params); -#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _publishing_rest_support_session_unref0 (self->session); -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - _g_object_unref0 (self->host); -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_oauth1_authenticator_parent_class)->finalize (obj); -#line 753 "OAuth1Authenticator.c" -} - - -GType -publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellOAuth1Authenticator), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_shotwell_oauth1_authenticator_type_id; - publishing_authenticator_shotwell_oauth1_authenticator_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellOAuth1Authenticator", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_type_add_interface_static (publishing_authenticator_shotwell_oauth1_authenticator_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info); - g_once_init_leave (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile, publishing_authenticator_shotwell_oauth1_authenticator_type_id); - } - return publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile; -} - - - diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c deleted file mode 100644 index a9568e0..0000000 --- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c +++ /dev/null @@ -1,416 +0,0 @@ -/* ShotwellAuthenticatorFactory.c generated by valac 0.40.4, the Vala compiler - * generated from ShotwellAuthenticatorFactory.vala, do not modify */ - - - -#include <glib.h> -#include <glib-object.h> -#include "shotwell-plugin-dev-1.0.h" -#include <gee.h> -#include <stdlib.h> -#include <string.h> -#include <glib/gi18n-lib.h> - - -#define PUBLISHING_AUTHENTICATOR_TYPE_FACTORY (publishing_authenticator_factory_get_type ()) -#define PUBLISHING_AUTHENTICATOR_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory)) -#define PUBLISHING_AUTHENTICATOR_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactoryClass)) -#define PUBLISHING_AUTHENTICATOR_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_TYPE_FACTORY)) -#define PUBLISHING_AUTHENTICATOR_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_TYPE_FACTORY)) -#define PUBLISHING_AUTHENTICATOR_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactoryClass)) - -typedef struct _PublishingAuthenticatorFactory PublishingAuthenticatorFactory; -typedef struct _PublishingAuthenticatorFactoryClass PublishingAuthenticatorFactoryClass; -typedef struct _PublishingAuthenticatorFactoryPrivate PublishingAuthenticatorFactoryPrivate; -enum { - PUBLISHING_AUTHENTICATOR_FACTORY_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_FACTORY_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_factory_properties[PUBLISHING_AUTHENTICATOR_FACTORY_NUM_PROPERTIES]; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) - -typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR (publishing_authenticator_shotwell_flickr_flickr_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrFlickr PublishingAuthenticatorShotwellFlickrFlickr; -typedef struct _PublishingAuthenticatorShotwellFlickrFlickrClass PublishingAuthenticatorShotwellFlickrFlickrClass; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK (publishing_authenticator_shotwell_facebook_facebook_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebook)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebookClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_IS_FACEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_FACEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FACEBOOK_TYPE_FACEBOOK, PublishingAuthenticatorShotwellFacebookFacebookClass)) - -typedef struct _PublishingAuthenticatorShotwellFacebookFacebook PublishingAuthenticatorShotwellFacebookFacebook; -typedef struct _PublishingAuthenticatorShotwellFacebookFacebookClass PublishingAuthenticatorShotwellFacebookFacebookClass; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE (publishing_authenticator_shotwell_google_google_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogle)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_IS_GOOGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_GOOGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_GOOGLE_TYPE_GOOGLE, PublishingAuthenticatorShotwellGoogleGoogleClass)) - -typedef struct _PublishingAuthenticatorShotwellGoogleGoogle PublishingAuthenticatorShotwellGoogleGoogle; -typedef struct _PublishingAuthenticatorShotwellGoogleGoogleClass PublishingAuthenticatorShotwellGoogleGoogleClass; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR (publishing_authenticator_shotwell_tumblr_tumblr_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) - -typedef struct _PublishingAuthenticatorShotwellTumblrTumblr PublishingAuthenticatorShotwellTumblrTumblr; -typedef struct _PublishingAuthenticatorShotwellTumblrTumblrClass PublishingAuthenticatorShotwellTumblrTumblrClass; - -struct _PublishingAuthenticatorFactory { - GObject parent_instance; - PublishingAuthenticatorFactoryPrivate * priv; -}; - -struct _PublishingAuthenticatorFactoryClass { - GObjectClass parent_class; -}; - - -static gpointer publishing_authenticator_factory_parent_class = NULL; -static PublishingAuthenticatorFactory* publishing_authenticator_factory_instance; -static PublishingAuthenticatorFactory* publishing_authenticator_factory_instance = NULL; -static SpitPublishingAuthenticatorFactoryIface * publishing_authenticator_factory_spit_publishing_authenticator_factory_parent_iface = NULL; - -GType publishing_authenticator_factory_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (void); -PublishingAuthenticatorFactory* publishing_authenticator_factory_new (void); -PublishingAuthenticatorFactory* publishing_authenticator_factory_construct (GType object_type); -static GeeList* publishing_authenticator_factory_real_get_available_authenticators (SpitPublishingAuthenticatorFactory* base); -static SpitPublishingAuthenticator* publishing_authenticator_factory_real_create (SpitPublishingAuthenticatorFactory* base, - const gchar* provider, - SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, - SpitPublishingPluginHost* host); -GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; -GType publishing_authenticator_shotwell_flickr_flickr_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_construct (GType object_type, - SpitPublishingPluginHost* host); -GType publishing_authenticator_shotwell_facebook_facebook_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_new (const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_construct (GType object_type, - const gchar* scope, - const gchar* welcome_message, - SpitPublishingPluginHost* host); -GType publishing_authenticator_shotwell_google_google_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, - SpitPublishingPluginHost* host); -GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) G_GNUC_CONST; -static void publishing_authenticator_factory_finalize (GObject * obj); - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return self ? g_object_ref (self) : NULL; -#line 135 "ShotwellAuthenticatorFactory.c" -} - - -PublishingAuthenticatorFactory* -publishing_authenticator_factory_get_instance (void) -{ - PublishingAuthenticatorFactory* result = NULL; - PublishingAuthenticatorFactory* _tmp0_; - PublishingAuthenticatorFactory* _tmp2_; - PublishingAuthenticatorFactory* _tmp3_; -#line 6 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp0_ = publishing_authenticator_factory_instance; -#line 6 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - if (_tmp0_ == NULL) { -#line 150 "ShotwellAuthenticatorFactory.c" - PublishingAuthenticatorFactory* _tmp1_; -#line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp1_ = publishing_authenticator_factory_new (); -#line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _g_object_unref0 (publishing_authenticator_factory_instance); -#line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - publishing_authenticator_factory_instance = _tmp1_; -#line 158 "ShotwellAuthenticatorFactory.c" - } -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp2_ = publishing_authenticator_factory_instance; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = _tmp3_; -#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 168 "ShotwellAuthenticatorFactory.c" -} - - -static GeeList* -publishing_authenticator_factory_real_get_available_authenticators (SpitPublishingAuthenticatorFactory* base) -{ - PublishingAuthenticatorFactory * self; - GeeList* result = NULL; - GeeArrayList* list = NULL; - GeeArrayList* _tmp0_; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory); -#line 14 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 14 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - list = _tmp0_; -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "flickr"); -#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "facebook"); -#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "picasa"); -#line 18 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "youtube"); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "tumblr"); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList); -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 199 "ShotwellAuthenticatorFactory.c" -} - - -static SpitPublishingAuthenticator* -publishing_authenticator_factory_real_create (SpitPublishingAuthenticatorFactory* base, - const gchar* provider, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorFactory * self; - SpitPublishingAuthenticator* result = NULL; - const gchar* _tmp0_; - GQuark _tmp2_ = 0U; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - static GQuark _tmp1_label0 = 0; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - static GQuark _tmp1_label1 = 0; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - static GQuark _tmp1_label2 = 0; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - static GQuark _tmp1_label3 = 0; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - static GQuark _tmp1_label4 = 0; -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory); -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - g_return_val_if_fail (provider != NULL, NULL); -#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp0_ = provider; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("flickr")))) { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 236 "ShotwellAuthenticatorFactory.c" - default: - { - PublishingAuthenticatorShotwellFlickrFlickr* _tmp3_; -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_flickr_new (host); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 246 "ShotwellAuthenticatorFactory.c" - } - } - } else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("facebook")))) { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 252 "ShotwellAuthenticatorFactory.c" - default: - { - PublishingAuthenticatorShotwellFacebookFacebook* _tmp4_; -#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp4_ = publishing_authenticator_shotwell_facebook_facebook_new (host); -#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 262 "ShotwellAuthenticatorFactory.c" - } - } - } else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("picasa")))) { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 268 "ShotwellAuthenticatorFactory.c" - default: - { - PublishingAuthenticatorShotwellGoogleGoogle* _tmp5_; -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp5_ = publishing_authenticator_shotwell_google_google_new ("https://picasaweb.google.com/data/", _ ("You are not currently logged into Picasa Web Albums.\n" \ -"\n" \ -"Click Log in to log into Picasa Web Albums in your Web browser. You wi" \ -"ll have to authorize Shotwell Connect to link to your Picasa Web Album" \ -"s account."), host); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 278 "ShotwellAuthenticatorFactory.c" - } - } - } else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("youtube")))) { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 284 "ShotwellAuthenticatorFactory.c" - default: - { - PublishingAuthenticatorShotwellGoogleGoogle* _tmp6_; -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp6_ = publishing_authenticator_shotwell_google_google_new ("https://gdata.youtube.com/", _ ("You are not currently logged into YouTube.\n" \ -"\n" \ -"You must have already signed up for a Google account and set it up for" \ -" use with YouTube to continue. You can set up most accounts by using y" \ -"our browser to log into the YouTube site at least once."), host); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 294 "ShotwellAuthenticatorFactory.c" - } - } - } else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("tumblr")))) { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 300 "ShotwellAuthenticatorFactory.c" - default: - { - PublishingAuthenticatorShotwellTumblrTumblr* _tmp7_; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - _tmp7_ = publishing_authenticator_shotwell_tumblr_tumblr_new (host); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 310 "ShotwellAuthenticatorFactory.c" - } - } - } else { -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - switch (0) { -#line 316 "ShotwellAuthenticatorFactory.c" - default: - { -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - result = NULL; -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return result; -#line 323 "ShotwellAuthenticatorFactory.c" - } - } - } -} - - -PublishingAuthenticatorFactory* -publishing_authenticator_factory_construct (GType object_type) -{ - PublishingAuthenticatorFactory * self = NULL; -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - self = (PublishingAuthenticatorFactory*) g_object_new (object_type, NULL); -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return self; -#line 338 "ShotwellAuthenticatorFactory.c" -} - - -PublishingAuthenticatorFactory* -publishing_authenticator_factory_new (void) -{ -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - return publishing_authenticator_factory_construct (PUBLISHING_AUTHENTICATOR_TYPE_FACTORY); -#line 347 "ShotwellAuthenticatorFactory.c" -} - - -static void -publishing_authenticator_factory_class_init (PublishingAuthenticatorFactoryClass * klass) -{ -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - publishing_authenticator_factory_parent_class = g_type_class_peek_parent (klass); -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_factory_finalize; -#line 358 "ShotwellAuthenticatorFactory.c" -} - - -static void -publishing_authenticator_factory_spit_publishing_authenticator_factory_interface_init (SpitPublishingAuthenticatorFactoryIface * iface) -{ -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - publishing_authenticator_factory_spit_publishing_authenticator_factory_parent_iface = g_type_interface_peek_parent (iface); -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - iface->get_available_authenticators = (GeeList* (*) (SpitPublishingAuthenticatorFactory *)) publishing_authenticator_factory_real_get_available_authenticators; -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - iface->create = (SpitPublishingAuthenticator* (*) (SpitPublishingAuthenticatorFactory *, const gchar*, SpitPublishingPluginHost*)) publishing_authenticator_factory_real_create; -#line 371 "ShotwellAuthenticatorFactory.c" -} - - -static void -publishing_authenticator_factory_instance_init (PublishingAuthenticatorFactory * self) -{ -} - - -static void -publishing_authenticator_factory_finalize (GObject * obj) -{ - PublishingAuthenticatorFactory * self; -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory); -#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" - G_OBJECT_CLASS (publishing_authenticator_factory_parent_class)->finalize (obj); -#line 389 "ShotwellAuthenticatorFactory.c" -} - - -GType -publishing_authenticator_factory_get_type (void) -{ - static volatile gsize publishing_authenticator_factory_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_factory_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorFactory), 0, (GInstanceInitFunc) publishing_authenticator_factory_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_authenticator_factory_info = { (GInterfaceInitFunc) publishing_authenticator_factory_spit_publishing_authenticator_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_factory_type_id; - publishing_authenticator_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorFactory", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_factory_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR_FACTORY, &spit_publishing_authenticator_factory_info); - g_once_init_leave (&publishing_authenticator_factory_type_id__volatile, publishing_authenticator_factory_type_id); - } - return publishing_authenticator_factory_type_id__volatile; -} - - - diff --git a/plugins/authenticator/shotwell/TumblrAuthenticator.c b/plugins/authenticator/shotwell/TumblrAuthenticator.c deleted file mode 100644 index 5fd814c..0000000 --- a/plugins/authenticator/shotwell/TumblrAuthenticator.c +++ /dev/null @@ -1,1488 +0,0 @@ -/* TumblrAuthenticator.c generated by valac 0.40.4, the Vala compiler - * generated from TumblrAuthenticator.vala, do not modify */ - -/* Copyright 2012 BJA Electronics - * Copyright 2017 Jens Georg - * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) - * Author: Jens Georg <mail@jensge.org> - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include "shotwell-plugin-dev-1.0.h" -#include <gtk/gtk.h> -#include <glib/gi18n-lib.h> -#include "shotwell-plugin-common.h" -#include <libsoup/soup.h> - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE (publishing_authenticator_shotwell_tumblr_authentication_pane_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass)) - -typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane PublishingAuthenticatorShotwellTumblrAuthenticationPane; -typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass; -typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_tumblr_authentication_pane_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_NUM_PROPERTIES]; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_TYPE_MODE (publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type ()) -#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_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_NUM_SIGNALS -}; -static guint publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_NUM_SIGNALS] = {0}; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction; -typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass; -typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) - -typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; -typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR (publishing_authenticator_shotwell_tumblr_tumblr_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) - -typedef struct _PublishingAuthenticatorShotwellTumblrTumblr PublishingAuthenticatorShotwellTumblrTumblr; -typedef struct _PublishingAuthenticatorShotwellTumblrTumblrClass PublishingAuthenticatorShotwellTumblrTumblrClass; -typedef struct _PublishingAuthenticatorShotwellTumblrTumblrPrivate PublishingAuthenticatorShotwellTumblrTumblrPrivate; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_0_PROPERTY, - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_NUM_PROPERTIES -}; -static GParamSpec* publishing_authenticator_shotwell_tumblr_tumblr_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_NUM_PROPERTIES]; -#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) -#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) - -struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane { - GObject parent_instance; - PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass { - GObjectClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate { - GtkBox* pane_widget; - GtkBuilder* builder; - GtkEntry* username_entry; - GtkEntry* password_entry; - GtkButton* login_button; -}; - -typedef enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO, - PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER -} PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode; - -struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction { - PublishingRESTSupportOAuth1Transaction parent_instance; - PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass { - PublishingRESTSupportOAuth1TransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellOAuth1Authenticator { - GObject parent_instance; - PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; - GHashTable* params; - PublishingRESTSupportOAuth1Session* session; - SpitPublishingPluginHost* host; -}; - -struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { - GObjectClass parent_class; - void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); - void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -}; - -struct _PublishingAuthenticatorShotwellTumblrTumblr { - PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance; - PublishingAuthenticatorShotwellTumblrTumblrPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellTumblrTumblrClass { - PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class; -}; - - -static gpointer publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = NULL; -static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE; -static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = NULL; -static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE; -static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = NULL; -static SpitPublishingDialogPaneIface * publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL; -static gpointer publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_tumblr_tumblr_parent_class = NULL; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENDPOINT_URL "https://www.tumblr.com/" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" -GType publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate)) -GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); -PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, - PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); -static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, - gpointer self); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); -static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, - gpointer self); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); -static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, - gpointer self); -GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); -static GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base); -static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); -static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj); -GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, - const gchar* username, - const gchar* password); -PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session, - const gchar* username, - const gchar* password); -GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; -GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, - SpitPublishingPluginHost* host); -PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, - const gchar* api_key, - const gchar* api_secret, - SpitPublishingPluginHost* host); -static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); -static gboolean publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -static void publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); -static void publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base); -static void publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* username, - const gchar* password); -static void _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, - const gchar* user, - const gchar* password, - gpointer self); -static void publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* username, - const gchar* password); -static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingRESTSupportTransaction* txn); -static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self); -static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingRESTSupportTransaction* txn, - GError* err); -static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self); -static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* response); - - -GType -publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile)) { - static const GEnumValue values[] = {{PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO", "intro"}, {PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER", "failed-retry-user"}, {0, NULL, NULL}}; - GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id; - publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id = g_enum_register_static ("PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode", values); - g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id); - } - return publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile; -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 260 "TumblrAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, - gpointer self) -{ -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); -#line 270 "TumblrAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, - gpointer self) -{ -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); -#line 280 "TumblrAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, - gpointer self) -{ -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); -#line 290 "TumblrAuthenticator.c" -} - - -PublishingAuthenticatorShotwellTumblrAuthenticationPane* -publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, - PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self = NULL; - GtkBox* _tmp0_; - GError * _inner_error_ = NULL; -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = (PublishingAuthenticatorShotwellTumblrAuthenticationPane*) g_object_new (object_type, NULL); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_object_ref_sink (_tmp0_); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->pane_widget = _tmp0_; -#line 311 "TumblrAuthenticator.c" - { - GtkBuilder* _tmp1_; - GtkBuilder* _tmp2_; - GtkBuilder* _tmp3_; - GtkWidget* content = NULL; - GtkBuilder* _tmp4_; - GObject* _tmp5_; - GtkWidget* _tmp6_; - GtkLabel* message_label = NULL; - GtkBuilder* _tmp7_; - GObject* _tmp8_; - GtkLabel* _tmp9_; - GtkBuilder* _tmp16_; - GObject* _tmp17_; - GtkEntry* _tmp18_; - GtkBuilder* _tmp19_; - GObject* _tmp20_; - GtkEntry* _tmp21_; - GtkBuilder* _tmp22_; - GObject* _tmp23_; - GtkButton* _tmp24_; - GtkEntry* _tmp25_; - GtkEntry* _tmp26_; - GtkButton* _tmp27_; - GtkWidget* _tmp28_; - GtkContainer* _tmp29_; - GtkContainer* _tmp30_; - GtkWidget* _tmp31_; - GtkBox* _tmp32_; - GtkWidget* _tmp33_; -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = gtk_builder_new (); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->builder); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->builder = _tmp1_; -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = self->priv->builder; -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/tumblr_authentication_pane.ui", &_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 354 "TumblrAuthenticator.c" - goto __catch8_g_error; - } -#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = self->priv->builder; -#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_builder_connect_signals (_tmp3_, NULL); -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = self->priv->builder; -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp5_ = gtk_builder_get_object (_tmp4_, "content"); -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp5_) : NULL); -#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - content = _tmp6_; -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp7_ = self->priv->builder; -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp8_ = gtk_builder_get_object (_tmp7_, "message_label"); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - message_label = _tmp9_; -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - switch (mode) { -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO: -#line 381 "TumblrAuthenticator.c" - { - GtkLabel* _tmp10_; - const gchar* _tmp11_; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp10_ = message_label; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp11_ = publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_label_set_text (_tmp10_, _tmp11_); -#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - break; -#line 393 "TumblrAuthenticator.c" - } -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER: -#line 397 "TumblrAuthenticator.c" - { - GtkLabel* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp12_ = message_label; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp13_ = publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp14_ = g_strdup_printf ("<b>%s</b>\n\n%s", _ ("Invalid User Name or Password"), _tmp13_); -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp15_ = _tmp14_; -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_label_set_markup (_tmp12_, _tmp15_); -#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp15_); -#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - break; -#line 417 "TumblrAuthenticator.c" - } - default: -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - break; -#line 422 "TumblrAuthenticator.c" - } -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp16_ = self->priv->builder; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp17_ = gtk_builder_get_object (_tmp16_, "username_entry"); -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp17_) : NULL); -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->username_entry); -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->username_entry = _tmp18_; -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp19_ = self->priv->builder; -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp20_ = gtk_builder_get_object (_tmp19_, "password_entry"); -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp20_) : NULL); -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->password_entry); -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->password_entry = _tmp21_; -#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp22_ = self->priv->builder; -#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp23_ = gtk_builder_get_object (_tmp22_, "login_button"); -#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, gtk_button_get_type ()) ? ((GtkButton*) _tmp23_) : NULL); -#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->login_button); -#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->login_button = _tmp24_; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp25_ = self->priv->username_entry; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed, self, 0); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp26_ = self->priv->password_entry; -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed, self, 0); -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp27_ = self->priv->login_button; -#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (_tmp27_, "clicked", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked, self, 0); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp28_ = content; -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp29_ = gtk_widget_get_parent (_tmp28_); -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp30_ = _tmp29_; -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp31_ = content; -#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_container_remove (_tmp30_, _tmp31_); -#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp32_ = self->priv->pane_widget; -#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp33_ = content; -#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_container_get_type (), GtkContainer), _tmp33_); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (message_label); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (content); -#line 486 "TumblrAuthenticator.c" - } - goto __finally8; - __catch8_g_error: - { - GError* e = NULL; - GError* _tmp34_; - const gchar* _tmp35_; -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - e = _inner_error_; -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _inner_error_ = NULL; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp34_ = e; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp35_ = _tmp34_->message; -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_warning (_ ("Could not load UI: %s"), _tmp35_); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_error_free0 (e); -#line 506 "TumblrAuthenticator.c" - } - __finally8: -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return NULL; -#line 517 "TumblrAuthenticator.c" - } -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return self; -#line 521 "TumblrAuthenticator.c" -} - - -PublishingAuthenticatorShotwellTumblrAuthenticationPane* -publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) -{ -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return publishing_authenticator_shotwell_tumblr_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, mode); -#line 530 "TumblrAuthenticator.c" -} - - -GtkWidget* -publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) -{ - GtkWidget* result = NULL; - GtkButton* _tmp0_; - GtkWidget* _tmp1_; -#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self), NULL); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = self->priv->login_button; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - result = _tmp1_; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return result; -#line 550 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) -{ - GtkEntry* _tmp0_; - const gchar* _tmp1_; - GtkEntry* _tmp2_; - const gchar* _tmp3_; -#line 80 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = self->priv->username_entry; -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = gtk_entry_get_text (_tmp0_); -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = self->priv->password_entry; -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = gtk_entry_get_text (_tmp2_); -#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL], 0, _tmp1_, _tmp3_); -#line 573 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) -{ -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); -#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); -#line 584 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) -{ -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); -#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); -#line 595 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) -{ - gboolean _tmp0_ = FALSE; - GtkEntry* _tmp1_; - guint _tmp2_; - guint _tmp3_; - GtkButton* _tmp7_; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = self->priv->username_entry; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = gtk_entry_get_text_length (_tmp1_); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (_tmp3_ > ((guint) 0)) { -#line 617 "TumblrAuthenticator.c" - GtkEntry* _tmp4_; - guint _tmp5_; - guint _tmp6_; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = self->priv->password_entry; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp5_ = gtk_entry_get_text_length (_tmp4_); -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp6_ = _tmp5_; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = _tmp6_ > ((guint) 0); -#line 629 "TumblrAuthenticator.c" - } else { -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = FALSE; -#line 633 "TumblrAuthenticator.c" - } -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp7_ = self->priv->login_button; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), _tmp0_); -#line 639 "TumblrAuthenticator.c" -} - - -static GtkWidget* -publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; - GtkWidget* result = NULL; - GtkBox* _tmp0_; - GtkWidget* _tmp1_; -#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = self->priv->pane_widget; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - result = _tmp1_; -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return result; -#line 660 "TumblrAuthenticator.c" -} - - -static SpitPublishingDialogPaneGeometryOptions -publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; - SpitPublishingDialogPaneGeometryOptions result = 0; -#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return result; -#line 675 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; - GtkEntry* _tmp0_; - GtkEntry* _tmp1_; - GtkButton* _tmp2_; -#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = self->priv->username_entry; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = self->priv->password_entry; -#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_entry_set_activates_default (_tmp1_, TRUE); -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = self->priv->login_button; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE); -#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); -#line 702 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; -#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); -#line 712 "TumblrAuthenticator.c" -} - - -static void -g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2); - register GMarshalFunc_VOID__STRING_STRING callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (n_param_values == 3); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - data1 = closure->data; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - data2 = param_values->data[0].v_pointer; -#line 738 "TumblrAuthenticator.c" - } else { -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - data1 = param_values->data[0].v_pointer; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - data2 = closure->data; -#line 744 "TumblrAuthenticator.c" - } -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2); -#line 750 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_class_init (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass * klass) -{ - gchar* _tmp0_; - gchar* _tmp1_; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = g_type_class_peek_parent (klass); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate)); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_tumblr_authentication_pane_finalize; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL] = g_signal_new ("login", PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = g_strdup (_ ("Enter the username and password associated with your Tumblr account.")); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = _tmp0_; -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = g_strdup (_ ("Username and/or password invalid. Please try again")); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = _tmp1_; -#line 775 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) -{ -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled; -#line 792 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init (PublishingAuthenticatorShotwellTumblrAuthenticationPane * self) -{ -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE (self); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self->priv->pane_widget = NULL; -#line 803 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj) -{ - PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->builder); -#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->username_entry); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->password_entry); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (self->priv->login_button); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class)->finalize (obj); -#line 825 "TumblrAuthenticator.c" -} - - -/** - * The authentication pane used when asking service URL, user name and password - * from the user. - */ -GType -publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_shotwell_tumblr_authentication_pane_type_id; - publishing_authenticator_shotwell_tumblr_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellTumblrAuthenticationPane", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_shotwell_tumblr_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); - g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_type_id); - } - return publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile; -} - - -PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* -publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session, - const gchar* username, - const gchar* password) -{ - PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_val_if_fail (username != NULL, NULL); -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_val_if_fail (password != NULL, NULL); -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, session, "https://www.tumblr.com/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = soup_uri_encode (username, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = _tmp0_; -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_username", _tmp1_); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp1_); -#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_password", password); -#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_mode", "client_auth"); -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return self; -#line 880 "TumblrAuthenticator.c" -} - - -PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* -publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, - const gchar* username, - const gchar* password) -{ -#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, username, password); -#line 891 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass * klass) -{ -#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 900 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction * self) -{ -} - - -GType -publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id; - publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id); - } - return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellTumblrTumblr* -publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, - SpitPublishingPluginHost* host) -{ - PublishingAuthenticatorShotwellTumblrTumblr * self = NULL; -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = (PublishingAuthenticatorShotwellTumblrTumblr*) publishing_authenticator_shotwell_oauth1_authenticator_construct (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET, host); -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return self; -#line 935 "TumblrAuthenticator.c" -} - - -PublishingAuthenticatorShotwellTumblrTumblr* -publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host) -{ -#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return publishing_authenticator_shotwell_tumblr_tumblr_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, host); -#line 944 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellTumblrTumblr * self; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator))) { -#line 956 "TumblrAuthenticator.c" - PublishingRESTSupportOAuth1Session* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:135: attempt start: a persistent session is a" \ -"vailable; using it"); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp0_, _tmp2_, _tmp4_, ""); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp4_); -#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp2_); -#line 980 "TumblrAuthenticator.c" - } else { -#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:140: attempt start: no persistent session ava" \ -"ilable; showing login welcome pane"); -#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO); -#line 986 "TumblrAuthenticator.c" - } -} - - -static gboolean -publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellTumblrTumblr * self; - gboolean result = FALSE; -#line 146 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); -#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - result = TRUE; -#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return result; -#line 1002 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellTumblrTumblr * self; - PublishingRESTSupportOAuth1Session* _tmp0_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); -#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_oauth1_session_deauthenticate (_tmp0_); -#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); -#line 1019 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) -{ - PublishingAuthenticatorShotwellTumblrTumblr * self; -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); -#line 1029 "TumblrAuthenticator.c" -} - - -/** - * Action that shows the authentication pane. - * - * This action method shows the authentication pane. It is shown at the - * very beginning of the interaction when no persistent parameters are found - * or after a failed login attempt using persisted parameters. It can be - * given a mode flag to specify whether it should be displayed in initial - * mode or in any of the error modes that it supports. - * - * @param mode the mode for the authentication pane - */ -static void -_publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, - const gchar* user, - const gchar* password, - gpointer self) -{ -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked ((PublishingAuthenticatorShotwellTumblrTumblr*) self, user, password); -#line 1052 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) -{ - SpitPublishingPluginHost* _tmp0_; - PublishingAuthenticatorShotwellTumblrAuthenticationPane* authentication_pane = NULL; - PublishingAuthenticatorShotwellTumblrAuthenticationPane* _tmp1_; - SpitPublishingPluginHost* _tmp2_; - SpitPublishingPluginHost* _tmp3_; - GtkWidget* _tmp4_; - GtkWidget* _tmp5_; -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:171: ACTION: installing authentication pane"); -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_tumblr_authentication_pane_new (mode); -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - authentication_pane = _tmp1_; -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (authentication_pane, "login", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login, self, 0); -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (authentication_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (authentication_pane); -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_set_dialog_default_widget (_tmp3_, _tmp5_); -#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (_tmp5_); -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_object_unref0 (authentication_pane); -#line 1097 "TumblrAuthenticator.c" -} - - -/** - * Event triggered when the login button in the authentication panel is - * clicked. - * - * This event is triggered when the login button in the authentication - * panel is clicked. It then triggers a network login interaction. - * - * @param username the name of the Tumblr user as entered in the dialog - * @param password the password of the Tumblr as entered in the dialog - */ -static void -publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* username, - const gchar* password) -{ -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (username != NULL); -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (password != NULL); -#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:191: EVENT: on_authentication_pane_login_clic" \ -"ked"); -#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (self, username, password); -#line 1126 "TumblrAuthenticator.c" -} - - -/** - * Action to perform a network login to a Tumblr blog. - * - * This action performs a network login a Tumblr blog specified the given user name and password as credentials. - * - * @param username the name of the Tumblr user used to login - * @param password the password of the Tumblr user used to login - */ -static void -_publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, - gpointer self) -{ -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender); -#line 1144 "TumblrAuthenticator.c" -} - - -static void -_publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, - GError* err, - gpointer self) -{ -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender, err); -#line 1155 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* username, - const gchar* password) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* txn = NULL; - PublishingRESTSupportOAuth1Session* _tmp2_; - PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* _tmp3_; - GError * _inner_error_ = NULL; -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (username != NULL); -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (password != NULL); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:205: ACTION: logging in"); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_install_login_wait_pane (_tmp1_); -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (_tmp2_, username, password); -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - txn = _tmp3_; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 1196 "TumblrAuthenticator.c" - { -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 1204 "TumblrAuthenticator.c" - goto __catch9_spit_publishing_publishing_error; - } -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return; -#line 1215 "TumblrAuthenticator.c" - } - } - goto __finally9; - __catch9_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp4_; - GError* _tmp5_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - err = _inner_error_; -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _inner_error_ = NULL; -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp5_ = err; -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_error_free0 (err); -#line 1236 "TumblrAuthenticator.c" - } - __finally9: -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - return; -#line 1249 "TumblrAuthenticator.c" - } -#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 1253 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:224: EVENT: OAuth authentication request tran" \ -"saction completed; response = '%s'", _tmp3_); -#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp3_); -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = publishing_rest_support_transaction_get_response (txn); -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (self, _tmp5_); -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (_tmp5_); -#line 1295 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - SpitPublishingPluginHost* _tmp2_; -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:235: EVENT: OAuth authentication request tran" \ -"saction caused a network error"); -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp2_, err); -#line 1325 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, - const gchar* response) -{ - gchar* token = NULL; - gchar* token_secret = NULL; - GHashTable* data = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; - gconstpointer _tmp2_ = NULL; - gchar* _tmp3_; - GHashTable* _tmp4_; - gconstpointer _tmp5_ = NULL; - gchar* _tmp6_; - const gchar* _tmp7_; - const gchar* _tmp8_; - gboolean _tmp9_ = FALSE; - const gchar* _tmp10_; -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_return_if_fail (response != NULL); -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:240: ACTION: extracting access phase credenti" \ -"als from '%s'", response); -#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - token = NULL; -#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - token_secret = NULL; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp0_ = soup_form_decode (response); -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - data = _tmp0_; -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp1_ = data; -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_hash_table_lookup_extended (_tmp1_, "oauth_token", NULL, &_tmp2_); -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (token); -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - token = _tmp3_; -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp4_ = data; -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_hash_table_lookup_extended (_tmp4_, "oauth_token_secret", NULL, &_tmp5_); -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (token_secret); -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - token_secret = _tmp6_; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp7_ = token; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp8_ = token_secret; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_debug ("TumblrAuthenticator.vala:249: access phase credentials: { token = '%s'" \ -"; token_secret = '%s' }", _tmp7_, _tmp8_); -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp10_ = token; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (_tmp10_ == NULL) { -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp9_ = TRUE; -#line 1393 "TumblrAuthenticator.c" - } else { - const gchar* _tmp11_; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp11_ = token_secret; -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp9_ = _tmp11_ == NULL; -#line 1400 "TumblrAuthenticator.c" - } -#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - if (_tmp9_) { -#line 1404 "TumblrAuthenticator.c" - SpitPublishingPluginHost* _tmp12_; - GError* _tmp13_; - GError* _tmp14_; -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp13_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Expected " "access phase credentials to contain token and token secret but at " "least one of these is absent"); -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp14_ = _tmp13_; -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp12_, _tmp14_); -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_error_free0 (_tmp14_); -#line 256 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 1420 "TumblrAuthenticator.c" - } else { - PublishingRESTSupportOAuth1Session* _tmp15_; - const gchar* _tmp16_; - const gchar* _tmp17_; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp15_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp16_ = token; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _tmp17_ = token_secret; -#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp15_, _tmp16_, _tmp17_, ""); -#line 1433 "TumblrAuthenticator.c" - } -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_hash_table_unref0 (data); -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (token_secret); -#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - _g_free0 (token); -#line 1441 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_class_init (PublishingAuthenticatorShotwellTumblrTumblrClass * klass) -{ -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - publishing_authenticator_shotwell_tumblr_tumblr_parent_class = g_type_class_peek_parent (klass); -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_logout; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" - ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_refresh; -#line 1458 "TumblrAuthenticator.c" -} - - -static void -publishing_authenticator_shotwell_tumblr_tumblr_instance_init (PublishingAuthenticatorShotwellTumblrTumblr * self) -{ -} - - -GType -publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) -{ - static volatile gsize publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrTumblrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrTumblr), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_instance_init, NULL }; - GType publishing_authenticator_shotwell_tumblr_tumblr_type_id; - publishing_authenticator_shotwell_tumblr_tumblr_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, "PublishingAuthenticatorShotwellTumblrTumblr", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile, publishing_authenticator_shotwell_tumblr_tumblr_type_id); - } - return publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile; -} - - - |