From ab841afa5cb39058d9ab2cebb67cfe6369443f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 25 Jun 2018 20:55:59 +0200 Subject: New upstream version 0.28.3 --- plugins/common/OAuth1Support.c | 1265 +++++++++++++++++++++------------------- 1 file changed, 657 insertions(+), 608 deletions(-) (limited to 'plugins/common/OAuth1Support.c') diff --git a/plugins/common/OAuth1Support.c b/plugins/common/OAuth1Support.c index afa6905..70e0dc1 100644 --- a/plugins/common/OAuth1Support.c +++ b/plugins/common/OAuth1Support.c @@ -1,4 +1,4 @@ -/* OAuth1Support.c generated by valac 0.36.6, the Vala compiler +/* OAuth1Support.c generated by valac 0.40.4, the Vala compiler * generated from OAuth1Support.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 #include #include @@ -198,49 +199,89 @@ static gpointer publishing_rest_support_oauth1_upload_transaction_parent_class = #define PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" gpointer publishing_rest_support_session_ref (gpointer instance); void publishing_rest_support_session_unref (gpointer instance); -GParamSpec* publishing_rest_support_param_spec_session (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void publishing_rest_support_value_set_session (GValue* value, gpointer v_object); -void publishing_rest_support_value_take_session (GValue* value, gpointer v_object); +GParamSpec* publishing_rest_support_param_spec_session (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void publishing_rest_support_value_set_session (GValue* value, + gpointer v_object); +void publishing_rest_support_value_take_session (GValue* value, + gpointer v_object); gpointer publishing_rest_support_value_get_session (const GValue* value); GType publishing_rest_support_session_get_type (void) G_GNUC_CONST; GType publishing_rest_support_oauth1_session_get_type (void) G_GNUC_CONST; #define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1SessionPrivate)) -enum { - PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_DUMMY_PROPERTY -}; PublishingRESTSupportOAuth1Session* publishing_rest_support_oauth1_session_new (const gchar* endpoint_uri); -PublishingRESTSupportOAuth1Session* publishing_rest_support_oauth1_session_construct (GType object_type, const gchar* endpoint_uri); -PublishingRESTSupportSession* publishing_rest_support_session_construct (GType object_type, const gchar* endpoint_url); +PublishingRESTSupportOAuth1Session* publishing_rest_support_oauth1_session_construct (GType object_type, + const gchar* endpoint_uri); +PublishingRESTSupportSession* publishing_rest_support_session_construct (GType object_type, + const gchar* endpoint_url); static gboolean publishing_rest_support_oauth1_session_real_is_authenticated (PublishingRESTSupportSession* base); -void publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username); +void publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret, + const gchar* username); void publishing_rest_support_oauth1_session_deauthenticate (PublishingRESTSupportOAuth1Session* self); -void publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* consumer_key, const gchar* consumer_secret); +void publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* consumer_key, + const gchar* consumer_secret); gpointer publishing_rest_support_transaction_ref (gpointer instance); void publishing_rest_support_transaction_unref (gpointer instance); -GParamSpec* publishing_rest_support_param_spec_transaction (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void publishing_rest_support_value_set_transaction (GValue* value, gpointer v_object); -void publishing_rest_support_value_take_transaction (GValue* value, gpointer v_object); +GParamSpec* publishing_rest_support_param_spec_transaction (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void publishing_rest_support_value_set_transaction (GValue* value, + gpointer v_object); +void publishing_rest_support_value_take_transaction (GValue* value, + gpointer v_object); gpointer publishing_rest_support_value_get_transaction (const GValue* value); GType publishing_rest_support_transaction_get_type (void) G_GNUC_CONST; gpointer publishing_rest_support_argument_ref (gpointer instance); void publishing_rest_support_argument_unref (gpointer instance); -GParamSpec* publishing_rest_support_param_spec_argument (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void publishing_rest_support_value_set_argument (GValue* value, gpointer v_object); -void publishing_rest_support_value_take_argument (GValue* value, gpointer v_object); +GParamSpec* publishing_rest_support_param_spec_argument (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void publishing_rest_support_value_set_argument (GValue* value, + gpointer v_object); +void publishing_rest_support_value_take_argument (GValue* value, + gpointer v_object); gpointer publishing_rest_support_value_get_argument (const GValue* value); GType publishing_rest_support_argument_get_type (void) G_GNUC_CONST; -gchar* publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSupportOAuth1Session* self, PublishingRESTSupportTransaction* txn, PublishingRESTSupportArgument** extra_arguments, int extra_arguments_length1); +gchar* publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSupportOAuth1Session* self, + PublishingRESTSupportTransaction* txn, + PublishingRESTSupportArgument** extra_arguments, + int extra_arguments_length1); GType publishing_rest_support_http_method_get_type (void) G_GNUC_CONST; PublishingRESTSupportHttpMethod publishing_rest_support_transaction_get_method (PublishingRESTSupportTransaction* self); gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpMethod self); -PublishingRESTSupportArgument** publishing_rest_support_transaction_get_arguments (PublishingRESTSupportTransaction* self, int* result_length1); -static void _vala_array_add2 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); -PublishingRESTSupportArgument** publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray, int inputArray_length1, int* result_length1); -gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args, int args_length1, gboolean escape, const gchar* separator); +PublishingRESTSupportArgument** publishing_rest_support_transaction_get_arguments (PublishingRESTSupportTransaction* self, + int* result_length1); +static void _vala_array_add2 (PublishingRESTSupportArgument** * array, + int* length, + int* size, + PublishingRESTSupportArgument* value); +PublishingRESTSupportArgument** publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray, + int inputArray_length1, + int* result_length1); +gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args, + int args_length1, + gboolean escape, + const gchar* separator); gchar* publishing_rest_support_transaction_get_endpoint_url (PublishingRESTSupportTransaction* self); -gchar* publishing_rest_support_hmac_sha1 (const gchar* key, const gchar* message); -void publishing_rest_support_oauth1_session_set_request_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret); -void publishing_rest_support_oauth1_session_set_access_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username); +gchar* publishing_rest_support_hmac_sha1 (const gchar* key, + const gchar* message); +void publishing_rest_support_oauth1_session_set_request_phase_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret); +void publishing_rest_support_oauth1_session_set_access_phase_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret, + const gchar* username); gchar* publishing_rest_support_oauth1_session_get_oauth_nonce (PublishingRESTSupportOAuth1Session* self); gchar* publishing_rest_support_oauth1_session_get_oauth_timestamp (PublishingRESTSupportOAuth1Session* self); gchar* publishing_rest_support_oauth1_session_get_consumer_key (PublishingRESTSupportOAuth1Session* self); @@ -252,65 +293,107 @@ gchar* publishing_rest_support_oauth1_session_get_username (PublishingRESTSuppor gboolean publishing_rest_support_session_is_authenticated (PublishingRESTSupportSession* self); static void publishing_rest_support_oauth1_session_finalize (PublishingRESTSupportSession * obj); GType publishing_rest_support_oauth1_transaction_get_type (void) G_GNUC_CONST; -enum { - PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION_DUMMY_PROPERTY -}; -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new (PublishingRESTSupportOAuth1Session* session, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportTransaction* publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct (GType object_type, PublishingRESTSupportSession* parent_session, PublishingRESTSupportHttpMethod method); +PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new (PublishingRESTSupportOAuth1Session* session, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct (GType object_type, + PublishingRESTSupportOAuth1Session* session, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportTransaction* publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct (GType object_type, + PublishingRESTSupportSession* parent_session, + PublishingRESTSupportHttpMethod method); static void publishing_rest_support_oauth1_transaction_setup_arguments (PublishingRESTSupportOAuth1Transaction* self); -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new_with_uri (PublishingRESTSupportOAuth1Session* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct_with_uri (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportTransaction* publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method); -PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct_with_endpoint_url (GType object_type, PublishingRESTSupportSession* parent_session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method); +PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new_with_uri (PublishingRESTSupportOAuth1Session* session, + const gchar* uri, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct_with_uri (GType object_type, + PublishingRESTSupportOAuth1Session* session, + const gchar* uri, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportTransaction* publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session, + const gchar* endpoint_url, + PublishingRESTSupportHttpMethod method); +PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct_with_endpoint_url (GType object_type, + PublishingRESTSupportSession* parent_session, + const gchar* endpoint_url, + PublishingRESTSupportHttpMethod method); PublishingRESTSupportSession* publishing_rest_support_transaction_get_parent_session (PublishingRESTSupportTransaction* self); -void publishing_rest_support_transaction_add_argument (PublishingRESTSupportTransaction* self, const gchar* name, const gchar* value); -static void publishing_rest_support_oauth1_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); -void publishing_rest_support_transaction_execute (PublishingRESTSupportTransaction* self, GError** error); +void publishing_rest_support_transaction_add_argument (PublishingRESTSupportTransaction* self, + const gchar* name, + const gchar* value); +static void publishing_rest_support_oauth1_transaction_real_execute (PublishingRESTSupportTransaction* base, + GError** error); +void publishing_rest_support_transaction_execute (PublishingRESTSupportTransaction* self, + GError** error); GType publishing_rest_support_upload_transaction_get_type (void) G_GNUC_CONST; GType publishing_rest_support_oauth1_upload_transaction_get_type (void) G_GNUC_CONST; #define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransactionPrivate)) -enum { - PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_DUMMY_PROPERTY -}; -PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* endpoint_uri); -PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* endpoint_uri); -PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable, const gchar* endpoint_url); -PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_construct_with_endpoint_url (GType object_type, PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable, const gchar* endpoint_url); -void publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (PublishingRESTSupportOAuth1UploadTransaction* self, const gchar* key, const gchar* value); -PublishingRESTSupportArgument* publishing_rest_support_argument_new (const gchar* key, const gchar* value); -PublishingRESTSupportArgument* publishing_rest_support_argument_construct (GType object_type, const gchar* key, const gchar* value); -static void _vala_array_add3 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); +PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_uri); +PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_construct (GType object_type, + PublishingRESTSupportOAuth1Session* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_uri); +PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_url); +PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_construct_with_endpoint_url (GType object_type, + PublishingRESTSupportSession* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_url); +void publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (PublishingRESTSupportOAuth1UploadTransaction* self, + const gchar* key, + const gchar* value); +PublishingRESTSupportArgument* publishing_rest_support_argument_new (const gchar* key, + const gchar* value); +PublishingRESTSupportArgument* publishing_rest_support_argument_construct (GType object_type, + const gchar* key, + const gchar* value); +static void _vala_array_add3 (PublishingRESTSupportArgument** * array, + int* length, + int* size, + PublishingRESTSupportArgument* value); gchar* publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (PublishingRESTSupportOAuth1UploadTransaction* self); void publishing_rest_support_oauth1_upload_transaction_authorize (PublishingRESTSupportOAuth1UploadTransaction* self); -void publishing_rest_support_transaction_add_header (PublishingRESTSupportTransaction* self, const gchar* key, const gchar* value); +void publishing_rest_support_transaction_add_header (PublishingRESTSupportTransaction* self, + const gchar* key, + const gchar* value); static void publishing_rest_support_oauth1_upload_transaction_finalize (PublishingRESTSupportTransaction * 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); - - -PublishingRESTSupportOAuth1Session* publishing_rest_support_oauth1_session_construct (GType object_type, const gchar* endpoint_uri) { +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); + + +PublishingRESTSupportOAuth1Session* +publishing_rest_support_oauth1_session_construct (GType object_type, + const gchar* endpoint_uri) +{ PublishingRESTSupportOAuth1Session* self = NULL; - const gchar* _tmp0_; -#line 21 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = endpoint_uri; #line 21 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self = (PublishingRESTSupportOAuth1Session*) publishing_rest_support_session_construct (object_type, _tmp0_); + self = (PublishingRESTSupportOAuth1Session*) publishing_rest_support_session_construct (object_type, endpoint_uri); #line 20 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return self; -#line 303 "OAuth1Support.c" +#line 382 "OAuth1Support.c" } -PublishingRESTSupportOAuth1Session* publishing_rest_support_oauth1_session_new (const gchar* endpoint_uri) { +PublishingRESTSupportOAuth1Session* +publishing_rest_support_oauth1_session_new (const gchar* endpoint_uri) +{ #line 20 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return publishing_rest_support_oauth1_session_construct (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, endpoint_uri); -#line 310 "OAuth1Support.c" +#line 391 "OAuth1Support.c" } -static gboolean publishing_rest_support_oauth1_session_real_is_authenticated (PublishingRESTSupportSession* base) { +static gboolean +publishing_rest_support_oauth1_session_real_is_authenticated (PublishingRESTSupportSession* base) +{ PublishingRESTSupportOAuth1Session * self; gboolean result = FALSE; gboolean _tmp0_ = FALSE; @@ -322,47 +405,49 @@ static gboolean publishing_rest_support_oauth1_session_real_is_authenticated (Pu _tmp2_ = self->priv->access_phase_token; #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" if (_tmp2_ != NULL) { -#line 326 "OAuth1Support.c" +#line 409 "OAuth1Support.c" const gchar* _tmp3_; #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp3_ = self->priv->access_phase_token_secret; #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp1_ = _tmp3_ != NULL; -#line 332 "OAuth1Support.c" +#line 415 "OAuth1Support.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp1_ = FALSE; -#line 336 "OAuth1Support.c" +#line 419 "OAuth1Support.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" if (_tmp1_) { -#line 340 "OAuth1Support.c" +#line 423 "OAuth1Support.c" const gchar* _tmp4_; #line 26 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp4_ = self->priv->username; #line 26 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp0_ = _tmp4_ != NULL; -#line 346 "OAuth1Support.c" +#line 429 "OAuth1Support.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp0_ = FALSE; -#line 350 "OAuth1Support.c" +#line 433 "OAuth1Support.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" result = _tmp0_; #line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 356 "OAuth1Support.c" +#line 439 "OAuth1Support.c" } -void publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username) { - const gchar* _tmp0_; +void +publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret, + const gchar* username) +{ + gchar* _tmp0_; gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; + gchar* _tmp2_; #line 29 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self)); #line 29 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -372,36 +457,32 @@ void publishing_rest_support_oauth1_session_authenticate_from_persistent_credent #line 29 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (username != NULL); #line 31 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = token; -#line 31 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = g_strdup (_tmp0_); + _tmp0_ = g_strdup (token); #line 31 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->access_phase_token); #line 31 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->access_phase_token = _tmp1_; -#line 32 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = secret; + self->priv->access_phase_token = _tmp0_; #line 32 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = g_strdup (_tmp2_); + _tmp1_ = g_strdup (secret); #line 32 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->access_phase_token_secret); #line 32 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->access_phase_token_secret = _tmp3_; + self->priv->access_phase_token_secret = _tmp1_; #line 33 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp4_ = username; -#line 33 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp5_ = g_strdup (_tmp4_); + _tmp2_ = g_strdup (username); #line 33 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->username); #line 33 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->username = _tmp5_; + self->priv->username = _tmp2_; #line 35 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 401 "OAuth1Support.c" +#line 480 "OAuth1Support.c" } -void publishing_rest_support_oauth1_session_deauthenticate (PublishingRESTSupportOAuth1Session* self) { +void +publishing_rest_support_oauth1_session_deauthenticate (PublishingRESTSupportOAuth1Session* self) +{ #line 38 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self)); #line 39 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -416,15 +497,17 @@ void publishing_rest_support_oauth1_session_deauthenticate (PublishingRESTSuppor _g_free0 (self->priv->username); #line 41 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv->username = NULL; -#line 420 "OAuth1Support.c" +#line 501 "OAuth1Support.c" } -void publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* consumer_key, const gchar* consumer_secret) { - const gchar* _tmp0_; +void +publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* consumer_key, + const gchar* consumer_secret) +{ + gchar* _tmp0_; gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; #line 44 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self)); #line 44 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -432,356 +515,346 @@ void publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTS #line 44 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (consumer_secret != NULL); #line 45 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = consumer_key; -#line 45 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = g_strdup (_tmp0_); + _tmp0_ = g_strdup (consumer_key); #line 45 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->consumer_key); #line 45 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->consumer_key = _tmp1_; + self->priv->consumer_key = _tmp0_; #line 46 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = consumer_secret; -#line 46 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = g_strdup (_tmp2_); + _tmp1_ = g_strdup (consumer_secret); #line 46 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->consumer_secret); #line 46 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->consumer_secret = _tmp3_; -#line 451 "OAuth1Support.c" + self->priv->consumer_secret = _tmp1_; +#line 530 "OAuth1Support.c" } -static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { +static gpointer +_publishing_rest_support_argument_ref0 (gpointer self) +{ #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return self ? publishing_rest_support_argument_ref (self) : NULL; -#line 458 "OAuth1Support.c" +#line 539 "OAuth1Support.c" } -static void _vala_array_add2 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { +static void +_vala_array_add2 (PublishingRESTSupportArgument** * array, + int* length, + int* size, + PublishingRESTSupportArgument* value) +{ #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" if ((*length) == (*size)) { #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" *size = (*size) ? (2 * (*size)) : 4; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 469 "OAuth1Support.c" +#line 555 "OAuth1Support.c" } #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" (*array)[(*length)++] = value; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" (*array)[*length] = NULL; -#line 475 "OAuth1Support.c" +#line 561 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSupportOAuth1Session* self, PublishingRESTSupportTransaction* txn, PublishingRESTSupportArgument** extra_arguments, int extra_arguments_length1) { +gchar* +publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSupportOAuth1Session* self, + PublishingRESTSupportTransaction* txn, + PublishingRESTSupportArgument** extra_arguments, + int extra_arguments_length1) +{ gchar* result = NULL; gchar* http_method = NULL; - PublishingRESTSupportTransaction* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; + gchar* _tmp0_; + const gchar* _tmp1_; gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; + gchar* _tmp3_; PublishingRESTSupportArgument** base_string_arguments = NULL; - PublishingRESTSupportTransaction* _tmp6_; - gint _tmp7_; - PublishingRESTSupportArgument** _tmp8_; + gint _tmp4_; + PublishingRESTSupportArgument** _tmp5_; gint base_string_arguments_length1; gint _base_string_arguments_size_; - PublishingRESTSupportArgument** _tmp9_; - gint _tmp9__length1; PublishingRESTSupportArgument** sorted_args = NULL; - PublishingRESTSupportArgument** _tmp14_; - gint _tmp14__length1; - gint _tmp15_; - PublishingRESTSupportArgument** _tmp16_; + PublishingRESTSupportArgument** _tmp10_; + gint _tmp10__length1; + gint _tmp11_; + PublishingRESTSupportArgument** _tmp12_; gint sorted_args_length1; gint _sorted_args_size_; gchar* arguments_string = NULL; - PublishingRESTSupportArgument** _tmp17_; - gint _tmp17__length1; - gchar* _tmp18_; + PublishingRESTSupportArgument** _tmp13_; + gint _tmp13__length1; + gchar* _tmp14_; gchar* signing_key = NULL; - const gchar* _tmp19_; + const gchar* _tmp15_; gchar* signature_base_string = NULL; - const gchar* _tmp33_; + const gchar* _tmp29_; + gchar* _tmp30_; + gchar* _tmp31_; + gchar* _tmp32_; + gchar* _tmp33_; gchar* _tmp34_; gchar* _tmp35_; - PublishingRESTSupportTransaction* _tmp36_; + gchar* _tmp36_; gchar* _tmp37_; gchar* _tmp38_; gchar* _tmp39_; - gchar* _tmp40_; + const gchar* _tmp40_; gchar* _tmp41_; gchar* _tmp42_; gchar* _tmp43_; gchar* _tmp44_; const gchar* _tmp45_; - gchar* _tmp46_; + gchar* signature = NULL; + const gchar* _tmp46_; gchar* _tmp47_; - gchar* _tmp48_; + const gchar* _tmp48_; gchar* _tmp49_; const gchar* _tmp50_; - gchar* signature = NULL; - const gchar* _tmp51_; - gchar* _tmp52_; - const gchar* _tmp53_; - gchar* _tmp54_; - const gchar* _tmp55_; #line 49 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); #line 49 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn), NULL); #line 51 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = txn; -#line 51 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_); + _tmp0_ = publishing_rest_support_http_method_to_string (publishing_rest_support_transaction_get_method (txn)); #line 51 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); -#line 51 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - http_method = _tmp2_; + http_method = _tmp0_; #line 53 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_debug ("OAuth1Support.vala:53: signing transaction with parameters:"); #line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = http_method; + _tmp1_ = http_method; #line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); + _tmp2_ = g_strconcat ("HTTP method = ", _tmp1_, NULL); #line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp5_ = _tmp4_; + _tmp3_ = _tmp2_; #line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - g_debug ("OAuth1Support.vala:54: %s", _tmp5_); + g_debug ("OAuth1Support.vala:54: %s", _tmp3_); #line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp5_); -#line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp6_ = txn; + _g_free0 (_tmp3_); #line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_); + _tmp5_ = publishing_rest_support_transaction_get_arguments (txn, &_tmp4_); #line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - base_string_arguments = _tmp8_; + base_string_arguments = _tmp5_; #line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - base_string_arguments_length1 = _tmp7_; + base_string_arguments_length1 = _tmp4_; #line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _base_string_arguments_size_ = base_string_arguments_length1; -#line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp9_ = extra_arguments; -#line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp9__length1 = extra_arguments_length1; -#line 572 "OAuth1Support.c" +#line 647 "OAuth1Support.c" { PublishingRESTSupportArgument** arg_collection = NULL; gint arg_collection_length1 = 0; gint _arg_collection_size_ = 0; gint arg_it = 0; #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - arg_collection = _tmp9_; + arg_collection = extra_arguments; #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - arg_collection_length1 = _tmp9__length1; + arg_collection_length1 = extra_arguments_length1; #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - for (arg_it = 0; arg_it < _tmp9__length1; arg_it = arg_it + 1) { -#line 584 "OAuth1Support.c" - PublishingRESTSupportArgument* _tmp10_; + for (arg_it = 0; arg_it < extra_arguments_length1; arg_it = arg_it + 1) { +#line 659 "OAuth1Support.c" + PublishingRESTSupportArgument* _tmp6_; PublishingRESTSupportArgument* arg = NULL; #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp10_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); + _tmp6_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - arg = _tmp10_; -#line 591 "OAuth1Support.c" + arg = _tmp6_; +#line 666 "OAuth1Support.c" { - PublishingRESTSupportArgument** _tmp11_; - gint _tmp11__length1; - PublishingRESTSupportArgument* _tmp12_; - PublishingRESTSupportArgument* _tmp13_; + PublishingRESTSupportArgument** _tmp7_; + gint _tmp7__length1; + PublishingRESTSupportArgument* _tmp8_; + PublishingRESTSupportArgument* _tmp9_; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp11_ = base_string_arguments; + _tmp7_ = base_string_arguments; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp11__length1 = base_string_arguments_length1; + _tmp7__length1 = base_string_arguments_length1; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp12_ = arg; + _tmp8_ = arg; #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp13_ = _publishing_rest_support_argument_ref0 (_tmp12_); + _tmp9_ = _publishing_rest_support_argument_ref0 (_tmp8_); #line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _vala_array_add2 (&base_string_arguments, &base_string_arguments_length1, &_base_string_arguments_size_, _tmp13_); + _vala_array_add2 (&base_string_arguments, &base_string_arguments_length1, &_base_string_arguments_size_, _tmp9_); #line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _publishing_rest_support_argument_unref0 (arg); -#line 609 "OAuth1Support.c" +#line 684 "OAuth1Support.c" } } } #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp14_ = base_string_arguments; + _tmp10_ = base_string_arguments; #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp14__length1 = base_string_arguments_length1; + _tmp10__length1 = base_string_arguments_length1; #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp16_ = publishing_rest_support_argument_sort (_tmp14_, _tmp14__length1, &_tmp15_); + _tmp12_ = publishing_rest_support_argument_sort (_tmp10_, _tmp10__length1, &_tmp11_); #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - sorted_args = _tmp16_; + sorted_args = _tmp12_; #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - sorted_args_length1 = _tmp15_; + sorted_args_length1 = _tmp11_; #line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _sorted_args_size_ = sorted_args_length1; #line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp17_ = sorted_args; + _tmp13_ = sorted_args; #line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp17__length1 = sorted_args_length1; + _tmp13__length1 = sorted_args_length1; #line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp18_ = publishing_rest_support_argument_serialize_list (_tmp17_, _tmp17__length1, FALSE, "&"); + _tmp14_ = publishing_rest_support_argument_serialize_list (_tmp13_, _tmp13__length1, FALSE, "&"); #line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - arguments_string = _tmp18_; + arguments_string = _tmp14_; #line 67 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" signing_key = NULL; #line 68 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp19_ = self->priv->access_phase_token_secret; + _tmp15_ = self->priv->access_phase_token_secret; #line 68 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - if (_tmp19_ != NULL) { -#line 639 "OAuth1Support.c" - const gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - const gchar* _tmp23_; - gchar* _tmp24_; + if (_tmp15_ != NULL) { +#line 714 "OAuth1Support.c" + const gchar* _tmp16_; + gchar* _tmp17_; + gchar* _tmp18_; + const gchar* _tmp19_; + gchar* _tmp20_; #line 69 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_debug ("OAuth1Support.vala:69: access phase token secret available; using it a" \ "s signing key"); #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp20_ = self->priv->consumer_secret; + _tmp16_ = self->priv->consumer_secret; #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp21_ = g_strconcat (_tmp20_, "&", NULL); + _tmp17_ = g_strconcat (_tmp16_, "&", NULL); #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp22_ = _tmp21_; + _tmp18_ = _tmp17_; #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp23_ = self->priv->access_phase_token_secret; + _tmp19_ = self->priv->access_phase_token_secret; #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp24_ = g_strconcat (_tmp22_, _tmp23_, NULL); + _tmp20_ = g_strconcat (_tmp18_, _tmp19_, NULL); #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signing_key); #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signing_key = _tmp24_; + signing_key = _tmp20_; #line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp22_); -#line 663 "OAuth1Support.c" + _g_free0 (_tmp18_); +#line 738 "OAuth1Support.c" } else { - const gchar* _tmp25_; + const gchar* _tmp21_; #line 72 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp25_ = self->priv->request_phase_token_secret; + _tmp21_ = self->priv->request_phase_token_secret; #line 72 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - if (_tmp25_ != NULL) { -#line 670 "OAuth1Support.c" - const gchar* _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; + if (_tmp21_ != NULL) { +#line 745 "OAuth1Support.c" + const gchar* _tmp22_; + gchar* _tmp23_; + gchar* _tmp24_; + const gchar* _tmp25_; + gchar* _tmp26_; #line 73 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_debug ("OAuth1Support.vala:73: request phase token secret available; using it " \ "as signing key"); #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp26_ = self->priv->consumer_secret; + _tmp22_ = self->priv->consumer_secret; #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp27_ = g_strconcat (_tmp26_, "&", NULL); + _tmp23_ = g_strconcat (_tmp22_, "&", NULL); #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp28_ = _tmp27_; + _tmp24_ = _tmp23_; #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp29_ = self->priv->request_phase_token_secret; + _tmp25_ = self->priv->request_phase_token_secret; #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp30_ = g_strconcat (_tmp28_, _tmp29_, NULL); + _tmp26_ = g_strconcat (_tmp24_, _tmp25_, NULL); #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signing_key); #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signing_key = _tmp30_; + signing_key = _tmp26_; #line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp28_); -#line 694 "OAuth1Support.c" + _g_free0 (_tmp24_); +#line 769 "OAuth1Support.c" } else { - const gchar* _tmp31_; - gchar* _tmp32_; + const gchar* _tmp27_; + gchar* _tmp28_; #line 77 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_debug ("OAuth1Support.vala:77: %s", "neither access phase nor request phase token secrets available; using " \ "API " "key as signing key"); #line 80 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp31_ = self->priv->consumer_secret; + _tmp27_ = self->priv->consumer_secret; #line 80 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp32_ = g_strconcat (_tmp31_, "&", NULL); + _tmp28_ = g_strconcat (_tmp27_, "&", NULL); #line 80 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signing_key); #line 80 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signing_key = _tmp32_; -#line 708 "OAuth1Support.c" + signing_key = _tmp28_; +#line 783 "OAuth1Support.c" } } #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp33_ = http_method; -#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp34_ = g_strconcat (_tmp33_, "&", NULL); + _tmp29_ = http_method; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp35_ = _tmp34_; + _tmp30_ = g_strconcat (_tmp29_, "&", NULL); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp36_ = txn; + _tmp31_ = _tmp30_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp37_ = publishing_rest_support_transaction_get_endpoint_url (_tmp36_); + _tmp32_ = publishing_rest_support_transaction_get_endpoint_url (txn); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp38_ = _tmp37_; + _tmp33_ = _tmp32_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp39_ = soup_uri_encode (_tmp38_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); + _tmp34_ = soup_uri_encode (_tmp33_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp40_ = _tmp39_; + _tmp35_ = _tmp34_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp41_ = g_strconcat (_tmp35_, _tmp40_, NULL); + _tmp36_ = g_strconcat (_tmp31_, _tmp35_, NULL); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp42_ = _tmp41_; + _tmp37_ = _tmp36_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp43_ = g_strconcat (_tmp42_, "&", NULL); -#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp44_ = _tmp43_; + _tmp38_ = g_strconcat (_tmp37_, "&", NULL); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp45_ = arguments_string; + _tmp39_ = _tmp38_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp46_ = soup_uri_encode (_tmp45_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); + _tmp40_ = arguments_string; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp47_ = _tmp46_; + _tmp41_ = soup_uri_encode (_tmp40_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp48_ = g_strconcat (_tmp44_, _tmp47_, NULL); -#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp49_ = _tmp48_; + _tmp42_ = _tmp41_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp47_); + _tmp43_ = g_strconcat (_tmp39_, _tmp42_, NULL); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp44_); + _tmp44_ = _tmp43_; #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (_tmp42_); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp40_); + _g_free0 (_tmp39_); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp38_); + _g_free0 (_tmp37_); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (_tmp35_); #line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signature_base_string = _tmp49_; + _g_free0 (_tmp33_); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp31_); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + signature_base_string = _tmp44_; #line 87 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_debug ("OAuth1Support.vala:87: signature base string = '%s'", signature_base_string); #line 89 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp50_ = signing_key; + _tmp45_ = signing_key; #line 89 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - g_debug ("OAuth1Support.vala:89: signing key = '%s'", _tmp50_); + g_debug ("OAuth1Support.vala:89: signing key = '%s'", _tmp45_); #line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp51_ = signing_key; + _tmp46_ = signing_key; #line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp52_ = publishing_rest_support_hmac_sha1 (_tmp51_, signature_base_string); + _tmp47_ = publishing_rest_support_hmac_sha1 (_tmp46_, signature_base_string); #line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signature = _tmp52_; + signature = _tmp47_; #line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp53_ = signature; + _tmp48_ = signature; #line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp54_ = soup_uri_encode (_tmp53_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); + _tmp49_ = soup_uri_encode (_tmp48_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); #line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signature); #line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - signature = _tmp54_; + signature = _tmp49_; #line 95 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp55_ = signature; + _tmp50_ = signature; #line 95 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - g_debug ("OAuth1Support.vala:95: signature = '%s'", _tmp55_); + g_debug ("OAuth1Support.vala:95: signature = '%s'", _tmp50_); #line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" result = signature; #line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -798,15 +871,17 @@ gchar* publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSu _g_free0 (http_method); #line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 799 "OAuth1Support.c" +#line 872 "OAuth1Support.c" } -void publishing_rest_support_oauth1_session_set_request_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret) { - const gchar* _tmp0_; +void +publishing_rest_support_oauth1_session_set_request_phase_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret) +{ + gchar* _tmp0_; gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; #line 100 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self)); #line 100 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -814,32 +889,30 @@ void publishing_rest_support_oauth1_session_set_request_phase_credentials (Publi #line 100 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (secret != NULL); #line 101 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = token; -#line 101 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = g_strdup (_tmp0_); + _tmp0_ = g_strdup (token); #line 101 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->request_phase_token); #line 101 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->request_phase_token = _tmp1_; -#line 102 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = secret; + self->priv->request_phase_token = _tmp0_; #line 102 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = g_strdup (_tmp2_); + _tmp1_ = g_strdup (secret); #line 102 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->request_phase_token_secret); #line 102 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->request_phase_token_secret = _tmp3_; -#line 830 "OAuth1Support.c" + self->priv->request_phase_token_secret = _tmp1_; +#line 901 "OAuth1Support.c" } -void publishing_rest_support_oauth1_session_set_access_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username) { - const gchar* _tmp0_; +void +publishing_rest_support_oauth1_session_set_access_phase_credentials (PublishingRESTSupportOAuth1Session* self, + const gchar* token, + const gchar* secret, + const gchar* username) +{ + gchar* _tmp0_; gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; + gchar* _tmp2_; #line 105 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self)); #line 105 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -849,36 +922,32 @@ void publishing_rest_support_oauth1_session_set_access_phase_credentials (Publis #line 105 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (username != NULL); #line 106 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = token; -#line 106 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = g_strdup (_tmp0_); + _tmp0_ = g_strdup (token); #line 106 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->access_phase_token); #line 106 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->access_phase_token = _tmp1_; -#line 107 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = secret; + self->priv->access_phase_token = _tmp0_; #line 107 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = g_strdup (_tmp2_); + _tmp1_ = g_strdup (secret); #line 107 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->access_phase_token_secret); #line 107 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->access_phase_token_secret = _tmp3_; + self->priv->access_phase_token_secret = _tmp1_; #line 108 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp4_ = username; -#line 108 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp5_ = g_strdup (_tmp4_); + _tmp2_ = g_strdup (username); #line 108 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (self->priv->username); #line 108 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->username = _tmp5_; + self->priv->username = _tmp2_; #line 110 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 875 "OAuth1Support.c" +#line 942 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_oauth_nonce (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_oauth_nonce (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; GTimeVal currtime = {0}; GTimeVal _tmp0_; @@ -933,208 +1002,156 @@ gchar* publishing_rest_support_oauth1_session_get_oauth_nonce (PublishingRESTSup result = _tmp11_; #line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 934 "OAuth1Support.c" +#line 1003 "OAuth1Support.c" } -static glong string_strnlen (gchar* str, glong maxlen) { +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 957 "OAuth1Support.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" + gchar* _tmp1_; +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = memchr (str, 0, (gsize) maxlen); +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + end = _tmp0_; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = end; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ == NULL) { +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = maxlen; +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 965 "OAuth1Support.c" +#line 1027 "OAuth1Support.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" + gchar* _tmp2_; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = end; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (glong) (_tmp2_ - str); +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 977 "OAuth1Support.c" +#line 1036 "OAuth1Support.c" } } -static gchar* string_substring (const gchar* self, glong offset, glong len) { +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" + glong _tmp6_; + gchar* _tmp7_; +#line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 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 1001 "OAuth1Support.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 1007 "OAuth1Support.c" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset >= ((glong) 0)) { +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = len >= ((glong) 0); +#line 1057 "OAuth1Support.c" } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = FALSE; -#line 1011 "OAuth1Support.c" +#line 1061 "OAuth1Support.c" } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp0_) { -#line 1015 "OAuth1Support.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 1027 "OAuth1Support.c" +#line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = string_strnlen ((gchar*) self, offset + len); +#line 1067 "OAuth1Support.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 1037 "OAuth1Support.c" + gint _tmp1_; + gint _tmp2_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = strlen (self); +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = (glong) _tmp2_; +#line 1077 "OAuth1Support.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 1043 "OAuth1Support.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 1057 "OAuth1Support.c" +#line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset < ((glong) 0)) { +#line 1081 "OAuth1Support.c" + glong _tmp3_; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + offset = _tmp3_ + offset; +#line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset >= ((glong) 0), NULL); +#line 1089 "OAuth1Support.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 1067 "OAuth1Support.c" + glong _tmp4_; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = string_length; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset <= _tmp4_, NULL); +#line 1096 "OAuth1Support.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 1073 "OAuth1Support.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 1082 "OAuth1Support.c" +#line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (len < ((glong) 0)) { +#line 1100 "OAuth1Support.c" + glong _tmp5_; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp5_ = string_length; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + len = _tmp5_ - offset; +#line 1106 "OAuth1Support.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" +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail ((offset + len) <= _tmp6_, NULL); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp7_; +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 1102 "OAuth1Support.c" +#line 1118 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_oauth_timestamp (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_oauth_timestamp (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; - gint64 _tmp0_; + gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; - gchar* _tmp4_; #line 121 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = g_get_real_time (); -#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_); + _tmp0_ = g_strdup_printf ("%" G_GINT64_FORMAT, g_get_real_time ()); #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); + _tmp2_ = string_substring (_tmp1_, (glong) 0, (glong) 10); #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp4_ = _tmp3_; + _tmp3_ = _tmp2_; #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp2_); + _g_free0 (_tmp1_); #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - result = _tmp4_; + result = _tmp3_; #line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1131 "OAuth1Support.c" +#line 1146 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_consumer_key (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_consumer_key (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; const gchar* _tmp0_; const gchar* _tmp1_; @@ -1153,11 +1170,13 @@ gchar* publishing_rest_support_oauth1_session_get_consumer_key (PublishingRESTSu result = _tmp2_; #line 127 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1154 "OAuth1Support.c" +#line 1171 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_request_phase_token (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_request_phase_token (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; const gchar* _tmp0_; const gchar* _tmp1_; @@ -1176,11 +1195,13 @@ gchar* publishing_rest_support_oauth1_session_get_request_phase_token (Publishin result = _tmp2_; #line 132 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1177 "OAuth1Support.c" +#line 1196 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_access_phase_token (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_access_phase_token (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; const gchar* _tmp0_; const gchar* _tmp1_; @@ -1199,11 +1220,13 @@ gchar* publishing_rest_support_oauth1_session_get_access_phase_token (Publishing result = _tmp2_; #line 137 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1200 "OAuth1Support.c" +#line 1221 "OAuth1Support.c" } -gboolean publishing_rest_support_oauth1_session_has_access_phase_token (PublishingRESTSupportOAuth1Session* self) { +gboolean +publishing_rest_support_oauth1_session_has_access_phase_token (PublishingRESTSupportOAuth1Session* self) +{ gboolean result = FALSE; const gchar* _tmp0_; #line 140 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1214,11 +1237,13 @@ gboolean publishing_rest_support_oauth1_session_has_access_phase_token (Publishi result = _tmp0_ != NULL; #line 141 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1215 "OAuth1Support.c" +#line 1238 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_access_phase_token_secret (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_access_phase_token_secret (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; const gchar* _tmp0_; const gchar* _tmp1_; @@ -1237,34 +1262,35 @@ gchar* publishing_rest_support_oauth1_session_get_access_phase_token_secret (Pub result = _tmp2_; #line 146 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1238 "OAuth1Support.c" +#line 1263 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_session_get_username (PublishingRESTSupportOAuth1Session* self) { +gchar* +publishing_rest_support_oauth1_session_get_username (PublishingRESTSupportOAuth1Session* self) +{ gchar* result = NULL; - gboolean _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; + const gchar* _tmp0_; + gchar* _tmp1_; #line 149 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); #line 150 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 150 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _vala_assert (_tmp0_, "is_authenticated()"); + _vala_assert (publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)), "is_authenticated()"); #line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = self->priv->username; + _tmp0_ = self->priv->username; #line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = g_strdup (_tmp1_); + _tmp1_ = g_strdup (_tmp0_); #line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - result = _tmp2_; + result = _tmp1_; #line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1261 "OAuth1Support.c" +#line 1285 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_session_class_init (PublishingRESTSupportOAuth1SessionClass * klass) { +static void +publishing_rest_support_oauth1_session_class_init (PublishingRESTSupportOAuth1SessionClass * klass) +{ #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_session_parent_class = g_type_class_peek_parent (klass); #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1273,11 +1299,13 @@ static void publishing_rest_support_oauth1_session_class_init (PublishingRESTSup g_type_class_add_private (klass, sizeof (PublishingRESTSupportOAuth1SessionPrivate)); #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_rest_support_oauth1_session_real_is_authenticated; -#line 1274 "OAuth1Support.c" +#line 1300 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_session_instance_init (PublishingRESTSupportOAuth1Session * self) { +static void +publishing_rest_support_oauth1_session_instance_init (PublishingRESTSupportOAuth1Session * self) +{ #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv = PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_GET_PRIVATE (self); #line 12 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1294,11 +1322,13 @@ static void publishing_rest_support_oauth1_session_instance_init (PublishingREST self->priv->consumer_key = NULL; #line 18 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv->consumer_secret = NULL; -#line 1295 "OAuth1Support.c" +#line 1323 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_session_finalize (PublishingRESTSupportSession * obj) { +static void +publishing_rest_support_oauth1_session_finalize (PublishingRESTSupportSession * obj) +{ PublishingRESTSupportOAuth1Session * self; #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); @@ -1318,11 +1348,13 @@ static void publishing_rest_support_oauth1_session_finalize (PublishingRESTSuppo _g_free0 (self->priv->consumer_secret); #line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_rest_support_oauth1_session_parent_class)->finalize (obj); -#line 1319 "OAuth1Support.c" +#line 1349 "OAuth1Support.c" } -GType publishing_rest_support_oauth1_session_get_type (void) { +GType +publishing_rest_support_oauth1_session_get_type (void) +{ static volatile gsize publishing_rest_support_oauth1_session_type_id__volatile = 0; if (g_once_init_enter (&publishing_rest_support_oauth1_session_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportOAuth1SessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_oauth1_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportOAuth1Session), 0, (GInstanceInitFunc) publishing_rest_support_oauth1_session_instance_init, NULL }; @@ -1334,66 +1366,69 @@ GType publishing_rest_support_oauth1_session_get_type (void) { } -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, PublishingRESTSupportHttpMethod method) { +PublishingRESTSupportOAuth1Transaction* +publishing_rest_support_oauth1_transaction_construct (GType object_type, + PublishingRESTSupportOAuth1Session* session, + PublishingRESTSupportHttpMethod method) +{ PublishingRESTSupportOAuth1Transaction* self = NULL; - PublishingRESTSupportOAuth1Session* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; #line 156 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); #line 158 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = session; -#line 158 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = method; -#line 158 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self = (PublishingRESTSupportOAuth1Transaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_); + self = (PublishingRESTSupportOAuth1Transaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), method); #line 159 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_transaction_setup_arguments (self); #line 156 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return self; -#line 1351 "OAuth1Support.c" +#line 1381 "OAuth1Support.c" } -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new (PublishingRESTSupportOAuth1Session* session, PublishingRESTSupportHttpMethod method) { +PublishingRESTSupportOAuth1Transaction* +publishing_rest_support_oauth1_transaction_new (PublishingRESTSupportOAuth1Session* session, + PublishingRESTSupportHttpMethod method) +{ #line 156 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return publishing_rest_support_oauth1_transaction_construct (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, session, method); -#line 1358 "OAuth1Support.c" +#line 1391 "OAuth1Support.c" } -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_construct_with_uri (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { +PublishingRESTSupportOAuth1Transaction* +publishing_rest_support_oauth1_transaction_construct_with_uri (GType object_type, + PublishingRESTSupportOAuth1Session* session, + const gchar* uri, + PublishingRESTSupportHttpMethod method) +{ PublishingRESTSupportOAuth1Transaction* self = NULL; - PublishingRESTSupportOAuth1Session* _tmp0_; - const gchar* _tmp1_; - PublishingRESTSupportHttpMethod _tmp2_; #line 162 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); #line 162 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (uri != NULL, NULL); #line 164 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = session; -#line 164 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = uri; -#line 164 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = method; -#line 164 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self = (PublishingRESTSupportOAuth1Transaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); + self = (PublishingRESTSupportOAuth1Transaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), uri, method); #line 165 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_transaction_setup_arguments (self); #line 162 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return self; -#line 1383 "OAuth1Support.c" +#line 1412 "OAuth1Support.c" } -PublishingRESTSupportOAuth1Transaction* publishing_rest_support_oauth1_transaction_new_with_uri (PublishingRESTSupportOAuth1Session* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { +PublishingRESTSupportOAuth1Transaction* +publishing_rest_support_oauth1_transaction_new_with_uri (PublishingRESTSupportOAuth1Session* session, + const gchar* uri, + PublishingRESTSupportHttpMethod method) +{ #line 162 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return publishing_rest_support_oauth1_transaction_construct_with_uri (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, session, uri, method); -#line 1390 "OAuth1Support.c" +#line 1423 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_transaction_setup_arguments (PublishingRESTSupportOAuth1Transaction* self) { +static void +publishing_rest_support_oauth1_transaction_setup_arguments (PublishingRESTSupportOAuth1Transaction* self) +{ PublishingRESTSupportOAuth1Session* session = NULL; PublishingRESTSupportSession* _tmp0_; PublishingRESTSupportOAuth1Session* _tmp1_; @@ -1406,7 +1441,6 @@ static void publishing_rest_support_oauth1_transaction_setup_arguments (Publishi gchar* _tmp8_; gchar* _tmp9_; PublishingRESTSupportOAuth1Session* _tmp10_; - gboolean _tmp11_; #line 168 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_TRANSACTION (self)); #line 169 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1450,32 +1484,33 @@ static void publishing_rest_support_oauth1_transaction_setup_arguments (Publishi #line 176 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp10_ = session; #line 176 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp11_ = publishing_rest_support_oauth1_session_has_access_phase_token (_tmp10_); -#line 176 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - if (_tmp11_) { -#line 1454 "OAuth1Support.c" - PublishingRESTSupportOAuth1Session* _tmp12_; + if (publishing_rest_support_oauth1_session_has_access_phase_token (_tmp10_)) { +#line 1486 "OAuth1Support.c" + PublishingRESTSupportOAuth1Session* _tmp11_; + gchar* _tmp12_; gchar* _tmp13_; - gchar* _tmp14_; #line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp12_ = session; + _tmp11_ = session; #line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp13_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp12_); + _tmp12_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp11_); #line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp14_ = _tmp13_; + _tmp13_ = _tmp12_; #line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp14_); + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp13_); #line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp14_); -#line 1468 "OAuth1Support.c" + _g_free0 (_tmp13_); +#line 1500 "OAuth1Support.c" } #line 168 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _publishing_rest_support_session_unref0 (session); -#line 1472 "OAuth1Support.c" +#line 1504 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { +static void +publishing_rest_support_oauth1_transaction_real_execute (PublishingRESTSupportTransaction* base, + GError** error) +{ PublishingRESTSupportOAuth1Transaction * self; gchar* signature = NULL; PublishingRESTSupportSession* _tmp0_; @@ -1511,7 +1546,7 @@ static void publishing_rest_support_oauth1_transaction_real_execute (PublishingR _g_free0 (signature); #line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return; -#line 1512 "OAuth1Support.c" +#line 1547 "OAuth1Support.c" } else { #line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signature); @@ -1521,29 +1556,35 @@ static void publishing_rest_support_oauth1_transaction_real_execute (PublishingR g_clear_error (&_inner_error_); #line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return; -#line 1522 "OAuth1Support.c" +#line 1557 "OAuth1Support.c" } } #line 182 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signature); -#line 1527 "OAuth1Support.c" +#line 1562 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_transaction_class_init (PublishingRESTSupportOAuth1TransactionClass * klass) { +static void +publishing_rest_support_oauth1_transaction_class_init (PublishingRESTSupportOAuth1TransactionClass * klass) +{ #line 155 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_transaction_parent_class = g_type_class_peek_parent (klass); #line 155 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_rest_support_oauth1_transaction_real_execute; -#line 1536 "OAuth1Support.c" +#line 1573 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_transaction_instance_init (PublishingRESTSupportOAuth1Transaction * self) { +static void +publishing_rest_support_oauth1_transaction_instance_init (PublishingRESTSupportOAuth1Transaction * self) +{ } -GType publishing_rest_support_oauth1_transaction_get_type (void) { +GType +publishing_rest_support_oauth1_transaction_get_type (void) +{ static volatile gsize publishing_rest_support_oauth1_transaction_type_id__volatile = 0; if (g_once_init_enter (&publishing_rest_support_oauth1_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportOAuth1TransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_oauth1_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportOAuth1Transaction), 0, (GInstanceInitFunc) publishing_rest_support_oauth1_transaction_instance_init, NULL }; @@ -1555,25 +1596,22 @@ GType publishing_rest_support_oauth1_transaction_get_type (void) { } -PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* endpoint_uri) { +PublishingRESTSupportOAuth1UploadTransaction* +publishing_rest_support_oauth1_upload_transaction_construct (GType object_type, + PublishingRESTSupportOAuth1Session* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_uri) +{ PublishingRESTSupportOAuth1UploadTransaction* self = NULL; - PublishingRESTSupportOAuth1Session* _tmp0_; - SpitPublishingPublishable* _tmp1_; - const gchar* _tmp2_; - PublishingRESTSupportArgument** _tmp3_; - PublishingRESTSupportOAuth1Session* _tmp4_; - PublishingRESTSupportOAuth1Session* _tmp5_; + PublishingRESTSupportArgument** _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; - PublishingRESTSupportOAuth1Session* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - PublishingRESTSupportOAuth1Session* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_; - PublishingRESTSupportOAuth1Session* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; + gchar* _tmp8_; #line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); #line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1581,107 +1619,102 @@ PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upl #line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_val_if_fail (endpoint_uri != NULL, NULL); #line 197 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp0_ = session; -#line 197 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = publishable; -#line 197 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = endpoint_uri; -#line 197 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self = (PublishingRESTSupportOAuth1UploadTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); + self = (PublishingRESTSupportOAuth1UploadTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), publishable, endpoint_uri); #line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = g_new0 (PublishingRESTSupportArgument*, 0 + 1); + _tmp0_ = g_new0 (PublishingRESTSupportArgument*, 0 + 1); #line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv->auth_header_fields = (_vala_array_free (self->priv->auth_header_fields, self->priv->auth_header_fields_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); #line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->priv->auth_header_fields = _tmp3_; + self->priv->auth_header_fields = _tmp0_; #line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv->auth_header_fields_length1 = 0; #line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv->_auth_header_fields_size_ = self->priv->auth_header_fields_length1; #line 200 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp4_ = session; -#line 200 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - self->session = _tmp4_; + self->session = session; #line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp5_ = session; + _tmp1_ = publishing_rest_support_oauth1_session_get_oauth_nonce (session); #line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp6_ = publishing_rest_support_oauth1_session_get_oauth_nonce (_tmp5_); -#line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp7_ = _tmp6_; + _tmp2_ = _tmp1_; #line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp7_); + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp2_); #line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp7_); + _g_free0 (_tmp2_); #line 203 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_signature_method", "HMAC-SHA1"); #line 204 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_version", "1.0"); #line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp8_ = session; -#line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp9_ = publishing_rest_support_oauth1_session_get_oauth_timestamp (_tmp8_); + _tmp3_ = publishing_rest_support_oauth1_session_get_oauth_timestamp (session); #line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp10_ = _tmp9_; + _tmp4_ = _tmp3_; #line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp10_); + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp4_); #line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp10_); -#line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp11_ = session; + _g_free0 (_tmp4_); #line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp12_ = publishing_rest_support_oauth1_session_get_consumer_key (_tmp11_); + _tmp5_ = publishing_rest_support_oauth1_session_get_consumer_key (session); #line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp13_ = _tmp12_; + _tmp6_ = _tmp5_; #line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_consumer_key", _tmp13_); + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_consumer_key", _tmp6_); #line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp13_); -#line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp14_ = session; + _g_free0 (_tmp6_); #line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp15_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp14_); + _tmp7_ = publishing_rest_support_oauth1_session_get_access_phase_token (session); #line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp16_ = _tmp15_; + _tmp8_ = _tmp7_; #line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp16_); + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp8_); #line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _g_free0 (_tmp16_); + _g_free0 (_tmp8_); #line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return self; -#line 1649 "OAuth1Support.c" +#line 1671 "OAuth1Support.c" } -PublishingRESTSupportOAuth1UploadTransaction* publishing_rest_support_oauth1_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* endpoint_uri) { +PublishingRESTSupportOAuth1UploadTransaction* +publishing_rest_support_oauth1_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, + SpitPublishingPublishable* publishable, + const gchar* endpoint_uri) +{ #line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return publishing_rest_support_oauth1_upload_transaction_construct (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, session, publishable, endpoint_uri); -#line 1656 "OAuth1Support.c" +#line 1682 "OAuth1Support.c" } -static void _vala_array_add3 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { +static void +_vala_array_add3 (PublishingRESTSupportArgument** * array, + int* length, + int* size, + PublishingRESTSupportArgument* value) +{ #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" if ((*length) == (*size)) { #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" *size = (*size) ? (2 * (*size)) : 4; #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 1667 "OAuth1Support.c" +#line 1698 "OAuth1Support.c" } #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" (*array)[(*length)++] = value; #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" (*array)[*length] = NULL; -#line 1673 "OAuth1Support.c" +#line 1704 "OAuth1Support.c" } -void publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (PublishingRESTSupportOAuth1UploadTransaction* self, const gchar* key, const gchar* value) { +void +publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (PublishingRESTSupportOAuth1UploadTransaction* self, + const gchar* key, + const gchar* value) +{ PublishingRESTSupportArgument** _tmp0_; gint _tmp0__length1; - const gchar* _tmp1_; - const gchar* _tmp2_; - PublishingRESTSupportArgument* _tmp3_; + PublishingRESTSupportArgument* _tmp1_; #line 210 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION (self)); #line 210 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" @@ -1693,18 +1726,16 @@ void publishing_rest_support_oauth1_upload_transaction_add_authorization_header_ #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _tmp0__length1 = self->priv->auth_header_fields_length1; #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp1_ = key; -#line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp2_ = value; -#line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _tmp3_ = publishing_rest_support_argument_new (_tmp1_, _tmp2_); + _tmp1_ = publishing_rest_support_argument_new (key, value); #line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" - _vala_array_add3 (&self->priv->auth_header_fields, &self->priv->auth_header_fields_length1, &self->priv->_auth_header_fields_size_, _tmp3_); -#line 1701 "OAuth1Support.c" + _vala_array_add3 (&self->priv->auth_header_fields, &self->priv->auth_header_fields_length1, &self->priv->_auth_header_fields_size_, _tmp1_); +#line 1730 "OAuth1Support.c" } -gchar* publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (PublishingRESTSupportOAuth1UploadTransaction* self) { +gchar* +publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (PublishingRESTSupportOAuth1UploadTransaction* self) +{ gchar* result = NULL; PublishingRESTSupportArgument** _tmp0_; gint _tmp0__length1; @@ -1732,11 +1763,13 @@ gchar* publishing_rest_support_oauth1_upload_transaction_get_authorization_heade result = _tmp4_; #line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" return result; -#line 1733 "OAuth1Support.c" +#line 1764 "OAuth1Support.c" } -void publishing_rest_support_oauth1_upload_transaction_authorize (PublishingRESTSupportOAuth1UploadTransaction* self) { +void +publishing_rest_support_oauth1_upload_transaction_authorize (PublishingRESTSupportOAuth1UploadTransaction* self) +{ gchar* signature = NULL; PublishingRESTSupportOAuth1Session* _tmp0_; PublishingRESTSupportArgument** _tmp1_; @@ -1771,29 +1804,35 @@ void publishing_rest_support_oauth1_upload_transaction_authorize (PublishingREST _g_free0 (authorization_header); #line 218 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" _g_free0 (signature); -#line 1771 "OAuth1Support.c" +#line 1804 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_upload_transaction_class_init (PublishingRESTSupportOAuth1UploadTransactionClass * klass) { +static void +publishing_rest_support_oauth1_upload_transaction_class_init (PublishingRESTSupportOAuth1UploadTransactionClass * klass) +{ #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" publishing_rest_support_oauth1_upload_transaction_parent_class = g_type_class_peek_parent (klass); #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_oauth1_upload_transaction_finalize; #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" g_type_class_add_private (klass, sizeof (PublishingRESTSupportOAuth1UploadTransactionPrivate)); -#line 1782 "OAuth1Support.c" +#line 1817 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_upload_transaction_instance_init (PublishingRESTSupportOAuth1UploadTransaction * self) { +static void +publishing_rest_support_oauth1_upload_transaction_instance_init (PublishingRESTSupportOAuth1UploadTransaction * self) +{ #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self->priv = PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_GET_PRIVATE (self); -#line 1789 "OAuth1Support.c" +#line 1826 "OAuth1Support.c" } -static void publishing_rest_support_oauth1_upload_transaction_finalize (PublishingRESTSupportTransaction * obj) { +static void +publishing_rest_support_oauth1_upload_transaction_finalize (PublishingRESTSupportTransaction * obj) +{ PublishingRESTSupportOAuth1UploadTransaction * self; #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction); @@ -1801,11 +1840,13 @@ static void publishing_rest_support_oauth1_upload_transaction_finalize (Publishi self->priv->auth_header_fields = (_vala_array_free (self->priv->auth_header_fields, self->priv->auth_header_fields_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); #line 190 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_rest_support_oauth1_upload_transaction_parent_class)->finalize (obj); -#line 1801 "OAuth1Support.c" +#line 1840 "OAuth1Support.c" } -GType publishing_rest_support_oauth1_upload_transaction_get_type (void) { +GType +publishing_rest_support_oauth1_upload_transaction_get_type (void) +{ static volatile gsize publishing_rest_support_oauth1_upload_transaction_type_id__volatile = 0; if (g_once_init_enter (&publishing_rest_support_oauth1_upload_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingRESTSupportOAuth1UploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_rest_support_oauth1_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingRESTSupportOAuth1UploadTransaction), 0, (GInstanceInitFunc) publishing_rest_support_oauth1_upload_transaction_instance_init, NULL }; @@ -1817,7 +1858,11 @@ GType publishing_rest_support_oauth1_upload_transaction_get_type (void) { } -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { +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) { @@ -1829,7 +1874,11 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti } -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { +static void +_vala_array_free (gpointer array, + gint array_length, + GDestroyNotify destroy_func) +{ _vala_array_destroy (array, array_length, destroy_func); g_free (array); } -- cgit v1.2.3