summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:34:32 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:34:32 +0200
commit49120f48474fc8fdc2448c75d961bc238213cfac (patch)
tree05bcdb95d65a807cf0f1ffffd066c09074b5cf56 /plugins/authenticator/shotwell
parent2492891f112caac6076ce49721d9d5d78a152c3a (diff)
New upstream version 0.28.2upstream/0.28.2
Diffstat (limited to 'plugins/authenticator/shotwell')
-rw-r--r--plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c3787
-rw-r--r--plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala389
-rw-r--r--plugins/authenticator/shotwell/GoogleAuthenticator.c40
-rw-r--r--plugins/authenticator/shotwell/OAuth1Authenticator.c711
-rw-r--r--plugins/authenticator/shotwell/OAuth1Authenticator.vala96
-rw-r--r--plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c159
-rw-r--r--plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala3
-rw-r--r--plugins/authenticator/shotwell/TumblrAuthenticator.c1393
-rw-r--r--plugins/authenticator/shotwell/TumblrAuthenticator.vala262
-rw-r--r--plugins/authenticator/shotwell/flickr_pin_entry_pane.ui90
-rw-r--r--plugins/authenticator/shotwell/meson.build28
-rw-r--r--plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml2
-rw-r--r--plugins/authenticator/shotwell/tumblr_authentication_pane.ui126
13 files changed, 3648 insertions, 3438 deletions
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c
index ab19db3..cfeb019 100644
--- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c
+++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c
@@ -11,36 +11,13 @@
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
+#include <glib/gi18n-lib.h>
#include "shotwell-plugin-common.h"
-#include "shotwell-plugin-dev-1.0.h"
+#include <webkit2/webkit2.h>
#include <libsoup/soup.h>
-#include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-
-
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION (publishing_authenticator_shotwell_flickr_transaction_get_type ())
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransaction))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransactionClass))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransactionClass))
-
-typedef struct _PublishingAuthenticatorShotwellFlickrTransaction PublishingAuthenticatorShotwellFlickrTransaction;
-typedef struct _PublishingAuthenticatorShotwellFlickrTransactionClass PublishingAuthenticatorShotwellFlickrTransactionClass;
-typedef struct _PublishingAuthenticatorShotwellFlickrTransactionPrivate PublishingAuthenticatorShotwellFlickrTransactionPrivate;
-
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION (publishing_authenticator_shotwell_flickr_session_get_type ())
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionClass))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionClass))
+#include <gio/gio.h>
+#include "shotwell-plugin-dev-1.0.h"
-typedef struct _PublishingAuthenticatorShotwellFlickrSession PublishingAuthenticatorShotwellFlickrSession;
-typedef struct _PublishingAuthenticatorShotwellFlickrSessionClass PublishingAuthenticatorShotwellFlickrSessionClass;
-#define _g_free0(var) (var = (g_free (var), NULL))
-#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL)))
-typedef struct _PublishingAuthenticatorShotwellFlickrSessionPrivate PublishingAuthenticatorShotwellFlickrSessionPrivate;
#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))
@@ -63,24 +40,38 @@ typedef struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransa
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_PIN_ENTRY_PANE (publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type ())
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPaneClass))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE))
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPaneClass))
+#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 _PublishingAuthenticatorShotwellFlickrPinEntryPane PublishingAuthenticatorShotwellFlickrPinEntryPane;
-typedef struct _PublishingAuthenticatorShotwellFlickrPinEntryPaneClass PublishingAuthenticatorShotwellFlickrPinEntryPaneClass;
-typedef struct _PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate;
+typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane PublishingAuthenticatorShotwellFlickrWebAuthenticationPane;
+typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass;
+typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (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_PIN_ENTRY_PANE_PROCEED_SIGNAL,
- PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_LAST_SIGNAL
+ 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_LAST_SIGNAL
};
-static guint publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_LAST_SIGNAL] = {0};
+static guint publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LAST_SIGNAL] = {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))
@@ -92,138 +83,73 @@ static guint publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUB
typedef struct _PublishingAuthenticatorShotwellFlickrFlickr PublishingAuthenticatorShotwellFlickrFlickr;
typedef struct _PublishingAuthenticatorShotwellFlickrFlickrClass PublishingAuthenticatorShotwellFlickrFlickrClass;
typedef struct _PublishingAuthenticatorShotwellFlickrFlickrPrivate PublishingAuthenticatorShotwellFlickrFlickrPrivate;
-#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_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 _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 _PublishingAuthenticatorShotwellFlickrTransaction {
- PublishingRESTSupportTransaction parent_instance;
- PublishingAuthenticatorShotwellFlickrTransactionPrivate * priv;
-};
-
-struct _PublishingAuthenticatorShotwellFlickrTransactionClass {
- PublishingRESTSupportTransactionClass parent_class;
-};
-
-struct _PublishingAuthenticatorShotwellFlickrSession {
- PublishingRESTSupportSession parent_instance;
- PublishingAuthenticatorShotwellFlickrSessionPrivate * priv;
-};
-
-struct _PublishingAuthenticatorShotwellFlickrSessionClass {
- PublishingRESTSupportSessionClass parent_class;
-};
-
-struct _PublishingAuthenticatorShotwellFlickrSessionPrivate {
- gchar* request_phase_token;
- gchar* request_phase_token_secret;
- gchar* access_phase_token;
- gchar* access_phase_token_secret;
- gchar* username;
- gchar* consumer_key;
- gchar* consumer_secret;
-};
struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction {
- PublishingAuthenticatorShotwellFlickrTransaction parent_instance;
+ PublishingRESTSupportOAuth1Transaction parent_instance;
PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionPrivate * priv;
};
struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass {
- PublishingAuthenticatorShotwellFlickrTransactionClass parent_class;
+ PublishingRESTSupportOAuth1TransactionClass parent_class;
};
struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction {
- PublishingAuthenticatorShotwellFlickrTransaction parent_instance;
+ PublishingRESTSupportOAuth1Transaction parent_instance;
PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate * priv;
};
struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass {
- PublishingAuthenticatorShotwellFlickrTransactionClass parent_class;
+ PublishingRESTSupportOAuth1TransactionClass parent_class;
};
-struct _PublishingAuthenticatorShotwellFlickrPinEntryPane {
- GObject parent_instance;
- PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate * priv;
+struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane {
+ ShotwellPluginsCommonWebAuthenticationPane parent_instance;
+ PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate * priv;
};
-struct _PublishingAuthenticatorShotwellFlickrPinEntryPaneClass {
- GObjectClass parent_class;
+struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass {
+ ShotwellPluginsCommonWebAuthenticationPaneClass parent_class;
};
-struct _PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate {
- GtkBox* pane_widget;
- GtkButton* continue_button;
- GtkEntry* pin_entry;
- GtkLabel* pin_entry_caption;
- GtkLabel* explanatory_text;
- GtkBuilder* builder;
+struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate {
+ gchar* auth_code;
};
-struct _PublishingAuthenticatorShotwellFlickrFlickr {
+struct _PublishingAuthenticatorShotwellOAuth1Authenticator {
GObject parent_instance;
- PublishingAuthenticatorShotwellFlickrFlickrPrivate * priv;
+ PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv;
+ GHashTable* params;
+ PublishingRESTSupportOAuth1Session* session;
+ SpitPublishingPluginHost* host;
};
-struct _PublishingAuthenticatorShotwellFlickrFlickrClass {
+struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass {
GObjectClass parent_class;
+ void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
+ gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
+ void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
+ void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self);
};
-struct _PublishingAuthenticatorShotwellFlickrFlickrPrivate {
- GHashTable* params;
- PublishingAuthenticatorShotwellFlickrSession* session;
- SpitPublishingPluginHost* host;
+struct _PublishingAuthenticatorShotwellFlickrFlickr {
+ PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance;
+ PublishingAuthenticatorShotwellFlickrFlickrPrivate * priv;
+};
+
+struct _PublishingAuthenticatorShotwellFlickrFlickrClass {
+ PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class;
};
-static gpointer publishing_authenticator_shotwell_flickr_transaction_parent_class = NULL;
-static gpointer publishing_authenticator_shotwell_flickr_session_parent_class = NULL;
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_pin_entry_pane_parent_class = NULL;
-static SpitPublishingDialogPaneIface * publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = NULL;
+static gpointer publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class = NULL;
static gpointer publishing_authenticator_shotwell_flickr_flickr_parent_class = NULL;
-static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_parent_iface = 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_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\"
-GType publishing_authenticator_shotwell_flickr_transaction_get_type (void) G_GNUC_CONST;
-enum {
- PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_DUMMY_PROPERTY
-};
-GType publishing_authenticator_shotwell_flickr_session_get_type (void) G_GNUC_CONST;
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method);
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method);
-static void publishing_authenticator_shotwell_flickr_transaction_setup_arguments (PublishingAuthenticatorShotwellFlickrTransaction* self);
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new_with_uri (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method);
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method);
-gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (PublishingAuthenticatorShotwellFlickrSession* self);
-gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (PublishingAuthenticatorShotwellFlickrSession* self);
-gchar* publishing_authenticator_shotwell_flickr_session_get_consumer_key (PublishingAuthenticatorShotwellFlickrSession* self);
-static void publishing_authenticator_shotwell_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error);
-void publishing_authenticator_shotwell_flickr_session_sign_transaction (PublishingAuthenticatorShotwellFlickrSession* self, PublishingRESTSupportTransaction* txn);
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionPrivate))
-enum {
- PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_DUMMY_PROPERTY
-};
-PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_new (void);
-PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_construct (GType object_type);
-static gboolean publishing_authenticator_shotwell_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base);
-void publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username);
-void publishing_authenticator_shotwell_flickr_session_deauthenticate (PublishingAuthenticatorShotwellFlickrSession* self);
-void publishing_authenticator_shotwell_flickr_session_set_api_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret);
-void publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret);
-void publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username);
-gchar* publishing_authenticator_shotwell_flickr_session_get_request_phase_token (PublishingAuthenticatorShotwellFlickrSession* self);
-gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token (PublishingAuthenticatorShotwellFlickrSession* self);
-gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrSession* self);
-gchar* publishing_authenticator_shotwell_flickr_session_get_username (PublishingAuthenticatorShotwellFlickrSession* self);
-static void publishing_authenticator_shotwell_flickr_session_finalize (PublishingRESTSupportSession * obj);
#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" \
@@ -234,58 +160,48 @@ GType publishing_authenticator_shotwell_flickr_authentication_request_transactio
enum {
PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_DUMMY_PROPERTY
};
-PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session);
-PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session);
+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;
enum {
PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY
};
-PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier);
-PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier);
-GType publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type (void) G_GNUC_CONST;
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate))
+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))
enum {
- PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_DUMMY_PROPERTY
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY
};
-PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_new (GtkBuilder* builder);
-PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder);
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingAuthenticatorShotwellFlickrPinEntryPane* self);
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked (PublishingAuthenticatorShotwellFlickrPinEntryPane* self);
-static GtkWidget* publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base);
-static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base);
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base);
-static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
-static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base);
-static void g_cclosure_user_marshal_VOID__OBJECT_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_flickr_pin_entry_pane_finalize (GObject * obj);
+#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;
-#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrPrivate))
enum {
PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_DUMMY_PROPERTY
};
-static void publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static void _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self);
PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host);
PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, 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_flickr_flickr_invalidate_persistent_session (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token);
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* secret);
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* username);
-static gboolean publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (SpitPublishingAuthenticator* base);
+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 (SpitPublishingAuthenticator* base);
-static GHashTable* publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter (SpitPublishingAuthenticator* base);
-static void publishing_authenticator_shotwell_flickr_flickr_real_logout (SpitPublishingAuthenticator* base);
-static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (SpitPublishingAuthenticator* base);
+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);
@@ -295,1303 +211,46 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_
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_launch_system_browser (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token);
-static void publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static void publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (PublishingAuthenticatorShotwellFlickrFlickr* self);
-static void publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* pin);
-static void _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed (PublishingAuthenticatorShotwellFlickrPinEntryPane* _sender, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self);
+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);
-static GVariant* _variant_new3 (gchar* value);
-static GVariant* _variant_new4 (gchar* value);
-static GVariant* _variant_new5 (gchar* value);
-static void publishing_authenticator_shotwell_flickr_flickr_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);
-
-
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method) {
- PublishingAuthenticatorShotwellFlickrTransaction* self = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
- PublishingRESTSupportHttpMethod _tmp1_;
-#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL);
-#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = session;
-#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = method;
-#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_);
-#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_transaction_setup_arguments (self);
-#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return self;
-#line 331 "FlickrPublishingAuthenticator.c"
-}
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method) {
-#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return publishing_authenticator_shotwell_flickr_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, session, method);
-#line 338 "FlickrPublishingAuthenticator.c"
-}
-
-
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) {
- PublishingAuthenticatorShotwellFlickrTransaction* self = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
- const gchar* _tmp1_;
- PublishingRESTSupportHttpMethod _tmp2_;
-#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL);
-#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (uri != NULL, NULL);
+PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session) {
+ PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* self = NULL;
+ PublishingRESTSupportOAuth1Session* _tmp0_;
+#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"
_tmp0_ = session;
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = uri;
-#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = method;
-#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_);
-#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_transaction_setup_arguments (self);
-#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return self;
-#line 363 "FlickrPublishingAuthenticator.c"
-}
-
-
-PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new_with_uri (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) {
-#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, session, uri, method);
-#line 370 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_transaction_setup_arguments (PublishingAuthenticatorShotwellFlickrTransaction* self) {
- PublishingAuthenticatorShotwellFlickrSession* session = NULL;
- PublishingRESTSupportSession* _tmp0_;
- gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- gchar* _tmp6_;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION (self));
-#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction));
-#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- session = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession);
-#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (session);
-#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = _tmp1_;
-#line 28 "/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_nonce", _tmp2_);
-#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp2_);
-#line 29 "/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_signature_method", "HMAC-SHA1");
-#line 30 "/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_version", "1.0");
-#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_callback", "oob");
-#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (session);
-#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = _tmp3_;
-#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_timestamp", _tmp4_);
-#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp4_);
-#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = publishing_authenticator_shotwell_flickr_session_get_consumer_key (session);
-#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = _tmp5_;
-#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_consumer_key", _tmp6_);
-#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp6_);
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _publishing_rest_support_session_unref0 (session);
-#line 421 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) {
- PublishingAuthenticatorShotwellFlickrTransaction * self;
- PublishingRESTSupportSession* _tmp0_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp1_;
- GError * _inner_error_ = NULL;
-#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransaction);
-#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction));
-#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession);
-#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction));
-#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _publishing_rest_support_session_unref0 (_tmp1_);
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_authenticator_shotwell_flickr_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_);
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_propagate_error (error, _inner_error_);
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 450 "FlickrPublishingAuthenticator.c"
- } else {
-#line 40 "/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 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_clear_error (&_inner_error_);
-#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 458 "FlickrPublishingAuthenticator.c"
- }
- }
-}
-
-
-static void publishing_authenticator_shotwell_flickr_transaction_class_init (PublishingAuthenticatorShotwellFlickrTransactionClass * klass) {
-#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_transaction_parent_class = g_type_class_peek_parent (klass);
-#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_authenticator_shotwell_flickr_transaction_real_execute;
-#line 469 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_transaction_instance_init (PublishingAuthenticatorShotwellFlickrTransaction * self) {
-}
-
-
-GType publishing_authenticator_shotwell_flickr_transaction_get_type (void) {
- static volatile gsize publishing_authenticator_shotwell_flickr_transaction_type_id__volatile = 0;
- if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_transaction_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_transaction_instance_init, NULL };
- GType publishing_authenticator_shotwell_flickr_transaction_type_id;
- publishing_authenticator_shotwell_flickr_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrTransaction", &g_define_type_info, 0);
- g_once_init_leave (&publishing_authenticator_shotwell_flickr_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_transaction_type_id);
- }
- return publishing_authenticator_shotwell_flickr_transaction_type_id__volatile;
-}
-
-
-PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_construct (GType object_type) {
- PublishingAuthenticatorShotwellFlickrSession* self = NULL;
-#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrSession*) publishing_rest_support_session_construct (object_type, NULL);
-#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return self;
-#line 495 "FlickrPublishingAuthenticator.c"
-}
-
-
-PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_new (void) {
-#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return publishing_authenticator_shotwell_flickr_session_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION);
-#line 502 "FlickrPublishingAuthenticator.c"
-}
-
-
-static gboolean publishing_authenticator_shotwell_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base) {
- PublishingAuthenticatorShotwellFlickrSession * self;
- gboolean result = FALSE;
- gboolean _tmp0_ = FALSE;
- gboolean _tmp1_ = FALSE;
- const gchar* _tmp2_;
-#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession);
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->access_phase_token;
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp2_ != NULL) {
-#line 518 "FlickrPublishingAuthenticator.c"
- const gchar* _tmp3_;
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = self->priv->access_phase_token_secret;
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _tmp3_ != NULL;
-#line 524 "FlickrPublishingAuthenticator.c"
- } else {
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = FALSE;
-#line 528 "FlickrPublishingAuthenticator.c"
- }
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp1_) {
-#line 532 "FlickrPublishingAuthenticator.c"
- const gchar* _tmp4_;
-#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = self->priv->username;
-#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = _tmp4_ != NULL;
-#line 538 "FlickrPublishingAuthenticator.c"
- } else {
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = FALSE;
-#line 542 "FlickrPublishingAuthenticator.c"
- }
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp0_;
-#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 548 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) {
- const gchar* _tmp0_;
- gchar* _tmp1_;
- const gchar* _tmp2_;
- gchar* _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
-#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (token != NULL);
-#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (secret != NULL);
-#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (username != NULL);
-#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = token;
-#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token);
-#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token = _tmp1_;
-#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = secret;
-#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_strdup (_tmp2_);
-#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token_secret);
-#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token_secret = _tmp3_;
-#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = username;
-#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = g_strdup (_tmp4_);
-#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->username);
-#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->username = _tmp5_;
-#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated");
-#line 593 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_deauthenticate (PublishingAuthenticatorShotwellFlickrSession* self) {
-#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token);
-#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token = NULL;
-#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token_secret);
-#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token_secret = NULL;
-#line 74 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->username);
-#line 74 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->username = NULL;
-#line 612 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_set_api_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret) {
- const gchar* _tmp0_;
- gchar* _tmp1_;
- const gchar* _tmp2_;
- gchar* _tmp3_;
-#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (consumer_key != NULL);
-#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (consumer_secret != NULL);
-#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = consumer_key;
-#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->consumer_key);
-#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->consumer_key = _tmp1_;
-#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = consumer_secret;
-#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_strdup (_tmp2_);
-#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->consumer_secret);
-#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->consumer_secret = _tmp3_;
-#line 643 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_sign_transaction (PublishingAuthenticatorShotwellFlickrSession* self, PublishingRESTSupportTransaction* txn) {
- gchar* http_method = NULL;
- PublishingRESTSupportTransaction* _tmp0_;
- PublishingRESTSupportHttpMethod _tmp1_;
- gchar* _tmp2_;
- const gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- PublishingRESTSupportArgument** base_string_arguments = NULL;
- PublishingRESTSupportTransaction* _tmp6_;
- gint _tmp7_;
- PublishingRESTSupportArgument** _tmp8_;
- gint base_string_arguments_length1;
- gint _base_string_arguments_size_;
- PublishingRESTSupportArgument** sorted_args = NULL;
- PublishingRESTSupportArgument** _tmp9_;
- gint _tmp9__length1;
- gint _tmp10_;
- PublishingRESTSupportArgument** _tmp11_;
- gint sorted_args_length1;
- gint _sorted_args_size_;
- gchar* arguments_string = NULL;
- gchar* _tmp12_;
- gchar* signing_key = NULL;
- const gchar* _tmp35_;
- gchar* signature_base_string = NULL;
- const gchar* _tmp49_;
- gchar* _tmp50_;
- gchar* _tmp51_;
- PublishingRESTSupportTransaction* _tmp52_;
- gchar* _tmp53_;
- gchar* _tmp54_;
- gchar* _tmp55_;
- gchar* _tmp56_;
- gchar* _tmp57_;
- gchar* _tmp58_;
- gchar* _tmp59_;
- gchar* _tmp60_;
- const gchar* _tmp61_;
- gchar* _tmp62_;
- gchar* _tmp63_;
- gchar* _tmp64_;
- gchar* _tmp65_;
- const gchar* _tmp66_;
- gchar* signature = NULL;
- const gchar* _tmp67_;
- gchar* _tmp68_;
- const gchar* _tmp69_;
- gchar* _tmp70_;
- const gchar* _tmp71_;
- PublishingRESTSupportTransaction* _tmp72_;
- const gchar* _tmp73_;
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
-#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = txn;
-#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_);
-#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_);
-#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- http_method = _tmp2_;
-#line 85 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:85: signing transaction with parame" \
-"ters:");
-#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = http_method;
-#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL);
-#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = _tmp4_;
-#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:86: %s", _tmp5_);
-#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp5_);
-#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = txn;
-#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_);
-#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- base_string_arguments = _tmp8_;
-#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- base_string_arguments_length1 = _tmp7_;
-#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _base_string_arguments_size_ = base_string_arguments_length1;
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = base_string_arguments;
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9__length1 = base_string_arguments_length1;
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = publishing_rest_support_argument_sort (_tmp9_, _tmp9__length1, &_tmp10_);
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- sorted_args = _tmp11_;
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- sorted_args_length1 = _tmp10_;
-#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _sorted_args_size_ = sorted_args_length1;
-#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp12_ = g_strdup ("");
-#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- arguments_string = _tmp12_;
-#line 749 "FlickrPublishingAuthenticator.c"
- {
- gint i = 0;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- i = 0;
-#line 754 "FlickrPublishingAuthenticator.c"
- {
- gboolean _tmp13_ = FALSE;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp13_ = TRUE;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- while (TRUE) {
-#line 761 "FlickrPublishingAuthenticator.c"
- gint _tmp15_;
- PublishingRESTSupportArgument** _tmp16_;
- gint _tmp16__length1;
- const gchar* _tmp17_;
- PublishingRESTSupportArgument** _tmp18_;
- gint _tmp18__length1;
- gint _tmp19_;
- PublishingRESTSupportArgument* _tmp20_;
- const gchar* _tmp21_;
- gchar* _tmp22_;
- gchar* _tmp23_;
- PublishingRESTSupportArgument** _tmp24_;
- gint _tmp24__length1;
- gint _tmp25_;
- PublishingRESTSupportArgument* _tmp26_;
- const gchar* _tmp27_;
- gchar* _tmp28_;
- gchar* _tmp29_;
- gchar* _tmp30_;
- gint _tmp31_;
- PublishingRESTSupportArgument** _tmp32_;
- gint _tmp32__length1;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (!_tmp13_) {
-#line 786 "FlickrPublishingAuthenticator.c"
- gint _tmp14_;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp14_ = i;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- i = _tmp14_ + 1;
-#line 792 "FlickrPublishingAuthenticator.c"
- }
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp13_ = FALSE;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp15_ = i;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp16_ = sorted_args;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp16__length1 = sorted_args_length1;
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (!(_tmp15_ < _tmp16__length1)) {
-#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- break;
-#line 806 "FlickrPublishingAuthenticator.c"
- }
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp17_ = arguments_string;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp18_ = sorted_args;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp18__length1 = sorted_args_length1;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp19_ = i;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp20_ = _tmp18_[_tmp19_];
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp21_ = _tmp20_->key;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp22_ = g_strconcat (_tmp21_, "=", NULL);
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp23_ = _tmp22_;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp24_ = sorted_args;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp24__length1 = sorted_args_length1;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp25_ = i;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp26_ = _tmp24_[_tmp25_];
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp27_ = _tmp26_->value;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp28_ = g_strconcat (_tmp23_, _tmp27_, NULL);
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp29_ = _tmp28_;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp30_ = g_strconcat (_tmp17_, _tmp29_, NULL);
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (arguments_string);
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- arguments_string = _tmp30_;
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp29_);
-#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp23_);
-#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp31_ = i;
-#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp32_ = sorted_args;
-#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp32__length1 = sorted_args_length1;
-#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp31_ < (_tmp32__length1 - 1)) {
-#line 856 "FlickrPublishingAuthenticator.c"
- const gchar* _tmp33_;
- gchar* _tmp34_;
-#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp33_ = arguments_string;
-#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp34_ = g_strconcat (_tmp33_, "&", NULL);
-#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (arguments_string);
-#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- arguments_string = _tmp34_;
-#line 867 "FlickrPublishingAuthenticator.c"
- }
- }
- }
- }
-#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signing_key = NULL;
-#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp35_ = self->priv->access_phase_token_secret;
-#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp35_ != NULL) {
-#line 878 "FlickrPublishingAuthenticator.c"
- const gchar* _tmp36_;
- gchar* _tmp37_;
- gchar* _tmp38_;
- const gchar* _tmp39_;
- gchar* _tmp40_;
-#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:102: access phase token secret avai" \
-"lable; using it as signing key");
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp36_ = self->priv->consumer_secret;
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp37_ = g_strconcat (_tmp36_, "&", NULL);
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp38_ = _tmp37_;
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp39_ = self->priv->access_phase_token_secret;
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp40_ = g_strconcat (_tmp38_, _tmp39_, NULL);
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signing_key);
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signing_key = _tmp40_;
-#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp38_);
-#line 902 "FlickrPublishingAuthenticator.c"
- } else {
- const gchar* _tmp41_;
-#line 105 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp41_ = self->priv->request_phase_token_secret;
-#line 105 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp41_ != NULL) {
-#line 909 "FlickrPublishingAuthenticator.c"
- const gchar* _tmp42_;
- gchar* _tmp43_;
- gchar* _tmp44_;
- const gchar* _tmp45_;
- gchar* _tmp46_;
-#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:106: request phase token secret ava" \
-"ilable; using it as signing key");
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp42_ = self->priv->consumer_secret;
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp43_ = g_strconcat (_tmp42_, "&", NULL);
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp44_ = _tmp43_;
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp45_ = self->priv->request_phase_token_secret;
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp46_ = g_strconcat (_tmp44_, _tmp45_, NULL);
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signing_key);
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signing_key = _tmp46_;
-#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp44_);
-#line 933 "FlickrPublishingAuthenticator.c"
- } else {
- const gchar* _tmp47_;
- gchar* _tmp48_;
-#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:110: %s", "neither access phase nor request phase token secrets available; using " \
-"API " "key as signing key");
-#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp47_ = self->priv->consumer_secret;
-#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp48_ = g_strconcat (_tmp47_, "&", NULL);
-#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signing_key);
-#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signing_key = _tmp48_;
-#line 947 "FlickrPublishingAuthenticator.c"
- }
- }
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp49_ = http_method;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp50_ = g_strconcat (_tmp49_, "&", NULL);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp51_ = _tmp50_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp52_ = txn;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp53_ = publishing_rest_support_transaction_get_endpoint_url (_tmp52_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp54_ = _tmp53_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp55_ = soup_uri_encode (_tmp54_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp56_ = _tmp55_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp57_ = g_strconcat (_tmp51_, _tmp56_, NULL);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp58_ = _tmp57_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp59_ = g_strconcat (_tmp58_, "&", NULL);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp60_ = _tmp59_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp61_ = arguments_string;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp62_ = soup_uri_encode (_tmp61_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp63_ = _tmp62_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp64_ = g_strconcat (_tmp60_, _tmp63_, NULL);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp65_ = _tmp64_;
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp63_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp60_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp58_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp56_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp54_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp51_);
-#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signature_base_string = _tmp65_;
-#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:120: signature base string = '%s'", signature_base_string);
-#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp66_ = signing_key;
-#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:122: signing key = '%s'", _tmp66_);
-#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp67_ = signing_key;
-#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp68_ = publishing_rest_support_hmac_sha1 (_tmp67_, signature_base_string);
-#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signature = _tmp68_;
-#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp69_ = signature;
-#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp70_ = soup_uri_encode (_tmp69_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA);
-#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signature);
-#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- signature = _tmp70_;
-#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp71_ = signature;
-#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:128: signature = '%s'", _tmp71_);
-#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp72_ = txn;
-#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp73_ = signature;
-#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_rest_support_transaction_add_argument (_tmp72_, "oauth_signature", _tmp73_);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signature);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signature_base_string);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (signing_key);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (arguments_string);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL);
-#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (http_method);
-#line 1042 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret) {
- const gchar* _tmp0_;
- gchar* _tmp1_;
- const gchar* _tmp2_;
- gchar* _tmp3_;
-#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (token != NULL);
-#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (secret != NULL);
-#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = token;
-#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->request_phase_token);
-#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->request_phase_token = _tmp1_;
-#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = secret;
-#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_strdup (_tmp2_);
-#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->request_phase_token_secret);
-#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->request_phase_token_secret = _tmp3_;
-#line 1073 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) {
- const gchar* _tmp0_;
- gchar* _tmp1_;
- const gchar* _tmp2_;
- gchar* _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
-#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self));
-#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (token != NULL);
-#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (secret != NULL);
-#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (username != NULL);
-#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = token;
-#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token);
-#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token = _tmp1_;
-#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = secret;
-#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_strdup (_tmp2_);
-#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token_secret);
-#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token_secret = _tmp3_;
-#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = username;
-#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = g_strdup (_tmp4_);
-#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->username);
-#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->username = _tmp5_;
-#line 143 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated");
-#line 1118 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- GTimeVal currtime = {0};
- GTimeVal _tmp0_;
- glong _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- GTimeVal _tmp4_;
- glong _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
- gchar* _tmp10_;
- gchar* _tmp11_;
-#line 146 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_get_current_time (&currtime);
-#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_get_current_time (&currtime);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = currtime;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _tmp0_.tv_sec;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup_printf ("%li", _tmp1_);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = _tmp2_;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = currtime;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = _tmp4_.tv_usec;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = g_strdup_printf ("%li", _tmp5_);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = _tmp6_;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = _tmp8_;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = _tmp10_;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp9_);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp7_);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp3_);
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp11_;
-#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1177 "FlickrPublishingAuthenticator.c"
-}
-
-
-static glong string_strnlen (gchar* str, glong maxlen) {
- glong result = 0L;
- gchar* end = NULL;
- gchar* _tmp0_;
- glong _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = str;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = maxlen;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- end = _tmp2_;
-#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = end;
-#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ == NULL) {
-#line 1200 "FlickrPublishingAuthenticator.c"
- glong _tmp4_;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = maxlen;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp4_;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- return result;
-#line 1208 "FlickrPublishingAuthenticator.c"
- } else {
- gchar* _tmp5_;
- gchar* _tmp6_;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp5_ = end;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp6_ = str;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (glong) (_tmp5_ - _tmp6_);
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- return result;
-#line 1220 "FlickrPublishingAuthenticator.c"
- }
-}
-
-
-static gchar* string_substring (const gchar* self, glong offset, glong len) {
- gchar* result = NULL;
- glong string_length = 0L;
- gboolean _tmp0_ = FALSE;
- glong _tmp1_;
- glong _tmp8_;
- glong _tmp14_;
- glong _tmp17_;
- glong _tmp18_;
- glong _tmp19_;
- glong _tmp20_;
- glong _tmp21_;
- gchar* _tmp22_;
-#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (self != NULL, NULL);
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = offset;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp1_ >= ((glong) 0)) {
-#line 1244 "FlickrPublishingAuthenticator.c"
- glong _tmp2_;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = len;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = _tmp2_ >= ((glong) 0);
-#line 1250 "FlickrPublishingAuthenticator.c"
- } else {
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = FALSE;
-#line 1254 "FlickrPublishingAuthenticator.c"
- }
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp0_) {
-#line 1258 "FlickrPublishingAuthenticator.c"
- glong _tmp3_;
- glong _tmp4_;
- glong _tmp5_;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = offset;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = len;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- string_length = _tmp5_;
-#line 1270 "FlickrPublishingAuthenticator.c"
- } else {
- gint _tmp6_;
- gint _tmp7_;
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp6_ = strlen (self);
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp7_ = _tmp6_;
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- string_length = (glong) _tmp7_;
-#line 1280 "FlickrPublishingAuthenticator.c"
- }
-#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp8_ = offset;
-#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp8_ < ((glong) 0)) {
-#line 1286 "FlickrPublishingAuthenticator.c"
- glong _tmp9_;
- glong _tmp10_;
- glong _tmp11_;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp9_ = string_length;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp10_ = offset;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- offset = _tmp9_ + _tmp10_;
-#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp11_ = offset;
-#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
-#line 1300 "FlickrPublishingAuthenticator.c"
- } else {
- glong _tmp12_;
- glong _tmp13_;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp12_ = offset;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp13_ = string_length;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
-#line 1310 "FlickrPublishingAuthenticator.c"
- }
-#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp14_ = len;
-#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp14_ < ((glong) 0)) {
-#line 1316 "FlickrPublishingAuthenticator.c"
- glong _tmp15_;
- glong _tmp16_;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp15_ = string_length;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp16_ = offset;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- len = _tmp15_ - _tmp16_;
-#line 1325 "FlickrPublishingAuthenticator.c"
- }
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp17_ = offset;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp18_ = len;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp19_ = string_length;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp20_ = offset;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp21_ = len;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp22_;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- return result;
-#line 1345 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- gint64 _tmp0_;
- gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
-#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = g_get_real_time ();
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_);
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = _tmp1_;
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10);
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = _tmp3_;
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp2_);
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp4_;
-#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1374 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_consumer_key (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
-#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->consumer_key;
-#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp0_ != NULL, "consumer_key != null");
-#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->consumer_key;
-#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup (_tmp1_);
-#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp2_;
-#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1397 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_request_phase_token (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
-#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->request_phase_token;
-#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp0_ != NULL, "request_phase_token != null");
-#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->request_phase_token;
-#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup (_tmp1_);
-#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp2_;
-#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1420 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
-#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->access_phase_token;
-#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp0_ != NULL, "access_phase_token != null");
-#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->access_phase_token;
-#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup (_tmp1_);
-#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp2_;
-#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1443 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
-#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->access_phase_token_secret;
-#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp0_ != NULL, "access_phase_token_secret != null");
-#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->access_phase_token_secret;
-#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup (_tmp1_);
-#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp2_;
-#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1466 "FlickrPublishingAuthenticator.c"
-}
-
-
-gchar* publishing_authenticator_shotwell_flickr_session_get_username (PublishingAuthenticatorShotwellFlickrSession* self) {
- gchar* result = NULL;
- gboolean _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
-#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL);
-#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession));
-#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp0_, "is_authenticated()");
-#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->username;
-#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_strdup (_tmp1_);
-#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp2_;
-#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1489 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_session_class_init (PublishingAuthenticatorShotwellFlickrSessionClass * klass) {
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_parent_class = g_type_class_peek_parent (klass);
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_authenticator_shotwell_flickr_session_finalize;
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrSessionPrivate));
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_authenticator_shotwell_flickr_session_real_is_authenticated;
-#line 1502 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_session_instance_init (PublishingAuthenticatorShotwellFlickrSession * self) {
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_PRIVATE (self);
-#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->request_phase_token = NULL;
-#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->request_phase_token_secret = NULL;
-#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token = NULL;
-#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->access_phase_token_secret = NULL;
-#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->username = NULL;
-#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->consumer_key = NULL;
-#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->consumer_secret = NULL;
-#line 1523 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_session_finalize (PublishingRESTSupportSession * obj) {
- PublishingAuthenticatorShotwellFlickrSession * self;
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession);
-#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->request_phase_token);
-#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->request_phase_token_secret);
-#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token);
-#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->access_phase_token_secret);
-#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->username);
-#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->consumer_key);
-#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (self->priv->consumer_secret);
-#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_authenticator_shotwell_flickr_session_parent_class)->finalize (obj);
-#line 1547 "FlickrPublishingAuthenticator.c"
-}
-
-
-GType publishing_authenticator_shotwell_flickr_session_get_type (void) {
- static volatile gsize publishing_authenticator_shotwell_flickr_session_type_id__volatile = 0;
- if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_session_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrSession), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_session_instance_init, NULL };
- GType publishing_authenticator_shotwell_flickr_session_type_id;
- publishing_authenticator_shotwell_flickr_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingAuthenticatorShotwellFlickrSession", &g_define_type_info, 0);
- g_once_init_leave (&publishing_authenticator_shotwell_flickr_session_type_id__volatile, publishing_authenticator_shotwell_flickr_session_type_id);
- }
- return publishing_authenticator_shotwell_flickr_session_type_id__volatile;
-}
-
-
-PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session) {
- PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* self = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
-#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL);
-#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = session;
-#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction*) publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/request_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET);
-#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ self = (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "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 1574 "FlickrPublishingAuthenticator.c"
+#line 236 "FlickrPublishingAuthenticator.c"
}
-PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session) {
-#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+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 1581 "FlickrPublishingAuthenticator.c"
+#line 243 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_authentication_request_transaction_class_init (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass * klass) {
-#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 1588 "FlickrPublishingAuthenticator.c"
+#line 250 "FlickrPublishingAuthenticator.c"
}
@@ -1604,59 +263,61 @@ GType publishing_authenticator_shotwell_flickr_authentication_request_transactio
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_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction", &g_define_type_info, 0);
+ 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, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier) {
+PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* user_verifier) {
PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* self = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
+ PublishingRESTSupportOAuth1Session* _tmp0_;
const gchar* _tmp1_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp2_;
+ PublishingRESTSupportOAuth1Session* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
-#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL);
-#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = session;
-#line 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction*) publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET);
-#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ self = (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "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"
_tmp1_ = user_verifier;
-#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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", _tmp1_);
-#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = session;
-#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_request_phase_token (_tmp2_);
-#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp3_ = publishing_rest_support_oauth1_session_get_request_phase_token (_tmp2_);
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp4_ = _tmp3_;
-#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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", _tmp4_);
-#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp4_);
-#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 1639 "FlickrPublishingAuthenticator.c"
+#line 303 "FlickrPublishingAuthenticator.c"
}
-PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier) {
-#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+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 1646 "FlickrPublishingAuthenticator.c"
+#line 310 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass * klass) {
-#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 1653 "FlickrPublishingAuthenticator.c"
+#line 317 "FlickrPublishingAuthenticator.c"
}
@@ -1669,843 +330,509 @@ GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_ge
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_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction", &g_define_type_info, 0);
+ 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;
}
-static gpointer _g_object_ref0 (gpointer self) {
-#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return self ? g_object_ref (self) : NULL;
-#line 1676 "FlickrPublishingAuthenticator.c"
-}
-
-
-PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self = NULL;
- GtkBuilder* _tmp0_;
- GtkBuilder* _tmp1_;
- GtkBuilder* _tmp2_;
- GtkBuilder* _tmp3_;
- GSList* _tmp4_;
- GSList* _tmp5_;
- guint _tmp6_;
- GtkBuilder* _tmp7_;
- GObject* _tmp8_;
- GtkLabel* _tmp9_;
- GtkBuilder* _tmp10_;
- GObject* _tmp11_;
- GtkLabel* _tmp12_;
- GtkBuilder* _tmp13_;
- GObject* _tmp14_;
- GtkEntry* _tmp15_;
- GtkBuilder* _tmp16_;
- GObject* _tmp17_;
- GtkButton* _tmp18_;
- GtkBuilder* _tmp19_;
- GObject* _tmp20_;
- GtkBox* _tmp21_;
- GtkBox* _tmp22_;
-#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrPinEntryPane*) g_object_new (object_type, NULL);
-#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = builder;
-#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _g_object_ref0 (_tmp0_);
-#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->builder);
-#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->builder = _tmp1_;
-#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = builder;
-#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp2_ != NULL, "builder != null");
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = builder;
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = gtk_builder_get_objects (_tmp3_);
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = _tmp4_;
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = g_slist_length (_tmp5_);
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0");
-#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_slist_free0 (_tmp5_);
-#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = builder;
-#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = gtk_builder_get_object (_tmp7_, "explanatory_text");
-#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL);
-#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->explanatory_text);
-#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->explanatory_text = _tmp9_;
-#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = builder;
-#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = gtk_builder_get_object (_tmp10_, "pin_entry_caption");
-#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp11_) : NULL);
-#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pin_entry_caption);
-#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pin_entry_caption = _tmp12_;
-#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp13_ = builder;
-#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp14_ = gtk_builder_get_object (_tmp13_, "pin_entry");
-#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp14_) : NULL);
-#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pin_entry);
-#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pin_entry = _tmp15_;
-#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp16_ = builder;
-#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp17_ = gtk_builder_get_object (_tmp16_, "continue_button");
-#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, gtk_button_get_type ()) ? ((GtkButton*) _tmp17_) : NULL);
-#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->continue_button);
-#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->continue_button = _tmp18_;
-#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp19_ = builder;
-#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp20_ = gtk_builder_get_object (_tmp19_, "pane_widget");
-#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, gtk_box_get_type ()) ? ((GtkBox*) _tmp20_) : NULL);
-#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pane_widget);
-#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pane_widget = _tmp21_;
-#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp22_ = self->priv->pane_widget;
-#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget));
-#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (self);
-#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (GType object_type, const gchar* token) {
+ PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self = NULL;
+ const gchar* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+#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_ = token;
+#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp1_ = g_strdup_printf (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LOGIN_URI, _tmp0_);
+#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp2_ = _tmp1_;
+#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ self = (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane*) g_object_new (object_type, "login-uri", _tmp2_, NULL);
+#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _g_free0 (_tmp2_);
+#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return self;
-#line 1791 "FlickrPublishingAuthenticator.c"
-}
-
-
-PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_new (GtkBuilder* builder) {
-#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, builder);
-#line 1798 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked (PublishingAuthenticatorShotwellFlickrPinEntryPane* self) {
- GtkEntry* _tmp0_;
- const gchar* _tmp1_;
-#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (self));
-#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->pin_entry;
-#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = gtk_entry_get_text (_tmp0_);
-#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_emit (self, publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_PROCEED_SIGNAL], 0, self, _tmp1_);
-#line 1813 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingAuthenticatorShotwellFlickrPinEntryPane* self) {
- GtkButton* _tmp0_;
- GtkEntry* _tmp1_;
- guint _tmp2_;
- guint _tmp3_;
-#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (self));
-#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->continue_button;
-#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->pin_entry;
-#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = gtk_entry_get_text_length (_tmp1_);
-#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = _tmp2_;
-#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), _tmp3_ > ((guint) 0));
-#line 1834 "FlickrPublishingAuthenticator.c"
-}
-
-
-static GtkWidget* publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self;
- GtkWidget* result = NULL;
- GtkBox* _tmp0_;
- GtkWidget* _tmp1_;
-#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane);
-#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->pane_widget;
-#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
-#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp1_;
-#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1853 "FlickrPublishingAuthenticator.c"
+#line 356 "FlickrPublishingAuthenticator.c"
}
-static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self;
- SpitPublishingDialogPaneGeometryOptions result = 0;
-#line 244 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane);
-#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
-#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 1866 "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 363 "FlickrPublishingAuthenticator.c"
}
-static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
-#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked ((PublishingAuthenticatorShotwellFlickrPinEntryPane*) self);
-#line 1873 "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 370 "FlickrPublishingAuthenticator.c"
}
-static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) {
-#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed ((PublishingAuthenticatorShotwellFlickrPinEntryPane*) self);
-#line 1880 "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 377 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self;
- GtkButton* _tmp0_;
- GtkEntry* _tmp1_;
-#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane);
-#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->continue_button;
-#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_connect_object (_tmp0_, "clicked", (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self, 0);
-#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->pin_entry;
-#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self, 0);
-#line 1898 "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 400 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self;
- GtkButton* _tmp0_;
- guint _tmp1_;
- GtkEntry* _tmp2_;
- guint _tmp3_;
-#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane);
-#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->continue_button;
-#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp1_, NULL, FALSE);
-#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self);
-#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->pin_entry;
-#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_parse_name ("changed", GTK_TYPE_EDITABLE, &_tmp3_, NULL, FALSE);
-#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_EDITABLE, GtkEditable), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self);
-#line 1922 "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 407 "FlickrPublishingAuthenticator.c"
}
-static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
- typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer data2);
- register GMarshalFunc_VOID__OBJECT_STRING callback;
- register GCClosure * cc;
- register gpointer data1;
- register gpointer data2;
- cc = (GCClosure *) closure;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (n_param_values == 3);
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_CCLOSURE_SWAP_DATA (closure)) {
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- data1 = closure->data;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- data2 = param_values->data[0].v_pointer;
-#line 1941 "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 445 "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 451 "FlickrPublishingAuthenticator.c"
} else {
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- data1 = param_values->data[0].v_pointer;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- data2 = closure->data;
-#line 1947 "FlickrPublishingAuthenticator.c"
+#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp5_ = FALSE;
+#line 455 "FlickrPublishingAuthenticator.c"
}
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback);
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), data2);
-#line 1953 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_class_init (PublishingAuthenticatorShotwellFlickrPinEntryPaneClass * klass) {
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_parent_class = g_type_class_peek_parent (klass);
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate));
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_pin_entry_pane_finalize;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_PROCEED_SIGNAL] = g_signal_new ("proceed", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, G_TYPE_STRING);
-#line 1966 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) {
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled;
-#line 1981 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_instance_init (PublishingAuthenticatorShotwellFlickrPinEntryPane * self) {
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE (self);
-#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pane_widget = NULL;
-#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->continue_button = NULL;
-#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pin_entry = NULL;
-#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->pin_entry_caption = NULL;
-#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->explanatory_text = NULL;
-#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->builder = NULL;
-#line 2000 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_pin_entry_pane_finalize (GObject * obj) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane * self;
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane);
-#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pane_widget);
-#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->continue_button);
-#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pin_entry);
-#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->pin_entry_caption);
-#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->explanatory_text);
-#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->builder);
-#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_pin_entry_pane_parent_class)->finalize (obj);
-#line 2022 "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 461 "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 467 "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 473 "FlickrPublishingAuthenticator.c"
+ }
+#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ __vala_SoupURI_free0 (uri);
+#line 477 "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 1428 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ res = (guint8*) self;
+#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ res_length1 = -1;
+#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _res_size_ = res_length1;
+#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ res_length1 = (gint) _tmp1_;
+#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp2_ = res_length1;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp3_ = res;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp3__length1 = res_length1;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp4_ = _tmp3_;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ _tmp4__length1 = _tmp3__length1;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ if (result_length1) {
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ *result_length1 = _tmp4__length1;
+#line 521 "FlickrPublishingAuthenticator.c"
+ }
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ result = _tmp4_;
+#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ return result;
+#line 527 "FlickrPublishingAuthenticator.c"
}
-GType publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type (void) {
- static volatile gsize publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile = 0;
- if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_instance_init, NULL };
- static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
- GType publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id;
- publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellFlickrPinEntryPane", &g_define_type_info, 0);
- g_type_add_interface_static (publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info);
- g_once_init_leave (&publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile, publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id);
- }
- return publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile;
+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 534 "FlickrPublishingAuthenticator.c"
}
-static void _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self) {
-#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated ((PublishingAuthenticatorShotwellFlickrFlickr*) self);
-#line 2043 "FlickrPublishingAuthenticator.c"
+static void publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* self, WebKitURISchemeRequest* request) {
+ SoupURI* uri = NULL;
+ WebKitURISchemeRequest* _tmp0_;
+ const gchar* _tmp1_;
+ SoupURI* _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_;
+ WebKitURISchemeRequest* _tmp12_;
+#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_ = request;
+#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp1_ = webkit_uri_scheme_request_get_uri (_tmp0_);
+#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp2_ = soup_uri_new (_tmp1_);
+#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ uri = _tmp2_;
+#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp3_ = uri->query;
+#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp4_ = soup_form_decode (_tmp3_);
+#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ form_data = _tmp4_;
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp5_ = g_hash_table_lookup (form_data, "oauth_verifier");
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp6_ = g_strdup ((const gchar*) _tmp5_);
+#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 = _tmp6_;
+#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp7_ = g_strdup ("");
+#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ response = _tmp7_;
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp8_ = string_get_data (response, &_tmp8__length1);
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp9_ = _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_ = (_tmp9_ != NULL) ? _vala_array_dup1 (_tmp9_, _tmp9__length1) : ((gpointer) _tmp9_);
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp10__length1 = _tmp9__length1;
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp11_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp10_, _tmp10__length1, NULL);
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ mins = _tmp11_;
+#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp12_ = request;
+#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ webkit_uri_scheme_request_finish (_tmp12_, 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 615 "FlickrPublishingAuthenticator.c"
}
-static void _g_free0_ (gpointer var) {
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- var = (g_free (var), NULL);
-#line 2050 "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 634 "FlickrPublishingAuthenticator.c"
}
-static void _g_variant_unref0_ (gpointer var) {
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
-#line 2057 "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 643 "FlickrPublishingAuthenticator.c"
}
-static GVariant* _variant_new1 (const gchar* value) {
-#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return g_variant_ref_sink (g_variant_new_string (value));
-#line 2064 "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 655 "FlickrPublishingAuthenticator.c"
}
-static GVariant* _variant_new2 (const gchar* value) {
-#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return g_variant_ref_sink (g_variant_new_string (value));
-#line 2071 "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;
SpitPublishingPluginHost* _tmp0_;
- SpitPublishingPluginHost* _tmp1_;
- GHashFunc _tmp2_;
- GEqualFunc _tmp3_;
- GHashTable* _tmp4_;
- GHashTable* _tmp5_;
- gchar* _tmp6_;
- GVariant* _tmp7_;
- GHashTable* _tmp8_;
- gchar* _tmp9_;
- GVariant* _tmp10_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp11_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp12_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp13_;
-#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
-#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = (PublishingAuthenticatorShotwellFlickrFlickr*) g_object_new (object_type, NULL);
-#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = host;
-#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _g_object_ref0 (_tmp0_);
-#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->host);
-#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->host = _tmp1_;
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = g_str_hash;
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_str_equal;
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_variant_unref0_);
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_hash_table_unref0 (self->priv->params);
-#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->params = _tmp4_;
-#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = self->priv->params;
-#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = g_strdup ("ConsumerKey");
-#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = _variant_new1 (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY);
-#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_hash_table_insert (_tmp5_, _tmp6_, _tmp7_);
-#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = self->priv->params;
-#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = g_strdup ("ConsumerSecret");
-#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = _variant_new2 (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET);
-#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_hash_table_insert (_tmp8_, _tmp9_, _tmp10_);
-#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = publishing_authenticator_shotwell_flickr_session_new ();
-#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _publishing_rest_support_session_unref0 (self->priv->session);
-#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv->session = _tmp11_;
-#line 274 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp12_ = self->priv->session;
-#line 274 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_set_api_credentials (_tmp12_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET);
-#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp13_ = self->priv->session;
-#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0);
-#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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, _tmp0_);
+#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return self;
-#line 2145 "FlickrPublishingAuthenticator.c"
+#line 682 "FlickrPublishingAuthenticator.c"
}
PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host) {
-#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2152 "FlickrPublishingAuthenticator.c"
-}
-
-
-void publishing_authenticator_shotwell_flickr_flickr_invalidate_persistent_session (PublishingAuthenticatorShotwellFlickrFlickr* self) {
-#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (self, "");
-#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (self, "");
-#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (self, "");
-#line 2165 "FlickrPublishingAuthenticator.c"
-}
-
-
-static gboolean publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- gboolean result = FALSE;
- gboolean _tmp0_ = FALSE;
- gboolean _tmp1_ = FALSE;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gboolean _tmp4_;
-#line 288 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), FALSE);
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (self);
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = _tmp2_;
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = _tmp3_ != NULL;
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp3_);
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp4_) {
-#line 2188 "FlickrPublishingAuthenticator.c"
- gchar* _tmp5_;
- gchar* _tmp6_;
-#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (self);
-#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = _tmp5_;
-#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _tmp6_ != NULL;
-#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp6_);
-#line 2199 "FlickrPublishingAuthenticator.c"
- } else {
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = FALSE;
-#line 2203 "FlickrPublishingAuthenticator.c"
- }
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_tmp1_) {
-#line 2207 "FlickrPublishingAuthenticator.c"
- gchar* _tmp7_;
- gchar* _tmp8_;
-#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (self);
-#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = _tmp7_;
-#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = _tmp8_ != NULL;
-#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp8_);
-#line 2218 "FlickrPublishingAuthenticator.c"
- } else {
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = FALSE;
-#line 2222 "FlickrPublishingAuthenticator.c"
- }
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp0_;
-#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 2228 "FlickrPublishingAuthenticator.c"
+#line 689 "FlickrPublishingAuthenticator.c"
}
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- gchar* result = NULL;
- SpitPublishingPluginHost* _tmp0_;
- gchar* _tmp1_;
-#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL);
-#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL);
-#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp1_;
-#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 2246 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* username) {
- SpitPublishingPluginHost* _tmp0_;
- const gchar* _tmp1_;
-#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (username != NULL);
-#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = username;
-#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", _tmp1_);
-#line 2263 "FlickrPublishingAuthenticator.c"
-}
-
-
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- gchar* result = NULL;
- SpitPublishingPluginHost* _tmp0_;
- gchar* _tmp1_;
-#line 302 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL);
-#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL);
-#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp1_;
-#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 2281 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) {
- SpitPublishingPluginHost* _tmp0_;
- const gchar* _tmp1_;
-#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (token != NULL);
-#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = token;
-#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", _tmp1_);
-#line 2298 "FlickrPublishingAuthenticator.c"
-}
-
-
-static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- gchar* result = NULL;
- SpitPublishingPluginHost* _tmp0_;
- gchar* _tmp1_;
-#line 310 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL);
-#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp1_;
-#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 2316 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* secret) {
- SpitPublishingPluginHost* _tmp0_;
- const gchar* _tmp1_;
-#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (secret != NULL);
-#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = secret;
-#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", _tmp1_);
-#line 2333 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (SpitPublishingAuthenticator* base) {
+static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
PublishingAuthenticatorShotwellFlickrFlickr * self;
gboolean _tmp0_;
-#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 319 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (self);
-#line 319 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp0_ = publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
+#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp0_) {
-#line 2346 "FlickrPublishingAuthenticator.c"
- PublishingAuthenticatorShotwellFlickrSession* _tmp1_;
+#line 702 "FlickrPublishingAuthenticator.c"
+ PublishingRESTSupportOAuth1Session* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
gchar* _tmp6_;
gchar* _tmp7_;
-#line 320 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:320: attempt start: a persistent se" \
-"ssion is available; using it");
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->session;
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (self);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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"
+ _tmp1_ = 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"
+ _tmp2_ = 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"
_tmp3_ = _tmp2_;
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (self);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp4_ = 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"
_tmp5_ = _tmp4_;
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (self);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp6_ = 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"
_tmp7_ = _tmp6_;
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, _tmp7_);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, _tmp7_);
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp7_);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp5_);
-#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp3_);
-#line 2378 "FlickrPublishingAuthenticator.c"
+#line 734 "FlickrPublishingAuthenticator.c"
} else {
-#line 325 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:325: attempt start: no persistent s" \
-"ession available; showing login welcome pane");
-#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2384 "FlickrPublishingAuthenticator.c"
+#line 740 "FlickrPublishingAuthenticator.c"
}
}
-static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (SpitPublishingAuthenticator* base) {
+static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
PublishingAuthenticatorShotwellFlickrFlickr * self;
gboolean result = FALSE;
-#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
result = TRUE;
-#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return result;
-#line 2398 "FlickrPublishingAuthenticator.c"
-}
-
-
-static gpointer _g_hash_table_ref0 (gpointer self) {
-#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return self ? g_hash_table_ref (self) : NULL;
-#line 2405 "FlickrPublishingAuthenticator.c"
-}
-
-
-static GHashTable* publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter (SpitPublishingAuthenticator* base) {
- PublishingAuthenticatorShotwellFlickrFlickr * self;
- GHashTable* result = NULL;
- GHashTable* _tmp0_;
- GHashTable* _tmp1_;
-#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr);
-#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->params;
-#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = _g_hash_table_ref0 (_tmp0_);
-#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- result = _tmp1_;
-#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return result;
-#line 2424 "FlickrPublishingAuthenticator.c"
+#line 754 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_flickr_real_logout (SpitPublishingAuthenticator* base) {
+static void publishing_authenticator_shotwell_flickr_flickr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
PublishingAuthenticatorShotwellFlickrFlickr * self;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
-#line 338 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ 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 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->session;
-#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_deauthenticate (_tmp0_);
-#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_invalidate_persistent_session (self);
-#line 2439 "FlickrPublishingAuthenticator.c"
+#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 769 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (SpitPublishingAuthenticator* base) {
+static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
PublishingAuthenticatorShotwellFlickrFlickr * self;
-#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2447 "FlickrPublishingAuthenticator.c"
+#line 777 "FlickrPublishingAuthenticator.c"
}
static void _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self) {
-#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked ((PublishingAuthenticatorShotwellFlickrFlickr*) self);
-#line 2454 "FlickrPublishingAuthenticator.c"
+#line 784 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (PublishingAuthenticatorShotwellFlickrFlickr* self) {
SpitPublishingPluginHost* _tmp0_;
SpitPublishingPluginHost* _tmp1_;
-#line 347 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 348 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:348: ACTION: installing login welco" \
+#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ g_debug ("FlickrPublishingAuthenticator.vala:108: ACTION: installing login welco" \
"me pane");
-#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->host;
-#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2473 "FlickrPublishingAuthenticator.c"
+#line 803 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked (PublishingAuthenticatorShotwellFlickrFlickr* self) {
-#line 354 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 355 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:355: EVENT: user clicked 'Login' bu" \
+#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 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (self);
-#line 2484 "FlickrPublishingAuthenticator.c"
+#line 814 "FlickrPublishingAuthenticator.c"
}
static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) {
-#line 367 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2491 "FlickrPublishingAuthenticator.c"
+#line 821 "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 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2498 "FlickrPublishingAuthenticator.c"
+#line 828 "FlickrPublishingAuthenticator.c"
}
@@ -2513,52 +840,52 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_run_authenticatio
SpitPublishingPluginHost* _tmp0_;
SpitPublishingPluginHost* _tmp1_;
PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* txn = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp2_;
+ PublishingRESTSupportOAuth1Session* _tmp2_;
PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* _tmp3_;
GError * _inner_error_ = NULL;
-#line 360 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 361 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:361: ACTION: running authentication" \
+#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ g_debug ("FlickrPublishingAuthenticator.vala:121: ACTION: running authentication" \
" request transaction");
-#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->host;
-#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 364 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->host;
-#line 364 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->session;
-#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
txn = _tmp3_;
-#line 367 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2531 "FlickrPublishingAuthenticator.c"
+#line 861 "FlickrPublishingAuthenticator.c"
{
-#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
-#line 2539 "FlickrPublishingAuthenticator.c"
+#line 869 "FlickrPublishingAuthenticator.c"
goto __catch1_spit_publishing_publishing_error;
}
-#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_clear_error (&_inner_error_);
-#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return;
-#line 2550 "FlickrPublishingAuthenticator.c"
+#line 880 "FlickrPublishingAuthenticator.c"
}
}
goto __finally1;
@@ -2567,36 +894,36 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_run_authenticatio
GError* err = NULL;
SpitPublishingPluginHost* _tmp4_;
GError* _tmp5_;
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
err = _inner_error_;
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_inner_error_ = NULL;
-#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = self->priv->host;
-#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_error_free0 (err);
-#line 2571 "FlickrPublishingAuthenticator.c"
+#line 901 "FlickrPublishingAuthenticator.c"
}
__finally1:
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_clear_error (&_inner_error_);
-#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return;
-#line 2584 "FlickrPublishingAuthenticator.c"
+#line 914 "FlickrPublishingAuthenticator.c"
}
-#line 360 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 2588 "FlickrPublishingAuthenticator.c"
+#line 918 "FlickrPublishingAuthenticator.c"
}
@@ -2611,44 +938,44 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_
PublishingRESTSupportTransaction* _tmp7_;
gchar* _tmp8_;
gchar* _tmp9_;
-#line 377 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 377 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
-#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = txn;
-#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
-#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
-#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = txn;
-#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
-#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self);
-#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp4_ = txn;
-#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
-#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp6_ = _tmp5_;
-#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:381: EVENT: OAuth authentication re" \
+#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'", _tmp6_);
-#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp6_);
-#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp7_ = txn;
-#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_);
-#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp9_ = _tmp8_;
-#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (self, _tmp9_);
-#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp9_);
-#line 2639 "FlickrPublishingAuthenticator.c"
+#line 969 "FlickrPublishingAuthenticator.c"
}
@@ -2659,34 +986,34 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_
guint _tmp3_;
SpitPublishingPluginHost* _tmp4_;
GError* _tmp5_;
-#line 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
-#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = txn;
-#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
-#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
-#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = txn;
-#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
-#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self);
-#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:392: EVENT: OAuth authentication re" \
+#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 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = self->priv->host;
-#line 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 153 "/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 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = err;
-#line 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
-#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 2676 "FlickrPublishingAuthenticator.c"
+#line 1006 "FlickrPublishingAuthenticator.c"
}
@@ -2707,412 +1034,207 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_
const gchar* _tmp10_;
const gchar* _tmp16_;
const gchar* _tmp17_;
-#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (response != NULL);
-#line 399 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = response;
-#line 399 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:399: ACTION: parsing authorization " \
+#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", _tmp0_);
-#line 401 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
oauth_token = NULL;
-#line 402 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 162 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
oauth_token_secret = NULL;
-#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp1_ = response;
-#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = soup_form_decode (_tmp1_);
-#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
data = _tmp2_;
-#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp3_ = data;
-#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_);
-#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (oauth_token);
-#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = g_strdup (_tmp4_);
-#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
oauth_token = _tmp5_;
-#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp6_ = data;
-#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_);
-#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (oauth_token_secret);
-#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp8_ = g_strdup (_tmp7_);
-#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
oauth_token_secret = _tmp8_;
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp10_ = oauth_token;
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp10_ == NULL) {
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp9_ = TRUE;
-#line 2741 "FlickrPublishingAuthenticator.c"
+#line 1071 "FlickrPublishingAuthenticator.c"
} else {
const gchar* _tmp11_;
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp11_ = oauth_token_secret;
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp9_ = _tmp11_ == NULL;
-#line 2748 "FlickrPublishingAuthenticator.c"
+#line 1078 "FlickrPublishingAuthenticator.c"
}
-#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp9_) {
-#line 2752 "FlickrPublishingAuthenticator.c"
+#line 1082 "FlickrPublishingAuthenticator.c"
SpitPublishingPluginHost* _tmp12_;
const gchar* _tmp13_;
GError* _tmp14_;
GError* _tmp15_;
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp12_ = self->priv->host;
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp12_ = 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"
_tmp13_ = response;
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp14_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "'%s' isn't a valid response to an OAuth authentication request", _tmp13_);
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp15_ = _tmp14_;
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp12_, _tmp15_);
-#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_error_free0 (_tmp15_);
-#line 2769 "FlickrPublishingAuthenticator.c"
+#line 1099 "FlickrPublishingAuthenticator.c"
}
-#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp16_ = oauth_token;
-#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp17_ = oauth_token_secret;
-#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (self, _tmp16_, _tmp17_);
-#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_hash_table_unref0 (data);
-#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (oauth_token_secret);
-#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (oauth_token);
-#line 2783 "FlickrPublishingAuthenticator.c"
+#line 1113 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token, const gchar* token_secret) {
const gchar* _tmp0_;
const gchar* _tmp1_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp2_;
+ PublishingRESTSupportOAuth1Session* _tmp2_;
const gchar* _tmp3_;
const gchar* _tmp4_;
const gchar* _tmp5_;
-#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (token != NULL);
-#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (token_secret != NULL);
-#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = token;
-#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp1_ = token_secret;
-#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:417: EVENT: OAuth authentication to" \
+#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", _tmp0_, _tmp1_);
-#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->session;
-#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 180 "/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 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp3_ = token;
-#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp4_ = token_secret;
-#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (_tmp2_, _tmp3_, _tmp4_);
-#line 422 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ publishing_rest_support_oauth1_session_set_request_phase_credentials (_tmp2_, _tmp3_, _tmp4_);
+#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = token;
-#line 422 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_do_launch_system_browser (self, _tmp5_);
-#line 2818 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (PublishingAuthenticatorShotwellFlickrFlickr* self) {
-#line 425 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 426 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:426: EVENT: system browser launched" \
-".");
-#line 428 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (self);
-#line 2829 "FlickrPublishingAuthenticator.c"
+#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (self, _tmp5_);
+#line 1148 "FlickrPublishingAuthenticator.c"
}
-static void _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed (PublishingAuthenticatorShotwellFlickrPinEntryPane* _sender, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self) {
-#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, sender, authorization_pin);
-#line 2836 "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 1155 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* pin) {
- PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp0_;
- guint _tmp1_;
- const gchar* _tmp2_;
-#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (sender));
-#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (pin != NULL);
-#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = sender;
-#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_parse_name ("proceed", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, &_tmp1_, NULL, FALSE);
-#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed, self);
-#line 434 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:434: EVENT: user clicked 'Continue'" \
-" in PIN entry pane.");
-#line 436 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = pin;
-#line 436 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (self, _tmp2_);
-#line 2862 "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 1162 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_flickr_do_launch_system_browser (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) {
- gchar* login_uri = NULL;
+static void publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) {
+ PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* pane = NULL;
const gchar* _tmp0_;
- gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- const gchar* _tmp5_;
- GError * _inner_error_ = NULL;
-#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _tmp1_;
+ SpitPublishingPluginHost* _tmp2_;
+#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (token != NULL);
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = token;
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strconcat ("https://www.flickr.com/services/oauth/authorize?oauth_token=", _tmp0_, NULL);
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = _tmp1_;
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = g_strconcat (_tmp2_, "&perms=write", NULL);
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = _tmp3_;
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp2_);
-#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- login_uri = _tmp4_;
-#line 443 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = login_uri;
-#line 443 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:443: ACTION: launching system brows" \
-"er with uri = '%s'", _tmp5_);
-#line 2897 "FlickrPublishingAuthenticator.c"
- {
- const gchar* _tmp6_;
- gchar* _tmp7_;
- gchar* _tmp8_;
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = login_uri;
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = g_strconcat ("xdg-open ", _tmp6_, NULL);
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = _tmp7_;
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_spawn_command_line_async (_tmp8_, &_inner_error_);
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp8_);
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (_inner_error_->domain == G_SPAWN_ERROR) {
-#line 2916 "FlickrPublishingAuthenticator.c"
- goto __catch2_g_spawn_error;
- }
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (login_uri);
-#line 446 "/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 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_clear_error (&_inner_error_);
-#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 2927 "FlickrPublishingAuthenticator.c"
- }
- }
- goto __finally2;
- __catch2_g_spawn_error:
- {
- GError* e = NULL;
- SpitPublishingPluginHost* _tmp9_;
- GError* _tmp10_;
- GError* _tmp11_;
-#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- e = _inner_error_;
-#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _inner_error_ = NULL;
-#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = self->priv->host;
-#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, "couldn't launch system web browser to complete Flickr login");
-#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = _tmp10_;
-#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_publishing_plugin_host_post_error (_tmp9_, _tmp11_);
-#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_error_free0 (_tmp11_);
-#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_error_free0 (e);
-#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (login_uri);
-#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 2957 "FlickrPublishingAuthenticator.c"
- }
- __finally2:
-#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (login_uri);
-#line 445 "/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 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_clear_error (&_inner_error_);
-#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 2970 "FlickrPublishingAuthenticator.c"
- }
-#line 453 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (self);
-#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (login_uri);
-#line 2976 "FlickrPublishingAuthenticator.c"
+#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp1_ = publishing_authenticator_shotwell_flickr_web_authentication_pane_new (_tmp0_);
+#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ pane = _tmp1_;
+#line 187 "/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 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ spit_publishing_plugin_host_install_dialog_pane (_tmp2_, 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 1191 "FlickrPublishingAuthenticator.c"
}
-static void publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- GtkBuilder* builder = NULL;
- GtkBuilder* _tmp0_;
- PublishingAuthenticatorShotwellFlickrPinEntryPane* pin_entry_pane = NULL;
- GtkBuilder* _tmp7_;
- PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp8_;
- PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp9_;
- SpitPublishingPluginHost* _tmp10_;
- PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp11_;
- GError * _inner_error_ = NULL;
-#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+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 457 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:457: ACTION: showing PIN entry pane");
-#line 459 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = gtk_builder_new ();
-#line 459 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- builder = _tmp0_;
-#line 2998 "FlickrPublishingAuthenticator.c"
- {
- GtkBuilder* _tmp1_;
-#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = builder;
-#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- gtk_builder_add_from_resource (_tmp1_, PLUGIN_RESOURCE_PATH "/" "flickr_pin_entry_pane.ui", &_inner_error_);
-#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 3007 "FlickrPublishingAuthenticator.c"
- goto __catch3_g_error;
- }
- }
- goto __finally3;
- __catch3_g_error:
- {
- GError* e = NULL;
- GError* _tmp2_;
- const gchar* _tmp3_;
- SpitPublishingPluginHost* _tmp4_;
- GError* _tmp5_;
- GError* _tmp6_;
-#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- e = _inner_error_;
-#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _inner_error_ = NULL;
-#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = e;
-#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = _tmp2_->message;
-#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_warning ("FlickrPublishingAuthenticator.vala:465: Could not parse UI file! Error" \
-": %s.", _tmp3_);
-#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = self->priv->host;
-#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A file required for publishing is unavailable. Publishing to Flickr ca" \
-"n’t continue."));
-#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = _tmp5_;
-#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_publishing_plugin_host_post_error (_tmp4_, _tmp6_);
-#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_error_free0 (_tmp6_);
-#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_error_free0 (e);
-#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (builder);
-#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 3046 "FlickrPublishingAuthenticator.c"
- }
- __finally3:
-#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (builder);
-#line 461 "/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 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_clear_error (&_inner_error_);
-#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return;
-#line 3059 "FlickrPublishingAuthenticator.c"
- }
-#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = builder;
-#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = publishing_authenticator_shotwell_flickr_pin_entry_pane_new (_tmp7_);
-#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- pin_entry_pane = _tmp8_;
-#line 473 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = pin_entry_pane;
-#line 473 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_connect_object (_tmp9_, "proceed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed, self, 0);
-#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = self->priv->host;
-#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = pin_entry_pane;
-#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- spit_publishing_plugin_host_install_dialog_pane (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
-#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (pin_entry_pane);
-#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (builder);
-#line 3081 "FlickrPublishingAuthenticator.c"
+#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 1211 "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 484 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 3088 "FlickrPublishingAuthenticator.c"
+#line 1218 "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 485 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 3095 "FlickrPublishingAuthenticator.c"
+#line 1225 "FlickrPublishingAuthenticator.c"
}
@@ -3121,97 +1243,97 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (Publi
SpitPublishingPluginHost* _tmp1_;
SpitPublishingPluginHost* _tmp2_;
PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* txn = NULL;
- PublishingAuthenticatorShotwellFlickrSession* _tmp3_;
+ PublishingRESTSupportOAuth1Session* _tmp3_;
const gchar* _tmp4_;
PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* _tmp5_;
GError * _inner_error_ = NULL;
-#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (pin != NULL);
-#line 478 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = pin;
-#line 478 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:478: ACTION: validating authorizati" \
+#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ g_debug ("FlickrPublishingAuthenticator.vala:197: ACTION: validating authorizati" \
"on PIN %s", _tmp0_);
-#line 480 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = self->priv->host;
-#line 480 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 199 "/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 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE);
-#line 481 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->host;
-#line 481 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 200 "/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 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_install_static_message_pane (_tmp2_, _ ("Verifying authorization…"), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL);
-#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = self->priv->session;
-#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp3_ = 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"
_tmp4_ = pin;
-#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (_tmp3_, _tmp4_);
-#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
txn = _tmp5_;
-#line 484 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 485 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 3136 "FlickrPublishingAuthenticator.c"
+#line 1266 "FlickrPublishingAuthenticator.c"
{
-#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
-#line 3144 "FlickrPublishingAuthenticator.c"
- goto __catch4_spit_publishing_publishing_error;
+#line 1274 "FlickrPublishingAuthenticator.c"
+ goto __catch2_spit_publishing_publishing_error;
}
-#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_clear_error (&_inner_error_);
-#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return;
-#line 3155 "FlickrPublishingAuthenticator.c"
+#line 1285 "FlickrPublishingAuthenticator.c"
}
}
- goto __finally4;
- __catch4_spit_publishing_publishing_error:
+ goto __finally2;
+ __catch2_spit_publishing_publishing_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp6_;
GError* _tmp7_;
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
err = _inner_error_;
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_inner_error_ = NULL;
-#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = self->priv->host;
-#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp6_ = 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"
_tmp7_ = err;
-#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_);
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_error_free0 (err);
-#line 3176 "FlickrPublishingAuthenticator.c"
+#line 1306 "FlickrPublishingAuthenticator.c"
}
- __finally4:
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ __finally2:
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_clear_error (&_inner_error_);
-#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
return;
-#line 3189 "FlickrPublishingAuthenticator.c"
+#line 1319 "FlickrPublishingAuthenticator.c"
}
-#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
-#line 3193 "FlickrPublishingAuthenticator.c"
+#line 1323 "FlickrPublishingAuthenticator.c"
}
@@ -3223,36 +1345,36 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetc
PublishingRESTSupportTransaction* _tmp4_;
gchar* _tmp5_;
gchar* _tmp6_;
-#line 494 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 494 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
-#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = txn;
-#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
-#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self);
-#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = txn;
-#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
-#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self);
-#line 498 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:498: EVENT: fetching OAuth access t" \
+#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 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp4_ = txn;
-#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
-#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp6_ = _tmp5_;
-#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (self, _tmp6_);
-#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (_tmp6_);
-#line 3233 "FlickrPublishingAuthenticator.c"
+#line 1363 "FlickrPublishingAuthenticator.c"
}
@@ -3263,34 +1385,34 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetc
guint _tmp3_;
SpitPublishingPluginHost* _tmp4_;
GError* _tmp5_;
-#line 503 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 503 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn));
-#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = txn;
-#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
-#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self);
-#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = txn;
-#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
-#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self);
-#line 508 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:508: EVENT: fetching OAuth access t" \
+#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 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = self->priv->host;
-#line 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 229 "/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 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = err;
-#line 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
-#line 511 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 3270 "FlickrPublishingAuthenticator.c"
+#line 1400 "FlickrPublishingAuthenticator.c"
}
@@ -3317,334 +1439,159 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_extract_access_ph
gboolean _tmp15_ = FALSE;
gboolean _tmp16_ = FALSE;
const gchar* _tmp17_;
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_return_if_fail (response != NULL);
-#line 515 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp0_ = response;
-#line 515 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:515: ACTION: extracting access phas" \
+#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ g_debug ("FlickrPublishingAuthenticator.vala:234: ACTION: extracting access phas" \
"e credentials from '%s'", _tmp0_);
-#line 517 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
token = NULL;
-#line 518 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
token_secret = NULL;
-#line 519 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 238 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
username = NULL;
-#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp1_ = response;
-#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp2_ = soup_form_decode (_tmp1_);
-#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
data = _tmp2_;
-#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp3_ = data;
-#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_);
-#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (token);
-#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp5_ = g_strdup (_tmp4_);
-#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
token = _tmp5_;
-#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp6_ = data;
-#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_);
-#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (token_secret);
-#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp8_ = g_strdup (_tmp7_);
-#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
token_secret = _tmp8_;
-#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp9_ = data;
-#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
g_hash_table_lookup_extended (_tmp9_, "username", NULL, &_tmp10_);
-#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (username);
-#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp11_ = g_strdup (_tmp10_);
-#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
username = _tmp11_;
-#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp12_ = token;
-#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp13_ = token_secret;
-#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp14_ = username;
-#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_debug ("FlickrPublishingAuthenticator.vala:526: access phase credentials: { to" \
+#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' }", _tmp12_, _tmp13_, _tmp14_);
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp17_ = token;
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp17_ == NULL) {
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp16_ = TRUE;
-#line 3361 "FlickrPublishingAuthenticator.c"
+#line 1491 "FlickrPublishingAuthenticator.c"
} else {
const gchar* _tmp18_;
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp18_ = token_secret;
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp16_ = _tmp18_ == NULL;
-#line 3368 "FlickrPublishingAuthenticator.c"
+#line 1498 "FlickrPublishingAuthenticator.c"
}
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp16_) {
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp15_ = TRUE;
-#line 3374 "FlickrPublishingAuthenticator.c"
+#line 1504 "FlickrPublishingAuthenticator.c"
} else {
const gchar* _tmp19_;
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp19_ = username;
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp15_ = _tmp19_ == NULL;
-#line 3381 "FlickrPublishingAuthenticator.c"
+#line 1511 "FlickrPublishingAuthenticator.c"
}
-#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
if (_tmp15_) {
-#line 3385 "FlickrPublishingAuthenticator.c"
+#line 1515 "FlickrPublishingAuthenticator.c"
SpitPublishingPluginHost* _tmp20_;
GError* _tmp21_;
GError* _tmp22_;
-#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp20_ = self->priv->host;
-#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp20_ = 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"
_tmp21_ = 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 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp22_ = _tmp21_;
-#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
spit_publishing_plugin_host_post_error (_tmp20_, _tmp22_);
-#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_error_free0 (_tmp22_);
-#line 533 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 3401 "FlickrPublishingAuthenticator.c"
+#line 1531 "FlickrPublishingAuthenticator.c"
} else {
- PublishingAuthenticatorShotwellFlickrSession* _tmp23_;
+ PublishingRESTSupportOAuth1Session* _tmp23_;
const gchar* _tmp24_;
const gchar* _tmp25_;
const gchar* _tmp26_;
-#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp23_ = self->priv->session;
-#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ _tmp23_ = 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"
_tmp24_ = token;
-#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp25_ = token_secret;
-#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_tmp26_ = username;
-#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (_tmp23_, _tmp24_, _tmp25_, _tmp26_);
-#line 3417 "FlickrPublishingAuthenticator.c"
+#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+ publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp23_, _tmp24_, _tmp25_, _tmp26_);
+#line 1547 "FlickrPublishingAuthenticator.c"
}
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_hash_table_unref0 (data);
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (username);
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (token_secret);
-#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
_g_free0 (token);
-#line 3427 "FlickrPublishingAuthenticator.c"
-}
-
-
-static GVariant* _variant_new3 (gchar* value) {
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return g_variant_ref_sink (g_variant_new_string (value));
-#line 3434 "FlickrPublishingAuthenticator.c"
-}
-
-
-static GVariant* _variant_new4 (gchar* value) {
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return g_variant_ref_sink (g_variant_new_string (value));
-#line 3441 "FlickrPublishingAuthenticator.c"
-}
-
-
-static GVariant* _variant_new5 (gchar* value) {
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- return g_variant_ref_sink (g_variant_new_string (value));
-#line 3448 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated (PublishingAuthenticatorShotwellFlickrFlickr* self) {
- GHashTable* _tmp0_;
- gchar* _tmp1_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- GVariant* _tmp5_;
- GHashTable* _tmp6_;
- gchar* _tmp7_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp8_;
- gchar* _tmp9_;
- gchar* _tmp10_;
- GVariant* _tmp11_;
- GHashTable* _tmp12_;
- gchar* _tmp13_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp14_;
- gchar* _tmp15_;
- gchar* _tmp16_;
- GVariant* _tmp17_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp18_;
- gchar* _tmp19_;
- gchar* _tmp20_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp21_;
- gchar* _tmp22_;
- gchar* _tmp23_;
- PublishingAuthenticatorShotwellFlickrSession* _tmp24_;
- gchar* _tmp25_;
- gchar* _tmp26_;
-#line 539 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self));
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->params;
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp1_ = g_strdup ("AuthToken");
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp2_ = self->priv->session;
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token (_tmp2_);
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp4_ = _tmp3_;
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp5_ = _variant_new3 (_tmp4_);
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_hash_table_insert (_tmp0_, _tmp1_, _tmp5_);
-#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp4_);
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp6_ = self->priv->params;
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp7_ = g_strdup ("AuthTokenSecret");
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp8_ = self->priv->session;
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp9_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (_tmp8_);
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp10_ = _tmp9_;
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp11_ = _variant_new4 (_tmp10_);
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_hash_table_insert (_tmp6_, _tmp7_, _tmp11_);
-#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp10_);
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp12_ = self->priv->params;
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp13_ = g_strdup ("Username");
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp14_ = self->priv->session;
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp15_ = publishing_authenticator_shotwell_flickr_session_get_username (_tmp14_);
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp16_ = _tmp15_;
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp17_ = _variant_new5 (_tmp16_);
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_hash_table_insert (_tmp12_, _tmp13_, _tmp17_);
-#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp16_);
-#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp18_ = self->priv->session;
-#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp19_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token (_tmp18_);
-#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp20_ = _tmp19_;
-#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (self, _tmp20_);
-#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp20_);
-#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp21_ = self->priv->session;
-#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp22_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (_tmp21_);
-#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp23_ = _tmp22_;
-#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (self, _tmp23_);
-#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp23_);
-#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp24_ = self->priv->session;
-#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp25_ = publishing_authenticator_shotwell_flickr_session_get_username (_tmp24_);
-#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp26_ = _tmp25_;
-#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (self, _tmp26_);
-#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_free0 (_tmp26_);
-#line 549 "/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), "authenticated");
-#line 3562 "FlickrPublishingAuthenticator.c"
+#line 1557 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_flickr_class_init (PublishingAuthenticatorShotwellFlickrFlickrClass * klass) {
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
+#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 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrFlickrPrivate));
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_flickr_finalize;
-#line 3573 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) {
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface);
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_authenticate;
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_can_logout;
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter;
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_logout;
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_refresh;
-#line 3590 "FlickrPublishingAuthenticator.c"
+#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 1572 "FlickrPublishingAuthenticator.c"
}
static void publishing_authenticator_shotwell_flickr_flickr_instance_init (PublishingAuthenticatorShotwellFlickrFlickr * self) {
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_PRIVATE (self);
-#line 3597 "FlickrPublishingAuthenticator.c"
-}
-
-
-static void publishing_authenticator_shotwell_flickr_flickr_finalize (GObject * obj) {
- PublishingAuthenticatorShotwellFlickrFlickr * self;
- PublishingAuthenticatorShotwellFlickrSession* _tmp0_;
- guint _tmp1_;
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr);
-#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _tmp0_ = self->priv->session;
-#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE);
-#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.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_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated, self);
-#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_hash_table_unref0 (self->priv->params);
-#line 262 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _publishing_rest_support_session_unref0 (self->priv->session);
-#line 263 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- _g_object_unref0 (self->priv->host);
-#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala"
- G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_flickr_parent_class)->finalize (obj);
-#line 3621 "FlickrPublishingAuthenticator.c"
}
@@ -3652,32 +1599,12 @@ 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 };
- static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType publishing_authenticator_shotwell_flickr_flickr_type_id;
- publishing_authenticator_shotwell_flickr_flickr_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellFlickrFlickr", &g_define_type_info, 0);
- g_type_add_interface_static (publishing_authenticator_shotwell_flickr_flickr_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info);
+ 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;
}
-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);
-}
-
-
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
index e389908..97629ed 100644
--- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
+++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
@@ -4,318 +4,82 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+using Shotwell.Plugins;
+
namespace Publishing.Authenticator.Shotwell.Flickr {
internal const string ENDPOINT_URL = "https://api.flickr.com/services/rest";
internal const string EXPIRED_SESSION_ERROR_CODE = "98";
- internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\";
-
- internal class Transaction : Publishing.RESTSupport.Transaction {
- public Transaction(Session session, Publishing.RESTSupport.HttpMethod method =
- Publishing.RESTSupport.HttpMethod.POST) {
- base(session, method);
- setup_arguments();
- }
-
- public Transaction.with_uri(Session session, string uri,
- Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST) {
- base.with_endpoint_url(session, uri, method);
- setup_arguments();
- }
-
- private void setup_arguments() {
- var session = (Session) get_parent_session();
-
- add_argument("oauth_nonce", session.get_oauth_nonce());
- add_argument("oauth_signature_method", "HMAC-SHA1");
- add_argument("oauth_version", "1.0");
- add_argument("oauth_callback", "oob");
- add_argument("oauth_timestamp", session.get_oauth_timestamp());
- add_argument("oauth_consumer_key", session.get_consumer_key());
- }
-
-
- public override void execute() throws Spit.Publishing.PublishingError {
- ((Session) get_parent_session()).sign_transaction(this);
-
- base.execute();
- }
- }
-
- internal class Session : Publishing.RESTSupport.Session {
- private string? request_phase_token = null;
- private string? request_phase_token_secret = null;
- private string? access_phase_token = null;
- private string? access_phase_token_secret = null;
- private string? username = null;
- private string? consumer_key = null;
- private string? consumer_secret = null;
-
- public Session() {
- base();
- }
-
- public override bool is_authenticated() {
- return (access_phase_token != null && access_phase_token_secret != null &&
- username != null);
- }
-
- public void authenticate_from_persistent_credentials(string token, string secret,
- string username) {
- this.access_phase_token = token;
- this.access_phase_token_secret = secret;
- this.username = username;
-
- this.authenticated();
- }
-
- public void deauthenticate() {
- access_phase_token = null;
- access_phase_token_secret = null;
- username = null;
- }
-
- public void set_api_credentials(string consumer_key, string consumer_secret) {
- this.consumer_key = consumer_key;
- this.consumer_secret = consumer_secret;
- }
-
- public void sign_transaction(Publishing.RESTSupport.Transaction txn) {
- string http_method = txn.get_method().to_string();
-
- debug("signing transaction with parameters:");
- debug("HTTP method = " + http_method);
-
- Publishing.RESTSupport.Argument[] base_string_arguments = txn.get_arguments();
-
- Publishing.RESTSupport.Argument[] sorted_args =
- Publishing.RESTSupport.Argument.sort(base_string_arguments);
-
- string arguments_string = "";
- for (int i = 0; i < sorted_args.length; i++) {
- arguments_string += (sorted_args[i].key + "=" + sorted_args[i].value);
- if (i < sorted_args.length - 1)
- arguments_string += "&";
- }
-
- string? signing_key = null;
- if (access_phase_token_secret != null) {
- debug("access phase token secret available; using it as signing key");
-
- signing_key = consumer_secret + "&" + access_phase_token_secret;
- } else if (request_phase_token_secret != null) {
- debug("request phase token secret available; using it as signing key");
-
- signing_key = consumer_secret + "&" + request_phase_token_secret;
- } else {
- debug("neither access phase nor request phase token secrets available; using API " +
- "key as signing key");
-
- signing_key = consumer_secret + "&";
- }
-
- string signature_base_string = http_method + "&" + Soup.URI.encode(
- txn.get_endpoint_url(), ENCODE_RFC_3986_EXTRA) + "&" +
- Soup.URI.encode(arguments_string, ENCODE_RFC_3986_EXTRA);
-
- debug("signature base string = '%s'", signature_base_string);
-
- debug("signing key = '%s'", signing_key);
-
- // compute the signature
- string signature = RESTSupport.hmac_sha1(signing_key, signature_base_string);
- signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA);
-
- debug("signature = '%s'", signature);
-
- txn.add_argument("oauth_signature", signature);
- }
-
- public void set_request_phase_credentials(string token, string secret) {
- this.request_phase_token = token;
- this.request_phase_token_secret = secret;
- }
-
- public void set_access_phase_credentials(string token, string secret, string username) {
- this.access_phase_token = token;
- this.access_phase_token_secret = secret;
- this.username = username;
-
- authenticated();
- }
-
- public string get_oauth_nonce() {
- TimeVal currtime = TimeVal();
- currtime.get_current_time();
-
- return Checksum.compute_for_string(ChecksumType.MD5, currtime.tv_sec.to_string() +
- currtime.tv_usec.to_string());
- }
-
- public string get_oauth_timestamp() {
- return GLib.get_real_time().to_string().substring(0, 10);
- }
-
- public string get_consumer_key() {
- assert(consumer_key != null);
- return consumer_key;
- }
-
- public string get_request_phase_token() {
- assert(request_phase_token != null);
- return request_phase_token;
- }
-
- public string get_access_phase_token() {
- assert(access_phase_token != null);
- return access_phase_token;
- }
- public string get_access_phase_token_secret() {
- assert(access_phase_token_secret != null);
- return access_phase_token_secret;
- }
-
- public string get_username() {
- assert(is_authenticated());
- return username;
- }
- }
internal const string API_KEY = "60dd96d4a2ad04888b09c9e18d82c26f";
internal const string API_SECRET = "d0960565e03547c1";
internal const string SERVICE_WELCOME_MESSAGE =
_("You are not currently logged into Flickr.\n\nClick Log in to log into Flickr in your Web browser. You will have to authorize Shotwell Connect to link to your Flickr account.");
- internal class AuthenticationRequestTransaction : Transaction {
- public AuthenticationRequestTransaction(Session session) {
+ internal class AuthenticationRequestTransaction : Publishing.RESTSupport.OAuth1.Transaction {
+ public AuthenticationRequestTransaction(Publishing.RESTSupport.OAuth1.Session session) {
base.with_uri(session, "https://www.flickr.com/services/oauth/request_token",
Publishing.RESTSupport.HttpMethod.GET);
+ add_argument("oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback");
}
}
- internal class AccessTokenFetchTransaction : Transaction {
- public AccessTokenFetchTransaction(Session session, string user_verifier) {
+ internal class AccessTokenFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction {
+ public AccessTokenFetchTransaction(Publishing.RESTSupport.OAuth1.Session session, string user_verifier) {
base.with_uri(session, "https://www.flickr.com/services/oauth/access_token",
Publishing.RESTSupport.HttpMethod.GET);
add_argument("oauth_verifier", user_verifier);
add_argument("oauth_token", session.get_request_phase_token());
+ add_argument("oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback");
}
}
- internal class PinEntryPane : Spit.Publishing.DialogPane, GLib.Object {
- private Gtk.Box pane_widget = null;
- private Gtk.Button continue_button = null;
- private Gtk.Entry pin_entry = null;
- private Gtk.Label pin_entry_caption = null;
- private Gtk.Label explanatory_text = null;
- private Gtk.Builder builder = null;
-
- public signal void proceed(PinEntryPane sender, string authorization_pin);
-
- public PinEntryPane(Gtk.Builder builder) {
- this.builder = builder;
- assert(builder != null);
- assert(builder.get_objects().length() > 0);
-
- explanatory_text = builder.get_object("explanatory_text") as Gtk.Label;
- pin_entry_caption = builder.get_object("pin_entry_caption") as Gtk.Label;
- pin_entry = builder.get_object("pin_entry") as Gtk.Entry;
- continue_button = builder.get_object("continue_button") as Gtk.Button;
-
- pane_widget = builder.get_object("pane_widget") as Gtk.Box;
+ internal class WebAuthenticationPane : Common.WebAuthenticationPane {
+ private string? auth_code = null;
+ private const string LOGIN_URI = "https://www.flickr.com/services/oauth/authorize?oauth_token=%s&perms=write";
- pane_widget.show_all();
+ public signal void authorized(string auth_code);
+ public signal void error();
- on_pin_entry_contents_changed();
+ public WebAuthenticationPane(string token) {
+ Object(login_uri : LOGIN_URI.printf(token));
}
- private void on_continue_clicked() {
- proceed(this, pin_entry.get_text());
- }
+ public override void constructed() {
+ base.constructed();
- private void on_pin_entry_contents_changed() {
- continue_button.set_sensitive(pin_entry.text_length > 0);
+ var ctx = WebKit.WebContext.get_default();
+ ctx.register_uri_scheme("shotwell-auth", this.on_shotwell_auth_request_cb);
}
- public Gtk.Widget get_widget() {
- return pane_widget;
- }
+ public override void on_page_load() {
+ var uri = new Soup.URI(get_view().get_uri());
+ if (uri.scheme == "shotwell-auth" && this.auth_code == null) {
+ this.error();
+ }
- public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() {
- return Spit.Publishing.DialogPane.GeometryOptions.NONE;
+ if (this.auth_code != null) {
+ this.authorized(this.auth_code);
+ }
}
- public void on_pane_installed() {
- continue_button.clicked.connect(on_continue_clicked);
- pin_entry.changed.connect(on_pin_entry_contents_changed);
- }
+ private void on_shotwell_auth_request_cb(WebKit.URISchemeRequest request) {
+ var uri = new Soup.URI(request.get_uri());
+ var form_data = Soup.Form.decode (uri.query);
+ this.auth_code = form_data.lookup("oauth_verifier");
- public void on_pane_uninstalled() {
- continue_button.clicked.disconnect(on_continue_clicked);
- pin_entry.changed.disconnect(on_pin_entry_contents_changed);
+ var response = "";
+ var mins = new MemoryInputStream.from_data(response.data, null);
+ request.finish(mins, -1, "text/plain");
}
}
-
- internal class Flickr : GLib.Object, Spit.Publishing.Authenticator {
- private GLib.HashTable<string, Variant> params;
- private Session session;
- private Spit.Publishing.PluginHost host;
-
+ internal class Flickr : Publishing.Authenticator.Shotwell.OAuth1.Authenticator {
public Flickr(Spit.Publishing.PluginHost host) {
- base();
-
- this.host = host;
- params = new GLib.HashTable<string, Variant>(str_hash, str_equal);
- params.insert("ConsumerKey", API_KEY);
- params.insert("ConsumerSecret", API_SECRET);
-
- session = new Session();
- session.set_api_credentials(API_KEY, API_SECRET);
- session.authenticated.connect(on_session_authenticated);
- }
-
- ~Flickr() {
- session.authenticated.disconnect(on_session_authenticated);
- }
-
- public void invalidate_persistent_session() {
- set_persistent_access_phase_token("");
- set_persistent_access_phase_token_secret("");
- set_persistent_access_phase_username("");
- }
-
- private bool is_persistent_session_valid() {
- return (get_persistent_access_phase_username() != null &&
- get_persistent_access_phase_token() != null &&
- get_persistent_access_phase_token_secret() != null);
- }
-
- private string? get_persistent_access_phase_username() {
- return host.get_config_string("access_phase_username", null);
- }
-
- private void set_persistent_access_phase_username(string username) {
- host.set_config_string("access_phase_username", username);
- }
-
- private string? get_persistent_access_phase_token() {
- return host.get_config_string("access_phase_token", null);
+ base(API_KEY, API_SECRET, host);
}
- private void set_persistent_access_phase_token(string token) {
- host.set_config_string("access_phase_token", token);
- }
-
- private string? get_persistent_access_phase_token_secret() {
- return host.get_config_string("access_phase_token_secret", null);
- }
-
- private void set_persistent_access_phase_token_secret(string secret) {
- host.set_config_string("access_phase_token_secret", secret);
- }
-
- public void authenticate() {
+ public override void authenticate() {
if (is_persistent_session_valid()) {
debug("attempt start: a persistent session is available; using it");
@@ -327,20 +91,16 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
}
}
- public bool can_logout() {
+ public override bool can_logout() {
return true;
}
- public GLib.HashTable<string, Variant> get_authentication_parameter() {
- return this.params;
- }
-
- public void logout () {
+ public override void logout () {
session.deauthenticate();
invalidate_persistent_session();
}
- public void refresh() {
+ public override void refresh() {
// No-Op with flickr
}
@@ -419,59 +179,18 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
session.set_request_phase_credentials(token, token_secret);
- do_launch_system_browser(token);
+ do_web_authentication(token);
}
- private void on_system_browser_launched() {
- debug("EVENT: system browser launched.");
-
- do_show_pin_entry_pane();
+ private void do_web_authentication(string token) {
+ var pane = new WebAuthenticationPane(token);
+ host.install_dialog_pane(pane);
+ pane.authorized.connect(this.do_verify_pin);
+ pane.error.connect(this.on_web_login_error);
}
- private void on_pin_entry_proceed(PinEntryPane sender, string pin) {
- sender.proceed.disconnect(on_pin_entry_proceed);
-
- debug("EVENT: user clicked 'Continue' in PIN entry pane.");
-
- do_verify_pin(pin);
- }
-
- private void do_launch_system_browser(string token) {
- string login_uri = "https://www.flickr.com/services/oauth/authorize?oauth_token=" + token +
- "&perms=write";
-
- debug("ACTION: launching system browser with uri = '%s'", login_uri);
-
- try {
- Process.spawn_command_line_async("xdg-open " + login_uri);
- } catch (SpawnError e) {
- host.post_error(new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR(
- "couldn't launch system web browser to complete Flickr login"));
- return;
- }
-
- on_system_browser_launched();
- }
-
- private void do_show_pin_entry_pane() {
- debug("ACTION: showing PIN entry pane");
-
- Gtk.Builder builder = new Gtk.Builder();
-
- try {
- builder.add_from_resource (Resources.RESOURCE_PATH + "/" +
- "flickr_pin_entry_pane.ui");
- } catch (Error e) {
- warning("Could not parse UI file! Error: %s.", e.message);
- host.post_error(
- new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR(
- _("A file required for publishing is unavailable. Publishing to Flickr can’t continue.")));
- return;
- }
-
- PinEntryPane pin_entry_pane = new PinEntryPane(builder);
- pin_entry_pane.proceed.connect(on_pin_entry_proceed);
- host.install_dialog_pane(pin_entry_pane);
+ private void on_web_login_error() {
+ host.post_error(new Spit.Publishing.PublishingError.PROTOCOL_ERROR(_("Flickr authorization failed")));
}
private void do_verify_pin(string pin) {
@@ -536,17 +255,5 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
}
}
- private void on_session_authenticated() {
- params.insert("AuthToken", session.get_access_phase_token());
- params.insert("AuthTokenSecret", session.get_access_phase_token_secret());
- params.insert("Username", session.get_username());
-
- set_persistent_access_phase_token(session.get_access_phase_token());
- set_persistent_access_phase_token_secret(session.get_access_phase_token_secret());
- set_persistent_access_phase_username(session.get_username());
-
-
- this.authenticated();
- }
}
}
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.c b/plugins/authenticator/shotwell/GoogleAuthenticator.c
index b531dd6..9f9972f 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.c
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.c
@@ -1373,7 +1373,7 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 1368 "GoogleAuthenticator.c"
- goto __catch5_spit_publishing_publishing_error;
+ goto __catch3_spit_publishing_publishing_error;
}
#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (tokens_txn);
@@ -1386,8 +1386,8 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens
#line 1379 "GoogleAuthenticator.c"
}
}
- goto __finally5;
- __catch5_spit_publishing_publishing_error:
+ goto __finally3;
+ __catch3_spit_publishing_publishing_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp4_;
@@ -1406,7 +1406,7 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens
_g_error_free0 (err);
#line 1400 "GoogleAuthenticator.c"
}
- __finally5:
+ __finally3:
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
@@ -1562,11 +1562,11 @@ static void publishing_authenticator_shotwell_google_google_do_extract_tokens (P
#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1554 "GoogleAuthenticator.c"
- goto __catch6_g_error;
+ goto __catch4_g_error;
}
}
- goto __finally6;
- __catch6_g_error:
+ goto __finally4;
+ __catch4_g_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp3_;
@@ -1608,7 +1608,7 @@ static void publishing_authenticator_shotwell_google_google_do_extract_tokens (P
return;
#line 1599 "GoogleAuthenticator.c"
}
- __finally6:
+ __finally4:
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
@@ -1965,11 +1965,11 @@ static void publishing_authenticator_shotwell_google_google_do_fetch_username (P
#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1954 "GoogleAuthenticator.c"
- goto __catch7_g_error;
+ goto __catch5_g_error;
}
}
- goto __finally7;
- __catch7_g_error:
+ goto __finally5;
+ __catch5_g_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp4_;
@@ -1988,7 +1988,7 @@ static void publishing_authenticator_shotwell_google_google_do_fetch_username (P
_g_error_free0 (err);
#line 1976 "GoogleAuthenticator.c"
}
- __finally7:
+ __finally5:
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
@@ -2126,11 +2126,11 @@ static void publishing_authenticator_shotwell_google_google_do_extract_username
#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2112 "GoogleAuthenticator.c"
- goto __catch8_g_error;
+ goto __catch6_g_error;
}
}
- goto __finally8;
- __catch8_g_error:
+ goto __finally6;
+ __catch6_g_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp3_;
@@ -2172,7 +2172,7 @@ static void publishing_authenticator_shotwell_google_google_do_extract_username
return;
#line 2157 "GoogleAuthenticator.c"
}
- __finally8:
+ __finally6:
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
@@ -2361,7 +2361,7 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) {
#line 2346 "GoogleAuthenticator.c"
- goto __catch9_spit_publishing_publishing_error;
+ goto __catch7_spit_publishing_publishing_error;
}
#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
_publishing_rest_support_transaction_unref0 (txn);
@@ -2374,8 +2374,8 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_
#line 2357 "GoogleAuthenticator.c"
}
}
- goto __finally9;
- __catch9_spit_publishing_publishing_error:
+ goto __finally7;
+ __catch7_spit_publishing_publishing_error:
{
GError* err = NULL;
SpitPublishingPluginHost* _tmp3_;
@@ -2394,7 +2394,7 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_
_g_error_free0 (err);
#line 2378 "GoogleAuthenticator.c"
}
- __finally9:
+ __finally7:
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala"
diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.c b/plugins/authenticator/shotwell/OAuth1Authenticator.c
new file mode 100644
index 0000000..4fe57ef
--- /dev/null
+++ b/plugins/authenticator/shotwell/OAuth1Authenticator.c
@@ -0,0 +1,711 @@
+/* OAuth1Authenticator.c generated by valac 0.36.6, 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;
+#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;
+enum {
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_DUMMY_PROPERTY
+};
+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 92 "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 99 "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 106 "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 113 "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 120 "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 127 "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_;
+ SpitPublishingPluginHost* _tmp1_;
+ GHashFunc _tmp2_;
+ GEqualFunc _tmp3_;
+ GHashTable* _tmp4_;
+ GHashTable* _tmp5_;
+ gchar* _tmp6_;
+ const gchar* _tmp7_;
+ GVariant* _tmp8_;
+ GHashTable* _tmp9_;
+ gchar* _tmp10_;
+ const gchar* _tmp11_;
+ GVariant* _tmp12_;
+ PublishingRESTSupportOAuth1Session* _tmp13_;
+ PublishingRESTSupportOAuth1Session* _tmp14_;
+ const gchar* _tmp15_;
+ const gchar* _tmp16_;
+ PublishingRESTSupportOAuth1Session* _tmp17_;
+#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_ = host;
+#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#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 = _tmp1_;
+#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp2_ = g_str_hash;
+#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp3_ = g_str_equal;
+#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _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 = _tmp4_;
+#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp5_ = self->params;
+#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp6_ = g_strdup ("ConsumerKey");
+#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp7_ = api_key;
+#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp8_ = _variant_new1 (_tmp7_);
+#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ g_hash_table_insert (_tmp5_, _tmp6_, _tmp8_);
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp9_ = self->params;
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp10_ = g_strdup ("ConsumerSecret");
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp11_ = api_secret;
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp12_ = _variant_new2 (_tmp11_);
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ g_hash_table_insert (_tmp9_, _tmp10_, _tmp12_);
+#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp13_ = 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 = _tmp13_;
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp14_ = self->session;
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp15_ = api_key;
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp16_ = api_secret;
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ publishing_rest_support_oauth1_session_set_api_credentials (_tmp14_, _tmp15_, _tmp16_);
+#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp17_ = self->session;
+#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, 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 217 "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 226 "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 235 "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 245 "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 254 "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 261 "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 280 "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 289 "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 298 "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 307 "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 316 "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 329 "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 352 "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 363 "OAuth1Authenticator.c"
+ } else {
+#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp1_ = FALSE;
+#line 367 "OAuth1Authenticator.c"
+ }
+#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ if (_tmp1_) {
+#line 371 "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 382 "OAuth1Authenticator.c"
+ } else {
+#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
+ _tmp0_ = FALSE;
+#line 386 "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 392 "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 410 "OAuth1Authenticator.c"
+}
+
+
+void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* username) {
+ SpitPublishingPluginHost* _tmp0_;
+ const gchar* _tmp1_;
+#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"
+ _tmp1_ = username;
+#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", _tmp1_);
+#line 427 "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 445 "OAuth1Authenticator.c"
+}
+
+
+void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* token) {
+ SpitPublishingPluginHost* _tmp0_;
+ const gchar* _tmp1_;
+#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"
+ _tmp1_ = token;
+#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", _tmp1_);
+#line 462 "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 480 "OAuth1Authenticator.c"
+}
+
+
+void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* secret) {
+ SpitPublishingPluginHost* _tmp0_;
+ const gchar* _tmp1_;
+#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"
+ _tmp1_ = secret;
+#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", _tmp1_);
+#line 497 "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 504 "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 511 "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 518 "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 632 "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 649 "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 666 "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 694 "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/OAuth1Authenticator.vala b/plugins/authenticator/shotwell/OAuth1Authenticator.vala
new file mode 100644
index 0000000..399b66f
--- /dev/null
+++ b/plugins/authenticator/shotwell/OAuth1Authenticator.vala
@@ -0,0 +1,96 @@
+/* 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.
+ */
+
+namespace Publishing.Authenticator.Shotwell.OAuth1 {
+
+ internal abstract class Authenticator : GLib.Object, Spit.Publishing.Authenticator {
+ protected GLib.HashTable<string, Variant> params;
+ protected Publishing.RESTSupport.OAuth1.Session session;
+ protected Spit.Publishing.PluginHost host;
+
+ public Authenticator(string api_key, string api_secret, Spit.Publishing.PluginHost host) {
+ base();
+ this.host = host;
+
+ params = new GLib.HashTable<string, Variant>(str_hash, str_equal);
+ params.insert("ConsumerKey", api_key);
+ params.insert("ConsumerSecret", api_secret);
+
+ session = new Publishing.RESTSupport.OAuth1.Session();
+ session.set_api_credentials(api_key, api_secret);
+ session.authenticated.connect(on_session_authenticated);
+ }
+
+ ~Authenticator() {
+ session.authenticated.disconnect(on_session_authenticated);
+ }
+
+ // Methods from Authenticator interface
+ public abstract void authenticate();
+
+ public abstract bool can_logout();
+
+ public GLib.HashTable<string, Variant> get_authentication_parameter() {
+ return this.params;
+ }
+
+ public abstract void logout ();
+
+ public abstract void refresh();
+
+ public void invalidate_persistent_session() {
+ set_persistent_access_phase_token("");
+ set_persistent_access_phase_token_secret("");
+ set_persistent_access_phase_username("");
+ }
+ protected bool is_persistent_session_valid() {
+ return (get_persistent_access_phase_username() != null &&
+ get_persistent_access_phase_token() != null &&
+ get_persistent_access_phase_token_secret() != null);
+ }
+
+ protected string? get_persistent_access_phase_username() {
+ return host.get_config_string("access_phase_username", null);
+ }
+
+ protected void set_persistent_access_phase_username(string username) {
+ host.set_config_string("access_phase_username", username);
+ }
+
+ protected string? get_persistent_access_phase_token() {
+ return host.get_config_string("access_phase_token", null);
+ }
+
+ protected void set_persistent_access_phase_token(string token) {
+ host.set_config_string("access_phase_token", token);
+ }
+
+ protected string? get_persistent_access_phase_token_secret() {
+ return host.get_config_string("access_phase_token_secret", null);
+ }
+
+ protected void set_persistent_access_phase_token_secret(string secret) {
+ host.set_config_string("access_phase_token_secret", secret);
+ }
+
+
+ protected void on_session_authenticated() {
+ params.insert("AuthToken", session.get_access_phase_token());
+ params.insert("AuthTokenSecret", session.get_access_phase_token_secret());
+ params.insert("Username", session.get_username());
+
+ set_persistent_access_phase_token(session.get_access_phase_token());
+ set_persistent_access_phase_token_secret(session.get_access_phase_token_secret());
+ set_persistent_access_phase_username(session.get_username());
+
+
+ this.authenticated();
+ }
+
+ }
+
+}
diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c
index 2d42463..6ac8485 100644
--- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c
@@ -23,6 +23,16 @@ typedef struct _PublishingAuthenticatorFactoryClass PublishingAuthenticatorFacto
typedef struct _PublishingAuthenticatorFactoryPrivate PublishingAuthenticatorFactoryPrivate;
#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))
@@ -53,6 +63,16 @@ typedef struct _PublishingAuthenticatorShotwellFacebookFacebookClass PublishingA
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;
@@ -79,6 +99,7 @@ static GeeList* publishing_authenticator_factory_real_get_available_authenticato
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);
@@ -86,13 +107,16 @@ GType publishing_authenticator_shotwell_facebook_facebook_get_type (void) G_GNUC
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 96 "ShotwellAuthenticatorFactory.c"
+#line 120 "ShotwellAuthenticatorFactory.c"
}
@@ -105,7 +129,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v
_tmp0_ = publishing_authenticator_factory_instance;
#line 6 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
if (_tmp0_ == NULL) {
-#line 109 "ShotwellAuthenticatorFactory.c"
+#line 133 "ShotwellAuthenticatorFactory.c"
PublishingAuthenticatorFactory* _tmp1_;
#line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp1_ = publishing_authenticator_factory_new ();
@@ -113,7 +137,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v
_g_object_unref0 (publishing_authenticator_factory_instance);
#line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
publishing_authenticator_factory_instance = _tmp1_;
-#line 117 "ShotwellAuthenticatorFactory.c"
+#line 141 "ShotwellAuthenticatorFactory.c"
}
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp2_ = publishing_authenticator_factory_instance;
@@ -123,7 +147,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v
result = _tmp3_;
#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 127 "ShotwellAuthenticatorFactory.c"
+#line 151 "ShotwellAuthenticatorFactory.c"
}
@@ -146,11 +170,13 @@ static GeeList* publishing_authenticator_factory_real_get_available_authenticato
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 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#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 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 154 "ShotwellAuthenticatorFactory.c"
+#line 180 "ShotwellAuthenticatorFactory.c"
}
@@ -160,122 +186,143 @@ static SpitPublishingAuthenticator* publishing_authenticator_factory_real_create
const gchar* _tmp0_;
const gchar* _tmp1_;
GQuark _tmp3_ = 0U;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
static GQuark _tmp2_label0 = 0;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
static GQuark _tmp2_label1 = 0;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
static GQuark _tmp2_label2 = 0;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
static GQuark _tmp2_label3 = 0;
-#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ static GQuark _tmp2_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 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
g_return_val_if_fail (provider != NULL, NULL);
-#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL);
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp0_ = provider;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp1_ = _tmp0_;
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("flickr")))) {
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
switch (0) {
-#line 188 "ShotwellAuthenticatorFactory.c"
+#line 216 "ShotwellAuthenticatorFactory.c"
default:
{
SpitPublishingPluginHost* _tmp4_;
PublishingAuthenticatorShotwellFlickrFlickr* _tmp5_;
-#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp4_ = host;
-#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp5_ = publishing_authenticator_shotwell_flickr_flickr_new (_tmp4_);
-#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator);
-#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 201 "ShotwellAuthenticatorFactory.c"
+#line 229 "ShotwellAuthenticatorFactory.c"
}
}
} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("facebook")))) {
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
switch (0) {
-#line 207 "ShotwellAuthenticatorFactory.c"
+#line 235 "ShotwellAuthenticatorFactory.c"
default:
{
SpitPublishingPluginHost* _tmp6_;
PublishingAuthenticatorShotwellFacebookFacebook* _tmp7_;
-#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp6_ = host;
-#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp7_ = publishing_authenticator_shotwell_facebook_facebook_new (_tmp6_);
-#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator);
-#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 220 "ShotwellAuthenticatorFactory.c"
+#line 248 "ShotwellAuthenticatorFactory.c"
}
}
} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("picasa")))) {
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
switch (0) {
-#line 226 "ShotwellAuthenticatorFactory.c"
+#line 254 "ShotwellAuthenticatorFactory.c"
default:
{
SpitPublishingPluginHost* _tmp8_;
PublishingAuthenticatorShotwellGoogleGoogle* _tmp9_;
-#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp8_ = host;
-#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp9_ = 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."), _tmp8_);
-#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator);
-#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 239 "ShotwellAuthenticatorFactory.c"
+#line 267 "ShotwellAuthenticatorFactory.c"
}
}
} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("youtube")))) {
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
switch (0) {
-#line 245 "ShotwellAuthenticatorFactory.c"
+#line 273 "ShotwellAuthenticatorFactory.c"
default:
{
SpitPublishingPluginHost* _tmp10_;
PublishingAuthenticatorShotwellGoogleGoogle* _tmp11_;
-#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp10_ = host;
-#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
_tmp11_ = 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."), _tmp10_);
-#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator);
-#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ return result;
+#line 286 "ShotwellAuthenticatorFactory.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("tumblr")))) {
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ switch (0) {
+#line 292 "ShotwellAuthenticatorFactory.c"
+ default:
+ {
+ SpitPublishingPluginHost* _tmp12_;
+ PublishingAuthenticatorShotwellTumblrTumblr* _tmp13_;
+#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ _tmp12_ = host;
+#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ _tmp13_ = publishing_authenticator_shotwell_tumblr_tumblr_new (_tmp12_);
+#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator);
+#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 258 "ShotwellAuthenticatorFactory.c"
+#line 305 "ShotwellAuthenticatorFactory.c"
}
}
} else {
-#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
switch (0) {
-#line 264 "ShotwellAuthenticatorFactory.c"
+#line 311 "ShotwellAuthenticatorFactory.c"
default:
{
-#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
result = NULL;
-#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
+#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return result;
-#line 271 "ShotwellAuthenticatorFactory.c"
+#line 318 "ShotwellAuthenticatorFactory.c"
}
}
}
@@ -288,14 +335,14 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_construct (GTyp
self = (PublishingAuthenticatorFactory*) g_object_new (object_type, NULL);
#line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala"
return self;
-#line 284 "ShotwellAuthenticatorFactory.c"
+#line 331 "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 291 "ShotwellAuthenticatorFactory.c"
+#line 338 "ShotwellAuthenticatorFactory.c"
}
@@ -304,7 +351,7 @@ static void publishing_authenticator_factory_class_init (PublishingAuthenticator
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 300 "ShotwellAuthenticatorFactory.c"
+#line 347 "ShotwellAuthenticatorFactory.c"
}
@@ -315,7 +362,7 @@ static void publishing_authenticator_factory_spit_publishing_authenticator_facto
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 311 "ShotwellAuthenticatorFactory.c"
+#line 358 "ShotwellAuthenticatorFactory.c"
}
@@ -329,7 +376,7 @@ static void publishing_authenticator_factory_finalize (GObject * obj) {
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 325 "ShotwellAuthenticatorFactory.c"
+#line 372 "ShotwellAuthenticatorFactory.c"
}
diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
index 17980e6..0d813ac 100644
--- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
@@ -16,6 +16,7 @@ namespace Publishing.Authenticator {
list.add("facebook");
list.add("picasa");
list.add("youtube");
+ list.add("tumblr");
return list;
}
@@ -32,6 +33,8 @@ namespace Publishing.Authenticator {
case "youtube":
return new Shotwell.Google.Google("https://gdata.youtube.com/", _("You are not currently logged into YouTube.\n\nYou 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 your browser to log into the YouTube site at least once."), host);
+ case "tumblr":
+ return new Shotwell.Tumblr.Tumblr(host);
default:
return null;
}
diff --git a/plugins/authenticator/shotwell/TumblrAuthenticator.c b/plugins/authenticator/shotwell/TumblrAuthenticator.c
new file mode 100644
index 0000000..1ebc0f4
--- /dev/null
+++ b/plugins/authenticator/shotwell/TumblrAuthenticator.c
@@ -0,0 +1,1393 @@
+/* TumblrAuthenticator.c generated by valac 0.36.6, 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;
+
+#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_LAST_SIGNAL
+};
+static guint publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LAST_SIGNAL] = {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;
+#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))
+enum {
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_DUMMY_PROPERTY
+};
+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;
+enum {
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY
+};
+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;
+enum {
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_DUMMY_PROPERTY
+};
+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 221 "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 228 "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 235 "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 242 "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 260 "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_;
+ PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp10_;
+ GtkBuilder* _tmp17_;
+ GObject* _tmp18_;
+ GtkEntry* _tmp19_;
+ GtkBuilder* _tmp20_;
+ GObject* _tmp21_;
+ GtkEntry* _tmp22_;
+ GtkBuilder* _tmp23_;
+ GObject* _tmp24_;
+ GtkButton* _tmp25_;
+ GtkEntry* _tmp26_;
+ GtkEntry* _tmp27_;
+ GtkButton* _tmp28_;
+ GtkWidget* _tmp29_;
+ GtkContainer* _tmp30_;
+ GtkContainer* _tmp31_;
+ GtkWidget* _tmp32_;
+ GtkBox* _tmp33_;
+ GtkWidget* _tmp34_;
+#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 304 "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"
+ _tmp10_ = mode;
+#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ switch (_tmp10_) {
+#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO:
+#line 333 "TumblrAuthenticator.c"
+ {
+ GtkLabel* _tmp11_;
+ const gchar* _tmp12_;
+#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp11_ = message_label;
+#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp12_ = publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE;
+#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ gtk_label_set_text (_tmp11_, _tmp12_);
+#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ break;
+#line 345 "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 349 "TumblrAuthenticator.c"
+ {
+ GtkLabel* _tmp13_;
+ const gchar* _tmp14_;
+ gchar* _tmp15_;
+ gchar* _tmp16_;
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp13_ = message_label;
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp14_ = publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE;
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp15_ = g_strdup_printf ("<b>%s</b>\n\n%s", _ ("Invalid User Name or Password"), _tmp14_);
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp16_ = _tmp15_;
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ gtk_label_set_markup (_tmp13_, _tmp16_);
+#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp16_);
+#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ break;
+#line 369 "TumblrAuthenticator.c"
+ }
+ default:
+#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ break;
+#line 374 "TumblrAuthenticator.c"
+ }
+#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp17_ = self->priv->builder;
+#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp18_ = gtk_builder_get_object (_tmp17_, "username_entry");
+#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp18_) : 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 = _tmp19_;
+#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp20_ = self->priv->builder;
+#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp21_ = gtk_builder_get_object (_tmp20_, "password_entry");
+#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp21_) : 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 = _tmp22_;
+#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp23_ = self->priv->builder;
+#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp24_ = gtk_builder_get_object (_tmp23_, "login_button");
+#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_button_get_type ()) ? ((GtkButton*) _tmp24_) : 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 = _tmp25_;
+#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp26_ = self->priv->username_entry;
+#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GTK_TYPE_EDITABLE, 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"
+ _tmp27_ = self->priv->password_entry;
+#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GTK_TYPE_EDITABLE, 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"
+ _tmp28_ = self->priv->login_button;
+#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_connect_object (_tmp28_, "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"
+ _tmp29_ = content;
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp30_ = gtk_widget_get_parent (_tmp29_);
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp31_ = _tmp30_;
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp32_ = content;
+#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ gtk_container_remove (_tmp31_, _tmp32_);
+#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp33_ = self->priv->pane_widget;
+#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp34_ = content;
+#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_container_get_type (), GtkContainer), _tmp34_);
+#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 438 "TumblrAuthenticator.c"
+ }
+ goto __finally8;
+ __catch8_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp35_;
+ const gchar* _tmp36_;
+#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"
+ _tmp35_ = e;
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp36_ = _tmp35_->message;
+#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_warning (_ ("Could not load UI: %s"), _tmp36_);
+#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_error_free0 (e);
+#line 458 "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 469 "TumblrAuthenticator.c"
+ }
+#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ return self;
+#line 473 "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 480 "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 498 "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 519 "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 528 "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 537 "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 557 "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 569 "TumblrAuthenticator.c"
+ } else {
+#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp0_ = FALSE;
+#line 573 "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 579 "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 598 "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 611 "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 636 "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 644 "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 663 "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 669 "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 675 "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 698 "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 713 "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 722 "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 742 "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;
+ PublishingRESTSupportOAuth1Session* _tmp0_;
+ const gchar* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ const gchar* _tmp4_;
+#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"
+ _tmp0_ = session;
+#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ self = (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://www.tumblr.com/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST);
+#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp1_ = username;
+#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp2_ = soup_uri_encode (_tmp1_, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA);
+#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp3_ = _tmp2_;
+#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", _tmp3_);
+#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp3_);
+#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp4_ = password;
+#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", _tmp4_);
+#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 799 "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 806 "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 813 "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;
+ SpitPublishingPluginHost* _tmp0_;
+#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"
+ _tmp0_ = host;
+#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, _tmp0_);
+#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ return self;
+#line 844 "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 851 "TumblrAuthenticator.c"
+}
+
+
+static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) {
+ PublishingAuthenticatorShotwellTumblrTumblr * self;
+ gboolean _tmp0_;
+#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"
+ _tmp0_ = publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator));
+#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ if (_tmp0_) {
+#line 864 "TumblrAuthenticator.c"
+ PublishingRESTSupportOAuth1Session* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
+#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"
+ _tmp1_ = 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"
+ _tmp2_ = 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"
+ _tmp3_ = _tmp2_;
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp4_ = 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"
+ _tmp5_ = _tmp4_;
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, "");
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp5_);
+#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp3_);
+#line 888 "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 894 "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 908 "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 923 "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 931 "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 949 "TumblrAuthenticator.c"
+}
+
+
+static void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) {
+ SpitPublishingPluginHost* _tmp0_;
+ PublishingAuthenticatorShotwellTumblrAuthenticationPane* authentication_pane = NULL;
+ PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp1_;
+ PublishingAuthenticatorShotwellTumblrAuthenticationPane* _tmp2_;
+ SpitPublishingPluginHost* _tmp3_;
+ SpitPublishingPluginHost* _tmp4_;
+ GtkWidget* _tmp5_;
+ GtkWidget* _tmp6_;
+#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_ = mode;
+#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp2_ = publishing_authenticator_shotwell_tumblr_authentication_pane_new (_tmp1_);
+#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ authentication_pane = _tmp2_;
+#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"
+ _tmp3_ = 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 (_tmp3_, 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"
+ _tmp4_ = 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"
+ _tmp5_ = publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (authentication_pane);
+#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp6_ = _tmp5_;
+#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ spit_publishing_plugin_host_set_dialog_default_widget (_tmp4_, _tmp6_);
+#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_object_unref0 (_tmp6_);
+#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_object_unref0 (authentication_pane);
+#line 994 "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) {
+ const gchar* _tmp0_;
+ const gchar* _tmp1_;
+#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"
+ _tmp0_ = username;
+#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp1_ = password;
+#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (self, _tmp0_, _tmp1_);
+#line 1025 "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 1040 "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 1047 "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_;
+ const gchar* _tmp3_;
+ const gchar* _tmp4_;
+ PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* _tmp5_;
+ 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_ = username;
+#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp4_ = password;
+#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp5_ = publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (_tmp2_, _tmp3_, _tmp4_);
+#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ txn = _tmp5_;
+#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 1090 "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 1098 "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 1109 "TumblrAuthenticator.c"
+ }
+ }
+ goto __finally9;
+ __catch9_spit_publishing_publishing_error:
+ {
+ GError* err = NULL;
+ SpitPublishingPluginHost* _tmp6_;
+ GError* _tmp7_;
+#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"
+ _tmp6_ = 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"
+ _tmp7_ = err;
+#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_);
+#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_error_free0 (err);
+#line 1130 "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 1143 "TumblrAuthenticator.c"
+ }
+#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _publishing_rest_support_transaction_unref0 (txn);
+#line 1147 "TumblrAuthenticator.c"
+}
+
+
+static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn) {
+ PublishingRESTSupportTransaction* _tmp0_;
+ guint _tmp1_;
+ PublishingRESTSupportTransaction* _tmp2_;
+ guint _tmp3_;
+ PublishingRESTSupportTransaction* _tmp4_;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ PublishingRESTSupportTransaction* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+#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"
+ _tmp0_ = txn;
+#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
+#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
+#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp2_ = txn;
+#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
+#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_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"
+ _tmp4_ = txn;
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_);
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp6_ = _tmp5_;
+#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'", _tmp6_);
+#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp6_);
+#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp7_ = txn;
+#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_);
+#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp9_ = _tmp8_;
+#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (self, _tmp9_);
+#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_free0 (_tmp9_);
+#line 1198 "TumblrAuthenticator.c"
+}
+
+
+static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn, GError* err) {
+ PublishingRESTSupportTransaction* _tmp0_;
+ guint _tmp1_;
+ PublishingRESTSupportTransaction* _tmp2_;
+ guint _tmp3_;
+ SpitPublishingPluginHost* _tmp4_;
+ GError* _tmp5_;
+#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"
+ _tmp0_ = txn;
+#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE);
+#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.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_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self);
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp2_ = txn;
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE);
+#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_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"
+ _tmp4_ = 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"
+ _tmp5_ = err;
+#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_);
+#line 1233 "TumblrAuthenticator.c"
+}
+
+
+static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* response) {
+ const gchar* _tmp0_;
+ gchar* token = NULL;
+ gchar* token_secret = NULL;
+ GHashTable* data = NULL;
+ const gchar* _tmp1_;
+ GHashTable* _tmp2_;
+ GHashTable* _tmp3_;
+ gconstpointer _tmp4_ = NULL;
+ gchar* _tmp5_;
+ GHashTable* _tmp6_;
+ gconstpointer _tmp7_ = NULL;
+ gchar* _tmp8_;
+ const gchar* _tmp9_;
+ const gchar* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ const gchar* _tmp12_;
+#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"
+ _tmp0_ = response;
+#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_debug ("TumblrAuthenticator.vala:240: ACTION: extracting access phase credenti" \
+"als from '%s'", _tmp0_);
+#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"
+ _tmp1_ = response;
+#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp2_ = soup_form_decode (_tmp1_);
+#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ data = _tmp2_;
+#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp3_ = data;
+#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_);
+#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"
+ _tmp5_ = g_strdup (_tmp4_);
+#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ token = _tmp5_;
+#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp6_ = data;
+#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_);
+#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"
+ _tmp8_ = g_strdup (_tmp7_);
+#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ token_secret = _tmp8_;
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp9_ = token;
+#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp10_ = 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' }", _tmp9_, _tmp10_);
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp12_ = token;
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ if (_tmp12_ == NULL) {
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp11_ = TRUE;
+#line 1304 "TumblrAuthenticator.c"
+ } else {
+ const gchar* _tmp13_;
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp13_ = token_secret;
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp11_ = _tmp13_ == NULL;
+#line 1311 "TumblrAuthenticator.c"
+ }
+#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ if (_tmp11_) {
+#line 1315 "TumblrAuthenticator.c"
+ SpitPublishingPluginHost* _tmp14_;
+ GError* _tmp15_;
+ GError* _tmp16_;
+#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp14_ = 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"
+ _tmp15_ = 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"
+ _tmp16_ = _tmp15_;
+#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ spit_publishing_plugin_host_post_error (_tmp14_, _tmp16_);
+#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _g_error_free0 (_tmp16_);
+#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 1331 "TumblrAuthenticator.c"
+ } else {
+ PublishingRESTSupportOAuth1Session* _tmp17_;
+ const gchar* _tmp18_;
+ const gchar* _tmp19_;
+#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp17_ = 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"
+ _tmp18_ = token;
+#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ _tmp19_ = token_secret;
+#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala"
+ publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp17_, _tmp18_, _tmp19_, "");
+#line 1344 "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 1352 "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 1367 "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;
+}
+
+
+
diff --git a/plugins/authenticator/shotwell/TumblrAuthenticator.vala b/plugins/authenticator/shotwell/TumblrAuthenticator.vala
new file mode 100644
index 0000000..35fdce9
--- /dev/null
+++ b/plugins/authenticator/shotwell/TumblrAuthenticator.vala
@@ -0,0 +1,262 @@
+/* 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.
+ */
+
+namespace Publishing.Authenticator.Shotwell.Tumblr {
+ internal const string ENDPOINT_URL = "https://www.tumblr.com/";
+ internal const string API_KEY = "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k";
+ internal const string API_SECRET = "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi";
+ internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\";
+
+ /**
+ * The authentication pane used when asking service URL, user name and password
+ * from the user.
+ */
+ internal class AuthenticationPane : Spit.Publishing.DialogPane, Object {
+ public enum Mode {
+ INTRO,
+ FAILED_RETRY_USER
+ }
+ private static string INTRO_MESSAGE = _("Enter the username and password associated with your Tumblr account.");
+ private static string FAILED_RETRY_USER_MESSAGE = _("Username and/or password invalid. Please try again");
+
+ private Gtk.Box pane_widget = null;
+ private Gtk.Builder builder;
+ private Gtk.Entry username_entry;
+ private Gtk.Entry password_entry;
+ private Gtk.Button login_button;
+
+ public signal void login(string user, string password);
+
+ public AuthenticationPane(Mode mode = Mode.INTRO) {
+ this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
+
+ try {
+ builder = new Gtk.Builder();
+ builder.add_from_resource (Resources.RESOURCE_PATH + "/tumblr_authentication_pane.ui");
+ builder.connect_signals(null);
+ var content = builder.get_object ("content") as Gtk.Widget;
+
+ Gtk.Label message_label = builder.get_object("message_label") as Gtk.Label;
+ switch (mode) {
+ case Mode.INTRO:
+ message_label.set_text(INTRO_MESSAGE);
+ break;
+
+ case Mode.FAILED_RETRY_USER:
+ message_label.set_markup("<b>%s</b>\n\n%s".printf(_(
+ "Invalid User Name or Password"), FAILED_RETRY_USER_MESSAGE));
+ break;
+ }
+
+ username_entry = builder.get_object ("username_entry") as Gtk.Entry;
+
+ password_entry = builder.get_object ("password_entry") as Gtk.Entry;
+
+
+
+ login_button = builder.get_object("login_button") as Gtk.Button;
+
+ username_entry.changed.connect(on_user_changed);
+ password_entry.changed.connect(on_password_changed);
+ login_button.clicked.connect(on_login_button_clicked);
+
+ content.parent.remove (content);
+ pane_widget.add (content);
+ } catch (Error e) {
+ warning(_("Could not load UI: %s"), e.message);
+ }
+ }
+
+ public Gtk.Widget get_default_widget() {
+ return login_button;
+ }
+
+ private void on_login_button_clicked() {
+ login(username_entry.get_text(),
+ password_entry.get_text());
+ }
+
+
+ private void on_user_changed() {
+ update_login_button_sensitivity();
+ }
+
+ private void on_password_changed() {
+ update_login_button_sensitivity();
+ }
+
+ private void update_login_button_sensitivity() {
+ login_button.set_sensitive(username_entry.text_length > 0 &&
+ password_entry.text_length > 0);
+ }
+
+ public Gtk.Widget get_widget() {
+ return pane_widget;
+ }
+
+ public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() {
+ return Spit.Publishing.DialogPane.GeometryOptions.NONE;
+ }
+
+ public void on_pane_installed() {
+ username_entry.grab_focus();
+ password_entry.set_activates_default(true);
+ login_button.can_default = true;
+ update_login_button_sensitivity();
+ }
+
+ public void on_pane_uninstalled() {
+ }
+ }
+
+ internal class AccessTokenFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction {
+ public AccessTokenFetchTransaction(Publishing.RESTSupport.OAuth1.Session session, string username, string password) {
+ base.with_uri(session, "https://www.tumblr.com/oauth/access_token",
+ Publishing.RESTSupport.HttpMethod.POST);
+ add_argument("x_auth_username", Soup.URI.encode(username, ENCODE_RFC_3986_EXTRA));
+ add_argument("x_auth_password", password);
+ add_argument("x_auth_mode", "client_auth");
+ }
+ }
+
+ internal class Tumblr : Publishing.Authenticator.Shotwell.OAuth1.Authenticator {
+ public Tumblr(Spit.Publishing.PluginHost host) {
+ base(API_KEY, API_SECRET, host);
+ }
+
+ public override void authenticate() {
+ if (is_persistent_session_valid()) {
+ debug("attempt start: a persistent session is available; using it");
+
+ session.authenticate_from_persistent_credentials(get_persistent_access_phase_token(),
+ get_persistent_access_phase_token_secret(), "");
+ } else {
+ debug("attempt start: no persistent session available; showing login welcome pane");
+
+ do_show_authentication_pane();
+ }
+ }
+
+ public override bool can_logout() {
+ return true;
+ }
+
+ public override void logout() {
+ this.session.deauthenticate();
+ invalidate_persistent_session();
+ }
+
+ public override void refresh() {
+ // No-op with Tumblr
+ }
+
+ /**
+ * 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
+ */
+ private void do_show_authentication_pane(AuthenticationPane.Mode mode = AuthenticationPane.Mode.INTRO) {
+ debug("ACTION: installing authentication pane");
+
+ host.set_service_locked(false);
+ AuthenticationPane authentication_pane = new AuthenticationPane(mode);
+ authentication_pane.login.connect(on_authentication_pane_login_clicked);
+ host.install_dialog_pane(authentication_pane, Spit.Publishing.PluginHost.ButtonMode.CLOSE);
+ host.set_dialog_default_widget(authentication_pane.get_default_widget());
+ }
+
+ /**
+ * 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
+ */
+ private void on_authentication_pane_login_clicked( string username, string password ) {
+ debug("EVENT: on_authentication_pane_login_clicked");
+
+ do_network_login(username, password);
+ }
+
+ /**
+ * 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
+ */
+ private void do_network_login(string username, string password) {
+ debug("ACTION: logging in");
+ host.set_service_locked(true);
+ host.install_login_wait_pane();
+
+ AccessTokenFetchTransaction txn = new AccessTokenFetchTransaction(session,username,password);
+ txn.completed.connect(on_auth_request_txn_completed);
+ txn.network_error.connect(on_auth_request_txn_error);
+
+ try {
+ txn.execute();
+ } catch (Spit.Publishing.PublishingError err) {
+ host.post_error(err);
+ }
+ }
+
+ private void on_auth_request_txn_completed(Publishing.RESTSupport.Transaction txn) {
+ txn.completed.disconnect(on_auth_request_txn_completed);
+ txn.network_error.disconnect(on_auth_request_txn_error);
+
+ debug("EVENT: OAuth authentication request transaction completed; response = '%s'",
+ txn.get_response());
+
+ do_parse_token_info_from_auth_request(txn.get_response());
+ }
+
+ private void on_auth_request_txn_error(Publishing.RESTSupport.Transaction txn,
+ Spit.Publishing.PublishingError err) {
+ txn.completed.disconnect(on_auth_request_txn_completed);
+ txn.network_error.disconnect(on_auth_request_txn_error);
+
+ debug("EVENT: OAuth authentication request transaction caused a network error");
+ host.post_error(err);
+ }
+
+ private void do_parse_token_info_from_auth_request(string response) {
+ debug("ACTION: extracting access phase credentials from '%s'", response);
+
+ string? token = null;
+ string? token_secret = null;
+
+ var data = Soup.Form.decode(response);
+ data.lookup_extended("oauth_token", null, out token);
+ data.lookup_extended("oauth_token_secret", null, out token_secret);
+
+ debug("access phase credentials: { token = '%s'; token_secret = '%s' }",
+ token, token_secret);
+
+ if (token == null || token_secret == null) {
+ host.post_error(new Spit.Publishing.PublishingError.MALFORMED_RESPONSE("Expected " +
+ "access phase credentials to contain token and token secret but at " +
+ "least one of these is absent"));
+ this.authentication_failed();
+ } else {
+ session.set_access_phase_credentials(token, token_secret, "");
+ }
+ }
+ }
+}
diff --git a/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui b/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui
deleted file mode 100644
index dd4c35c..0000000
--- a/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
-<interface domain="shotwell">
- <requires lib="gtk+" version="3.14"/>
- <object class="GtkBox" id="pane_widget">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="explanatory_text">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">16</property>
- <property name="margin_right">16</property>
- <property name="margin_top">48</property>
- <property name="margin_bottom">16</property>
- <property name="label" translatable="yes">Enter the confirmation number which appears after you log into Flickr in your Web browser.</property>
- <property name="angle">0.0099999997764825821</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="margin_bottom">80</property>
- <child>
- <object class="GtkLabel" id="pin_entry_caption">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Authorization _Number:</property>
- <property name="use_underline">True</property>
- <property name="justify">right</property>
- <property name="mnemonic_widget">pin_entry</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="pin_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_left">8</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="continue_button">
- <property name="label" translatable="yes">Con_tinue</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="margin_left">240</property>
- <property name="margin_right">240</property>
- <property name="margin_bottom">160</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
-</interface>
diff --git a/plugins/authenticator/shotwell/meson.build b/plugins/authenticator/shotwell/meson.build
new file mode 100644
index 0000000..4404242
--- /dev/null
+++ b/plugins/authenticator/shotwell/meson.build
@@ -0,0 +1,28 @@
+authenticator_shotwell_sources = [
+ 'ShotwellAuthenticatorFactory.vala',
+ 'FacebookPublishingAuthenticator.vala',
+ 'FlickrPublishingAuthenticator.vala',
+ 'GoogleAuthenticator.vala',
+ 'OAuth1Authenticator.vala',
+ 'TumblrAuthenticator.vala'
+ ]
+
+authenticator_shotwell_resources = gnome.compile_resources('authenticator-resource',
+ 'org.gnome.Shotwell.Authenticator.gresource.xml',
+ source_dir : meson.source_root())
+
+authenticator_shotwell_deps = [gee, gtk, gio, soup, json_glib, sw_plugin,
+ sw_plugin_common_dep, json_glib, xml, webkit]
+
+authenticator = library('shotwell-authenticator',
+ authenticator_shotwell_sources + authenticator_shotwell_resources,
+ dependencies : authenticator_shotwell_deps,
+ include_directories : config_incdir,
+ version: meson.project_version(),
+ vala_args : ['--gresources',
+ 'org.gnome.Shotwell.Authenticator.gresource.xml'],
+ c_args :
+ '-DPLUGIN_RESOURCE_PATH="/org/gnome/Shotwell/Authenticator"',
+ install: true)
+authenticator_dep = declare_dependency(include_directories : include_directories('.'),
+ link_with : authenticator)
diff --git a/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml b/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml
index c40e700..5f25aab 100644
--- a/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml
+++ b/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Shotwell/Authenticator">
- <file>flickr_pin_entry_pane.ui</file>
+ <file>tumblr_authentication_pane.ui</file>
</gresource>
</gresources>
diff --git a/plugins/authenticator/shotwell/tumblr_authentication_pane.ui b/plugins/authenticator/shotwell/tumblr_authentication_pane.ui
new file mode 100644
index 0000000..24a647f
--- /dev/null
+++ b/plugins/authenticator/shotwell/tumblr_authentication_pane.ui
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
+<interface domain="shotwell">
+ <requires lib="gtk+" version="3.14"/>
+ <object class="GtkWindow" id="authentication_pane">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="content">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">30</property>
+ <property name="margin_right">30</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">8</property>
+ <child>
+ <object class="GtkLabel" id="message_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label">label</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="field_table">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">8</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Email address</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">username_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">False</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Password</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">password_entry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="login_button">
+ <property name="label" translatable="yes">Log in</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>