summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell/OAuth1Authenticator.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/authenticator/shotwell/OAuth1Authenticator.c')
-rw-r--r--plugins/authenticator/shotwell/OAuth1Authenticator.c339
1 files changed, 200 insertions, 139 deletions
diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.c b/plugins/authenticator/shotwell/OAuth1Authenticator.c
index 4fe57ef..7cf5780 100644
--- a/plugins/authenticator/shotwell/OAuth1Authenticator.c
+++ b/plugins/authenticator/shotwell/OAuth1Authenticator.c
@@ -1,4 +1,4 @@
-/* OAuth1Authenticator.c generated by valac 0.36.6, the Vala compiler
+/* OAuth1Authenticator.c generated by valac 0.40.4, the Vala compiler
* generated from OAuth1Authenticator.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -8,6 +8,7 @@
* (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"
@@ -26,6 +27,11 @@
typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator;
typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass;
typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate;
+enum {
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_0_PROPERTY,
+ PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_NUM_PROPERTIES
+};
+static GParamSpec* publishing_authenticator_shotwell_oauth1_authenticator_properties[PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
@@ -52,12 +58,13 @@ static gpointer publishing_authenticator_shotwell_oauth1_authenticator_parent_cl
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 _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);
@@ -72,9 +79,12 @@ static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (
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);
+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);
@@ -85,68 +95,81 @@ 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) {
+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"
+#line 105 "OAuth1Authenticator.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
+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"
+#line 114 "OAuth1Authenticator.c"
}
-static void _g_free0_ (gpointer var) {
+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"
+#line 123 "OAuth1Authenticator.c"
}
-static void _g_variant_unref0_ (gpointer var) {
+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"
+#line 132 "OAuth1Authenticator.c"
}
-static GVariant* _variant_new1 (const gchar* value) {
+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"
+#line 141 "OAuth1Authenticator.c"
}
-static GVariant* _variant_new2 (const gchar* value) {
+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"
+#line 150 "OAuth1Authenticator.c"
}
-PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host) {
+PublishingAuthenticatorShotwellOAuth1Authenticator*
+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_;
+ GHashFunc _tmp1_;
+ GEqualFunc _tmp2_;
+ GHashTable* _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_;
+ gchar* _tmp5_;
+ GVariant* _tmp6_;
+ GHashTable* _tmp7_;
+ gchar* _tmp8_;
+ GVariant* _tmp9_;
+ PublishingRESTSupportOAuth1Session* _tmp10_;
+ PublishingRESTSupportOAuth1Session* _tmp11_;
+ PublishingRESTSupportOAuth1Session* _tmp12_;
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
g_return_val_if_fail (api_key != NULL, NULL);
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
@@ -156,112 +179,114 @@ PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_sho
#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_);
+ _tmp0_ = _g_object_ref0 (host);
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_object_unref0 (self->host);
#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- self->host = _tmp1_;
+ self->host = _tmp0_;
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp2_ = g_str_hash;
+ _tmp1_ = g_str_hash;
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp3_ = g_str_equal;
+ _tmp2_ = 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_);
+ _tmp3_ = g_hash_table_new_full (_tmp1_, _tmp2_, _g_free0_, _g_variant_unref0_);
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_hash_table_unref0 (self->params);
#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- self->params = _tmp4_;
-#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp5_ = self->params;
+ self->params = _tmp3_;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp6_ = g_strdup ("ConsumerKey");
+ _tmp4_ = self->params;
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp7_ = api_key;
+ _tmp5_ = g_strdup ("ConsumerKey");
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp8_ = _variant_new1 (_tmp7_);
+ _tmp6_ = _variant_new1 (api_key);
#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- g_hash_table_insert (_tmp5_, _tmp6_, _tmp8_);
+ g_hash_table_insert (_tmp4_, _tmp5_, _tmp6_);
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp9_ = self->params;
+ _tmp7_ = self->params;
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp10_ = g_strdup ("ConsumerSecret");
+ _tmp8_ = g_strdup ("ConsumerSecret");
#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp11_ = api_secret;
+ _tmp9_ = _variant_new2 (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_);
+ g_hash_table_insert (_tmp7_, _tmp8_, _tmp9_);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp13_ = publishing_rest_support_oauth1_session_new (NULL);
+ _tmp10_ = publishing_rest_support_oauth1_session_new (NULL);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_publishing_rest_support_session_unref0 (self->session);
#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- self->session = _tmp13_;
-#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp14_ = self->session;
+ self->session = _tmp10_;
#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp15_ = api_key;
+ _tmp11_ = self->session;
#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_);
+ publishing_rest_support_oauth1_session_set_api_credentials (_tmp11_, api_key, api_secret);
#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
- _tmp17_ = self->session;
+ _tmp12_ = 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);
+ g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0);
#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return self;
-#line 217 "OAuth1Authenticator.c"
+#line 230 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 241 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 252 "OAuth1Authenticator.c"
}
-static gboolean publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 264 "OAuth1Authenticator.c"
}
-gboolean publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 275 "OAuth1Authenticator.c"
}
-static gpointer _g_hash_table_ref0 (gpointer self) {
+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"
+#line 284 "OAuth1Authenticator.c"
}
-static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base) {
+static GHashTable*
+publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base)
+{
PublishingAuthenticatorShotwellOAuth1Authenticator * self;
GHashTable* result = NULL;
GHashTable* _tmp0_;
@@ -276,47 +301,57 @@ static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_g
result = _tmp1_;
#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
-#line 280 "OAuth1Authenticator.c"
+#line 305 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 316 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 327 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 338 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
+#line 349 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+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"
@@ -325,11 +360,13 @@ void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persisten
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"
+#line 364 "OAuth1Authenticator.c"
}
-gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+gboolean
+publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
@@ -348,7 +385,7 @@ gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_se
_g_free0 (_tmp3_);
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
if (_tmp4_) {
-#line 352 "OAuth1Authenticator.c"
+#line 389 "OAuth1Authenticator.c"
gchar* _tmp5_;
gchar* _tmp6_;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
@@ -359,15 +396,15 @@ gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_se
_tmp1_ = _tmp6_ != NULL;
#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp6_);
-#line 363 "OAuth1Authenticator.c"
+#line 400 "OAuth1Authenticator.c"
} else {
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp1_ = FALSE;
-#line 367 "OAuth1Authenticator.c"
+#line 404 "OAuth1Authenticator.c"
}
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
if (_tmp1_) {
-#line 371 "OAuth1Authenticator.c"
+#line 408 "OAuth1Authenticator.c"
gchar* _tmp7_;
gchar* _tmp8_;
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
@@ -378,21 +415,23 @@ gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_se
_tmp0_ = _tmp8_ != NULL;
#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_g_free0 (_tmp8_);
-#line 382 "OAuth1Authenticator.c"
+#line 419 "OAuth1Authenticator.c"
} else {
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
_tmp0_ = FALSE;
-#line 386 "OAuth1Authenticator.c"
+#line 423 "OAuth1Authenticator.c"
}
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
result = _tmp0_;
#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
-#line 392 "OAuth1Authenticator.c"
+#line 429 "OAuth1Authenticator.c"
}
-gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+gchar*
+publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
+{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
@@ -406,13 +445,15 @@ gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_acc
result = _tmp1_;
#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
-#line 410 "OAuth1Authenticator.c"
+#line 449 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* username) {
+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"
@@ -420,14 +461,14 @@ void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_acces
#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"
+ spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", username);
+#line 466 "OAuth1Authenticator.c"
}
-gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+gchar*
+publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
+{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
@@ -441,13 +482,15 @@ gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_acc
result = _tmp1_;
#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
-#line 445 "OAuth1Authenticator.c"
+#line 486 "OAuth1Authenticator.c"
}
-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 (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"
@@ -455,14 +498,14 @@ void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_acces
#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"
+ spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", token);
+#line 503 "OAuth1Authenticator.c"
}
-gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+gchar*
+publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
+{
gchar* result = NULL;
SpitPublishingPluginHost* _tmp0_;
gchar* _tmp1_;
@@ -476,13 +519,15 @@ gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_acc
result = _tmp1_;
#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala"
return result;
-#line 480 "OAuth1Authenticator.c"
+#line 523 "OAuth1Authenticator.c"
}
-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_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"
@@ -490,35 +535,41 @@ void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_acces
#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"
+ spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", secret);
+#line 540 "OAuth1Authenticator.c"
}
-static GVariant* _variant_new3 (gchar* value) {
+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"
+#line 549 "OAuth1Authenticator.c"
}
-static GVariant* _variant_new4 (gchar* value) {
+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"
+#line 558 "OAuth1Authenticator.c"
}
-static GVariant* _variant_new5 (gchar* value) {
+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"
+#line 567 "OAuth1Authenticator.c"
}
-void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self) {
+void
+publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self)
+{
GHashTable* _tmp0_;
gchar* _tmp1_;
PublishingRESTSupportOAuth1Session* _tmp2_;
@@ -628,11 +679,13 @@ void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authentic
_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"
+#line 683 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_class_init (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass * klass) {
+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"
@@ -645,11 +698,13 @@ static void publishing_authenticator_shotwell_oauth1_authenticator_class_init (P
((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"
+#line 702 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) {
+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"
@@ -662,15 +717,19 @@ static void publishing_authenticator_shotwell_oauth1_authenticator_spit_publishi
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"
+#line 721 "OAuth1Authenticator.c"
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_instance_init (PublishingAuthenticatorShotwellOAuth1Authenticator * self) {
+static void
+publishing_authenticator_shotwell_oauth1_authenticator_instance_init (PublishingAuthenticatorShotwellOAuth1Authenticator * self)
+{
}
-static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj) {
+static void
+publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj)
+{
PublishingAuthenticatorShotwellOAuth1Authenticator * self;
PublishingRESTSupportOAuth1Session* _tmp0_;
guint _tmp1_;
@@ -690,11 +749,13 @@ static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GOb
_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"
+#line 753 "OAuth1Authenticator.c"
}
-GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) {
+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 };